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 /modules | |
| 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 'modules')
| -rwxr-xr-x[-rw-r--r--] | modules/mod_category_menu.php | 7 | ||||
| -rwxr-xr-x[-rw-r--r--] | modules/mod_category_suckerfish.php | 24 | ||||
| -rwxr-xr-x[-rw-r--r--] | modules/mod_whats_related.php | 7 |
3 files changed, 18 insertions, 20 deletions
diff --git a/modules/mod_category_menu.php b/modules/mod_category_menu.php index fc7eeda..a7d5e2b 100644..100755 --- a/modules/mod_category_menu.php +++ b/modules/mod_category_menu.php @@ -23,10 +23,9 @@ if( !empty( $gContent->mContentId ) ) { } if( $pigeons = $pigeonholes->getPigeonholesFromContentId( $gContent->mContentId ) ) { foreach( $pigeons as $pigeon ) { - $modPigeonStructures[] = $gStructure->getSubTree( $pigeon['root_structure_id'], TRUE ); + $modPigeonStructures[] = $gStructure->getSubTree( $pigeon['root_structure_id'], true ); } - $_template->tpl_vars['modPigeonStructures'] = new Smarty_variable( !empty( $modPigeonStructures ); + $gBitSmarty->assign( 'modPigeonStructures', !empty( $modPigeonStructures )); } } -} -?> +}
\ No newline at end of file diff --git a/modules/mod_category_suckerfish.php b/modules/mod_category_suckerfish.php index 5f7e177..23acc5b 100644..100755 --- a/modules/mod_category_suckerfish.php +++ b/modules/mod_category_suckerfish.php @@ -20,17 +20,17 @@ global $gBitSmarty, $gQueryUserId, $gBitThemes, $module_rows, $moduleParams, $gB $module_rows = $moduleParams['module_rows']; $module_params = $moduleParams['module_params']; -$_template->tpl_vars['moduleTitle'] = new Smarty_variable( isset($moduleParams['title']) ); +$gBitSmarty->assign( 'moduleTitle', isset($moduleParams['title']) ); -$ns = array(); +$ns = []; if($gBitSystem->isPackageActive('pigeonholes')) { - require_once(PIGEONHOLES_PKG_CLASS_PATH.'Pigeonholes.php'); + require_once(PIGEONHOLES_PKG_PATH.'Pigeonholes.php'); $p = new Pigeonholes(); $s = new LibertyStructure(); // Prep get list screws with us. - $listHash = array('load_only_root'=> TRUE, 'sort_mode' => 'lc.title_asc', 'offset' => 0, 'max_records' => '999999', 'find' => ''); + $listHash = array('load_only_root'=> true, 'sort_mode' => 'lc.title_asc', 'offset' => 0, 'max_records' => '999999', 'find' => ''); if (!empty($module_params['root_structure_id'])) { $listHash['root_structure_id'] = $module_params['root_structure_id']; } @@ -42,7 +42,7 @@ if($gBitSystem->isPackageActive('pigeonholes')) { } foreach ($l as $e) { $d = $s->getSubTree( $e['structure_id'] ); - $d_o = array(); + $d_o = []; foreach ($d as $c) { $pos_var = &$d_o; if($c['level']!=0) { @@ -50,16 +50,16 @@ if($gBitSystem->isPackageActive('pigeonholes')) { $pos_var = &$d_o; foreach ($pos as $pos_v) { if (!isset($pos_var['children'])) { - $pos_var['children']=array(); + $pos_var['children']=[]; } if (!isset($pos_var['children'][$pos_v-1])) { - $pos_var['children'][$pos_v-1]=array(); + $pos_var['children'][$pos_v-1]=[]; } $pos_var = &$pos_var['children'][$pos_v-1]; } } if (empty($pos_var['data'])) { - $pos_var['children']=array(); + $pos_var['children']=[]; $c['display_url']=$p->getDisplayUrl($c['content_id']); $pos_var['data']=$c; } @@ -105,15 +105,15 @@ if (!defined('MENU_LEVELS_DEFINED')) { if (!empty($module_params['expand_root']) && $module_params['expand_root']) { if (isset($ns[0]) && !empty($ns[0]['children'])) { - $_template->tpl_vars['pigeonMenu'] = new Smarty_variable( menuLevels($ns[0]['children'], 0)); + $gBitSmarty->assign( 'pigeonMenu', menuLevels($ns[0]['children'], 0)); } else if (!empty($ns[0]['children'])) { - $_template->tpl_vars['pigeonMenu'] = new Smarty_variable( menuLevels($ns['children'], 0)); + $gBitSmarty->assign( 'pigeonMenu', menuLevels($ns['children'], 0)); } } else { - $_template->tpl_vars['pigeonMenu'] = new Smarty_variable( menuLevels($ns, 0)); + $gBitSmarty->assign( 'pigeonMenu', menuLevels($ns, 0)); } -$_template->tpl_vars['pigeonholesPackageActive'] = new Smarty_variable( $gBitSystem->isPackageActive('pigeonholes')); +$gBitSmarty->assign( 'pigeonholesPackageActive', $gBitSystem->isPackageActive('pigeonholes')); ?> diff --git a/modules/mod_whats_related.php b/modules/mod_whats_related.php index b40e7a9..36e012e 100644..100755 --- a/modules/mod_whats_related.php +++ b/modules/mod_whats_related.php @@ -21,11 +21,10 @@ if( !empty( $gContent->mContentId ) ) { if( $pigeons = $pigeonholes->getPigeonholesFromContentId( $gContent->mContentId ) ) { foreach( $pigeons as $pigeon ) { $pigeonholes->mContentId = $pigeon['content_id']; - $pigeonholes->load( TRUE ); + $pigeonholes->load( true ); $modRelatedPigeon[] = $pigeonholes->mInfo; } - $_template->tpl_vars['modRelatedPigeon'] = new Smarty_variable( !empty( $modRelatedPigeon ); + $gBitSmarty->assign( 'modRelatedPigeon', !empty( $modRelatedPigeon ) ); } } -} -?> +}
\ No newline at end of file |
