summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2025-08-27 17:12:13 +0100
committerlsces <lester@lsces.co.uk>2025-08-27 17:12:13 +0100
commit72ad9a9e51db8f54eae01991d6905db6b4306c19 (patch)
treef5a82fb5772c418712f58462d11d08b04ce84a2e /plugins
parentda8147a0536f1f5189afd03a996359d32b98ba65 (diff)
downloadnexus-72ad9a9e51db8f54eae01991d6905db6b4306c19.tar.gz
nexus-72ad9a9e51db8f54eae01991d6905db6b4306c19.tar.bz2
nexus-72ad9a9e51db8f54eae01991d6905db6b4306c19.zip
Code updated to PHP8.4 and namespace
Diffstat (limited to 'plugins')
-rwxr-xr-x[-rw-r--r--]plugins/menu.formelements.php18
-rwxr-xr-x[-rw-r--r--]plugins/menu.suckerfish.php19
-rwxr-xr-x[-rw-r--r--]plugins/menu.tikiwiki.php20
3 files changed, 28 insertions, 29 deletions
diff --git a/plugins/menu.formelements.php b/plugins/menu.formelements.php
index e0bab74..1b4e87e 100644..100755
--- a/plugins/menu.formelements.php
+++ b/plugins/menu.formelements.php
@@ -18,7 +18,7 @@ global $gNexusSystem;
define( 'NEXUS_PLUGIN_GUID_FORMELEMENTSMENU', 'formelements' );
$pluginParams = array(
- 'auto_activate' => FALSE,
+ 'auto_activate' => false,
'write_cache_function' => 'write_form_menu_cache',
'title' => 'Formelements menu',
'description' => 'Menus using form elements',
@@ -50,15 +50,15 @@ function write_form_menu_cache( $pMenuHash ) {
$menu_name = strtolower( $menu_name );
$menu_file = $pMenuHash->mInfo['cache']['file'];
if ( $pMenuHash->mInfo['menu_type'] != 'qdd' ) {
- $data = '{bitmodule title="{tr}'.$pMenuHash->mInfo['title'].'{/tr}" name="'.$menu_name.'"}';
+ $data = '{bitmodule title="'.$pMenuHash->mInfo['title'].'" name="'.$menu_name.'"}';
}
else {
$data = '{bitmodule name="'.$menu_name.'"}';
}
// if a permission has been set, we need to work out when to close the {if} clause
- $permCloseIds = array();
- $perm_close = FALSE;
- $next_cycle = FALSE;
+ $permCloseIds = [];
+ $perm_close = false;
+ $next_cycle = false;
foreach( $pMenuHash->mInfo['tree'] as $key => $item ) {
if( !empty( $item['perm'] ) ) {
$perm_open = '{if $gBitUser->hasPermission("'.$item['perm'].'")}';
@@ -94,14 +94,14 @@ function write_form_menu_cache( $pMenuHash ) {
// close permission clauses
if( $next_cycle ) {
$data .= '{/if}';
- $next_cycle = FALSE;
+ $next_cycle = false;
}
if( in_array( $item['item_id'], $permCloseIds ) ) {
- $next_cycle = TRUE;
+ $next_cycle = true;
}
if( $perm_close ) {
$data .= '{/if}';
- $perm_close = FALSE;
+ $perm_close = false;
}
}
if( $item['last'] ) {
@@ -115,7 +115,7 @@ function write_form_menu_cache( $pMenuHash ) {
// open permission if clause
$data .= $perm_open;
if( !$item['head'] ) {
- $perm_close = TRUE;
+ $perm_close = true;
} else {
$permCloseIds[] = $item['item_id'];
}
diff --git a/plugins/menu.suckerfish.php b/plugins/menu.suckerfish.php
index 67c084e..bbb5321 100644..100755
--- a/plugins/menu.suckerfish.php
+++ b/plugins/menu.suckerfish.php
@@ -18,7 +18,7 @@ global $gNexusSystem;
define( 'NEXUS_PLUGIN_GUID_SUCKERFISH', 'suckerfish' );
$pluginParams = array(
- 'auto_activate' => TRUE,
+ 'auto_activate' => true,
'write_cache_function' => 'write_suckerfish_cache',
'title' => 'Suckerfish Menus',
'description' => 'Sophisticated and flexible CSS driven dropdown menus',
@@ -46,13 +46,13 @@ function write_suckerfish_cache( $pMenuHash ) {
$menu_name = strtolower( $menu_name );
$menu_file = $pMenuHash->mInfo['cache']['file'];
- $data = '{bitmodule title="{tr}'.$pMenuHash->mInfo['title'].'{/tr}" name="'.$menu_name.'" classplus="nexus-menu"}';
+ $data = '{bitmodule title="'.$pMenuHash->mInfo['title'].'" name="'.$menu_name.'" classplus="nexus-menu"}';
$data .= '<div class="suckerfish">';
// if a permission has been set, we need to work out when to close the {if} clause
- $permCloseIds = array();
- $perm_close = FALSE;
- $next_cycle = FALSE;
+ $permCloseIds = [];
+ $perm_close = false;
+ $next_cycle = false;
$menu_id = 'nexus'.$pMenuHash->mInfo['menu_id'].'-{$moduleParams.layout_area}{$moduleParams.pos}';
foreach( $pMenuHash->mInfo['tree'] as $key => $item ) {
@@ -67,14 +67,14 @@ function write_suckerfish_cache( $pMenuHash ) {
// close permission clauses
if( $next_cycle ) {
$data .= '{/if}';
- $next_cycle = FALSE;
+ $next_cycle = false;
}
if( in_array( $item['item_id'], $permCloseIds ) ) {
- $next_cycle = TRUE;
+ $next_cycle = true;
}
if( $perm_close ) {
$data .= '{/if}';
- $perm_close = FALSE;
+ $perm_close = false;
}
}
@@ -85,7 +85,7 @@ function write_suckerfish_cache( $pMenuHash ) {
// open permission if clause
$data .= '{if $gBitUser->hasPermission("'.$item['perm'].'")}';
if( !$item['head'] ) {
- $perm_close = TRUE;
+ $perm_close = true;
} else {
$permCloseIds[] = $item['item_id'];
}
@@ -100,7 +100,6 @@ function write_suckerfish_cache( $pMenuHash ) {
}
}
- $data .= '<!--[if lt IE 8]><script type="text/javascript">BitBase.fixIEDropMenu("'.$menu_id.'");</script><![endif]-->';
$data .= '<div class="clear"></div>';
$data .= '</div>';
$data .= '{/bitmodule}';
diff --git a/plugins/menu.tikiwiki.php b/plugins/menu.tikiwiki.php
index 6c51299..a0c071d 100644..100755
--- a/plugins/menu.tikiwiki.php
+++ b/plugins/menu.tikiwiki.php
@@ -17,7 +17,7 @@ global $gNexusSystem;
define( 'NEXUS_PLUGIN_GUID_TIKIWIKI', 'tikiwiki' );
$pluginParams = array(
- 'auto_activate' => TRUE,
+ 'auto_activate' => true,
'write_cache_function' => 'write_tikiwiki_cache',
'title' => 'TikiWiki menus',
'description' => 'expandable menu reminiscent of the tikiwiki menu',
@@ -47,12 +47,12 @@ function write_tikiwiki_cache( $pMenuHash ) {
$menu_name = preg_replace( "/ +/", "_", trim( $pMenuHash->mInfo['title'] ) );
$menu_name = strtolower( $menu_name );
$menu_file = $pMenuHash->mInfo['cache']['file'];
- $data = '{bitmodule title="{tr}'.$pMenuHash->mInfo['title'].'{/tr}" name="'.$menu_name.'"}';
+ $data = '{bitmodule title="'.$pMenuHash->mInfo['title'].'" name="'.$menu_name.'"}';
$data .= '<div class="tikiwiki menu">';
// if a permission has been set, we need to work out when to close the {if} clause
- $permCloseIds = array();
- $perm_close = FALSE;
- $perm_cycle = FALSE;
+ $permCloseIds = [];
+ $perm_close = false;
+ $perm_cycle = false;
$type = $pMenuHash->mInfo['menu_type'];
foreach( $pMenuHash->mInfo['tree'] as $key => $item ) {
if( $item['first'] ) {
@@ -61,14 +61,14 @@ function write_tikiwiki_cache( $pMenuHash ) {
// close permission clauses
if( $perm_cycle ) {
$data .= '{/if}';
- $perm_cycle = FALSE;
+ $perm_cycle = false;
}
if( in_array( $item['item_id'], $permCloseIds ) ) {
- $perm_cycle = TRUE;
+ $perm_cycle = true;
}
if( $perm_close ) {
$data .= '{/if}';
- $perm_close = FALSE;
+ $perm_close = false;
}
}
if( $item['last'] ) {
@@ -78,7 +78,7 @@ function write_tikiwiki_cache( $pMenuHash ) {
// open permission if clause
$data .= '{if $gBitUser->hasPermission("'.$item['perm'].'")}';
if( !$item['head'] ) {
- $perm_close = TRUE;
+ $perm_close = true;
} else {
$permCloseIds[] = $item['item_id'];
}
@@ -101,7 +101,7 @@ function write_tikiwiki_cache( $pMenuHash ) {
$data .= '</div><!-- end .menu -->';
// apply state of expandable menus
- $data .= '<script type="text/javascript">';
+ $data .= '<script>';
foreach( $pMenuHash->mInfo['tree'] as $key => $item ) {
if( $item['first'] ) {
$togid = 'togid'.$item['item_id'];