From 0c630bcb351a9967c8f36213a7bfca8cb7c6f39c Mon Sep 17 00:00:00 2001 From: "spider@dav" Date: Fri, 30 May 2025 09:59:24 -0400 Subject: LibertyBase check in --- modules/mod_structure_toc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/mod_structure_toc.php b/modules/mod_structure_toc.php index 3581f8a..8991a80 100644 --- a/modules/mod_structure_toc.php +++ b/modules/mod_structure_toc.php @@ -20,7 +20,7 @@ if( is_object( $gStructure ) && $gStructure->isValid() && $gStructure->hasViewPe $struct = &$gStructure; } elseif( @BitBase::verifyId( $module_params['structure_id'] ) ) { $struct = new LibertyStructure( $module_params['structure_id'] ); -} elseif( is_object( $gContent ) && $gContent->hasViewPermission( FALSE ) ) { +} elseif( is_object( $gContent ) && is_a( $gContent, 'LibertyBase' ) && $gContent->hasViewPermission( FALSE ) ) { if( $structures = $gContent->getStructures() ) { // We take the first structure by default, perhaps there is a better choice $structureId = $structures[0]['structure_id']; -- cgit v1.3