diff options
| author | lsces <lester@lsces.co.uk> | 2025-08-27 17:15:51 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2025-08-27 17:15:51 +0100 |
| commit | 49fd7246de6340f0d9b5358d0fbdd3d14f9c2664 (patch) | |
| tree | 9c3bd7c2ffc68fbfb52707a2f024b4b243084e4f /admin/admin_pigeonholes_inc.php | |
| parent | b8fad2e75324458572d8a96fa7b119b5175fa6fe (diff) | |
| download | pigeonholes-49fd7246de6340f0d9b5358d0fbdd3d14f9c2664.tar.gz pigeonholes-49fd7246de6340f0d9b5358d0fbdd3d14f9c2664.tar.bz2 pigeonholes-49fd7246de6340f0d9b5358d0fbdd3d14f9c2664.zip | |
Code updated to PHP8.4 and namespace
Diffstat (limited to 'admin/admin_pigeonholes_inc.php')
| -rwxr-xr-x[-rw-r--r--] | admin/admin_pigeonholes_inc.php | 81 |
1 files changed, 39 insertions, 42 deletions
diff --git a/admin/admin_pigeonholes_inc.php b/admin/admin_pigeonholes_inc.php index 20dbe48..48087a0 100644..100755 --- a/admin/admin_pigeonholes_inc.php +++ b/admin/admin_pigeonholes_inc.php @@ -1,74 +1,74 @@ <?php // $Header$ -$pigeonholeDisplaySettings = array( - 'pigeonholes_display_path' => array( +$pigeonholeDisplaySettings = [ + 'pigeonholes_display_path' => [ 'label' => 'Display Path', 'note' => 'Display category paths above the page leading to the object.', - ), - 'pigeonholes_display_description' => array( + ], + 'pigeonholes_display_description' => [ 'label' => 'Display Description', 'note' => 'When showing the category members, you can display the category description as well.', - ), - 'pigeonholes_list_filter' => array( + ], + 'pigeonholes_list_filter' => [ 'label' => 'Listing Filter', 'note' => 'When viewing a listing of content items, users can limit the listing based on category.', - ), - 'pigeonholes_display_members' => array( + ], + 'pigeonholes_display_members' => [ 'label' => 'Display Members', 'note' => 'Show the other members of the same categories at the bottom of the page.', - ), -); + ], +]; $gBitSmarty->assign( 'pigeonholeDisplaySettings', $pigeonholeDisplaySettings ); -$pigeonholeListSettings = array( - 'pigeonholes_display_subtree' => array( +$pigeonholeListSettings = [ + 'pigeonholes_display_subtree' => [ 'label' => 'Display Subtree', 'note' => 'When viewing the category list, you can display the subcategories as well.', - ), - 'pigeonholes_display_content_type' => array( + ], + 'pigeonholes_display_content_type' => [ 'label' => 'Display Content Type', 'note' => 'When viewing the category members, you can display the content type alongside the item.', - ), -); + ], +]; $gBitSmarty->assign( 'pigeonholeListSettings', $pigeonholeListSettings ); -$pigeonholeEditSettings = array( - 'pigeonholes_themes' => array( +$pigeonholeEditSettings = [ + 'pigeonholes_themes' => [ 'label' => 'Theme selection', 'note' => 'Allow the selection of a different theme to use for a category.', - ), - 'pigeonholes_permissions' => array( + ], + 'pigeonholes_permissions' => [ 'label' => 'Permission gating', 'note' => 'Limit category access to users with a given permission. Permission settings are inhertied by child categories.', - ), - 'pigeonholes_groups' => array( + ], + 'pigeonholes_groups' => [ 'label' => 'Group gating', 'note' => 'Limit category access to specific groups. Group settings are inhertied by child categories.', - ), - 'pigeonholes_reverse_assign_table' => array( + ], + 'pigeonholes_reverse_assign_table' => [ 'label' => 'Assign Categories in Rows', 'note' => 'The assign categories page will have categories in rows instead of columns and content in columns instead of rows. This is better if you have lots of categories that do not fit on a single page easily.', - ), - 'pigeonholes_allow_forbid_insertion' => array( + ], + 'pigeonholes_allow_forbid_insertion' => [ 'label' => 'Allow Forbid Insertion', 'note' => 'Allows pigeonholes to be set to forbid insertion of new members. This is good for heirarchical categories where only leaf categories should have members.' - ), -); + ], +]; $gBitSmarty->assign( 'pigeonholeEditSettings', $pigeonholeEditSettings ); -$pigeonholeContentEditSettings = array( - 'pigeonholes_use_jstab' => array( +$pigeonholeContentEditSettings = [ + 'pigeonholes_use_jstab' => [ 'label' => 'Use separate Tab', 'note' => 'When editing content use a separate tab to categorise.', - ), -); + ], +]; $gBitSmarty->assign( 'pigeonholeContentEditSettings', $pigeonholeContentEditSettings ); -$listStyles = array( +$listStyles = [ 'dynamic' => tra( 'Dynamic list' ), 'table' => tra( 'Table based list' ), -); +]; $gBitSmarty->assign( 'listStyles', $listStyles ); // sensible table column numbers @@ -76,7 +76,7 @@ $tableColumns = range( 0, 6 ); unset( $tableColumns[0] ); $gBitSmarty->assign( 'tableColumns', $tableColumns ); -$memberLimit = array( +$memberLimit = [ '0' => tra( 'Only display category title' ), '10' => 10, '20' => 20, @@ -84,14 +84,14 @@ $memberLimit = array( '50' => 50, '100' => 100, '9999' => tra( 'Unlimited' ), -); +]; $gBitSmarty->assign( 'memberLimit', $memberLimit ); // various image sizes -$gBitSmarty->assign( 'imageSizes', get_image_size_options() ); +$gBitSmarty->assign( 'imageSizes', Bitweaver\Liberty\get_image_size_options() ); // Which kinds of content? -$exclude = array( 'tikisticky', 'pigeonholes' ); +$exclude = [ 'tikisticky', 'pigeonholes' ]; foreach( $gLibertySystem->mContentTypes as $cType ) { if( !in_array( $cType['content_type_guid'], $exclude ) ) { $formPigeonholeable['guids']['pigeonhole_no_'.$cType['content_type_guid']] = $gLibertySystem->getContentTypeName( $cType['content_type_guid'] ); @@ -111,7 +111,7 @@ if( !empty( $_REQUEST['pigeonhole_settings'] ) ) { simple_set_value( 'pigeonholes_list_style', PIGEONHOLES_PKG_NAME ); foreach( array_keys( $formPigeonholeable['guids'] ) as $holeable ) { - $gBitSystem->storeConfig( $holeable, ( ( !empty( $_REQUEST['pigeonholeable_content'] ) && in_array( $holeable, $_REQUEST['pigeonholeable_content'] ) ) ? NULL : 'y' ), PIGEONHOLES_PKG_NAME ); + $gBitSystem->storeConfig( $holeable, !empty( $_REQUEST['pigeonholeable_content'] ) && in_array( $holeable, $_REQUEST['pigeonholeable_content'] ) ? null : 'y', PIGEONHOLES_PKG_NAME ); } } @@ -123,6 +123,3 @@ foreach( $gLibertySystem->mContentTypes as $cType ) { } } $gBitSmarty->assign( 'formPigeonholeable', $formPigeonholeable ); - - -?> |
