diff options
| author | lsces <lester@lsces.co.uk> | 2025-08-29 13:39:01 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2025-08-29 13:39:01 +0100 |
| commit | 0954a0d71a0a5ec01f27bf7dba603337f06e8981 (patch) | |
| tree | 684b6379994c70b60f4417eae5341521374c9da7 | |
| parent | 0c1b1eef6c68e10d14ef34dae6aff79e48bf8a60 (diff) | |
| download | kernel-0954a0d71a0a5ec01f27bf7dba603337f06e8981.tar.gz kernel-0954a0d71a0a5ec01f27bf7dba603337f06e8981.tar.bz2 kernel-0954a0d71a0a5ec01f27bf7dba603337f06e8981.zip | |
General code changes to cover uninitialized variables and style changes for PHP8.4
| -rwxr-xr-x[-rw-r--r--] | error.php | 7 | ||||
| -rwxr-xr-x[-rw-r--r--] | requirements_graph.php | 5 | ||||
| -rwxr-xr-x[-rw-r--r--] | view_cache.php | 25 |
3 files changed, 16 insertions, 21 deletions
diff --git a/error.php b/error.php index 5ea5dbc..7c0d332 100644..100755 --- a/error.php +++ b/error.php @@ -8,10 +8,9 @@ /** * required setup */ -require_once( '../kernel/includes/setup_inc.php' ); +namespace Bitweaver; +require_once '../kernel/includes/setup_inc.php'; // Display the template $gBitSmarty->assign( 'msg', strip_tags( $_REQUEST["error"] )); -$gBitSystem->display( 'error.tpl' , tra( 'Error' ), array( 'display_mode' => 'display' )); - -?> +$gBitSystem->display( 'error.tpl' , KernelTools::tra( 'Error' ), array( 'display_mode' => 'display' )); diff --git a/requirements_graph.php b/requirements_graph.php index 785a8a1..13d743e 100644..100755 --- a/requirements_graph.php +++ b/requirements_graph.php @@ -8,10 +8,9 @@ /** * Setup */ -require_once( '../kernel/includes/setup_inc.php' ); +require_once '../kernel/includes/setup_inc.php'; $gBitSystem->verifyPermission( 'p_admin' ); global $gBitInstaller; $gBitInstaller = &$gBitSystem; $gBitInstaller->verifyInstalledPackages(); -$gBitInstaller->drawRequirementsGraph( !empty( $_REQUEST['install_version'] ), ( !empty( $_REQUEST['format'] ) ? $_REQUEST['format'] : 'png' ), ( !empty( $_REQUEST['command'] ) ? $_REQUEST['command'] : 'dot' )); -?> +$gBitInstaller->drawRequirementsGraph( !empty( $_REQUEST['install_version'] ), !empty( $_REQUEST['format'] ) ? $_REQUEST['format'] : 'png', !empty( $_REQUEST['command'] ) ? $_REQUEST['command'] : 'dot' ); diff --git a/view_cache.php b/view_cache.php index fef42fd..3ef91ec 100644..100755 --- a/view_cache.php +++ b/view_cache.php @@ -12,13 +12,14 @@ /** * required setup */ -require_once( '../kernel/includes/setup_inc.php' ); -require_once( WIKI_PKG_CLASS_PATH.'BitPage.php' ); +require_once '../kernel/includes/setup_inc.php'; +use Bitweaver\KernelTools; +use Bitweaver\Wiki\BitPage; /* if($gBitSystem->getConfig('wiki_list_pages') != 'y') { - $gBitSmarty->assign('msg',tra("This feature is disabled")); - $gBitSystem->display( 'error.tpl' , NULL, array( 'display_mode' => 'display' )); + $gBitSmarty->assign('msg', KernelTools::tra("This feature is disabled")); + $gBitSystem->display( 'error.tpl' , null, array( 'display_mode' => 'display' )); die; } */ @@ -26,9 +27,9 @@ if (isset($_REQUEST['url'])) { $id = $wikilib->isUrlCached($_REQUEST['url']); if (!$id) { - $gBitSmarty->assign('msg', tra("No cache information available")); + $gBitSmarty->assign('msg', KernelTools::tra("No cache information available")); - $gBitSystem->display( 'error.tpl' , NULL, array( 'display_mode' => 'display' )); + $gBitSystem->display( 'error.tpl' , null, array( 'display_mode' => 'display' )); die; } @@ -36,9 +37,9 @@ if (isset($_REQUEST['url'])) { } if (!isset($_REQUEST["cache_id"])) { - $gBitSmarty->assign('msg', tra("No page indicated")); + $gBitSmarty->assign('msg', KernelTools::tra("No page indicated")); - $gBitSystem->display( 'error.tpl' , NULL, array( 'display_mode' => 'display' )); + $gBitSystem->display( 'error.tpl' , null, array( 'display_mode' => 'display' )); die; } @@ -52,9 +53,5 @@ if (substr($info["url"], -4, 4) == ".txt") { } $gBitSmarty->assign('ggcacheurl', $ggcacheurl); -$gBitSmarty->assignByRef('info', $info); -$gBitSystem->display( 'bitpackage:kernel/view_cache.tpl', NULL, array( 'display_mode' => 'display' )); - - - -?> +$gBitSmarty->assign('info', $info); +$gBitSystem->display( 'bitpackage:kernel/view_cache.tpl', null, array( 'display_mode' => 'display' )); |
