summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-14 09:54:15 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-14 09:54:15 +0100
commit189c836dcb564eb07560f50e46b3944b2df05a03 (patch)
treeaa82dc82e6b604bd416fbba3cb6b1136d5d26df0 /admin
parentab6c159fad476d20d3f0c1de202b00cb989bda09 (diff)
downloadkernel-189c836dcb564eb07560f50e46b3944b2df05a03.tar.gz
kernel-189c836dcb564eb07560f50e46b3944b2df05a03.tar.bz2
kernel-189c836dcb564eb07560f50e46b3944b2df05a03.zip
php-cs-fixer tidies to php8.5 standards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/admin_features_inc.php2
-rwxr-xr-xadmin/admin_notifications.php6
-rwxr-xr-xadmin/admin_packages_inc.php4
-rwxr-xr-xadmin/admin_server_inc.php18
-rwxr-xr-xadmin/admin_system.php2
-rwxr-xr-xadmin/apc.php184
-rwxr-xr-xadmin/backup.php14
-rwxr-xr-xadmin/db_performance.php3
-rwxr-xr-xadmin/index.php4
-rwxr-xr-xadmin/list_cache.php3
-rwxr-xr-xadmin/remote_backup.php12
-rwxr-xr-xadmin/schema_inc.php2
-rwxr-xr-xadmin/sitemaps.php1
13 files changed, 124 insertions, 131 deletions
diff --git a/admin/admin_features_inc.php b/admin/admin_features_inc.php
index 6ebadc3..26ae098 100755
--- a/admin/admin_features_inc.php
+++ b/admin/admin_features_inc.php
@@ -123,7 +123,7 @@ if( !empty( $_REQUEST['change_prefs'] ) ) {
"site_short_time_format",
"site_long_datetime_format",
"site_short_datetime_format",
- "bit_index"
+ "bit_index",
];
foreach( $refValue as $britem ) {
diff --git a/admin/admin_notifications.php b/admin/admin_notifications.php
index 51cc7d7..7b201f1 100755
--- a/admin/admin_notifications.php
+++ b/admin/admin_notifications.php
@@ -15,13 +15,13 @@ include_once KERNEL_PKG_INCLUDE_PATH.'notification_lib.php';
$gBitSystem->verifyPermission( 'p_admin' );
if (isset($_REQUEST["add"])) {
-
+
if (isset($_REQUEST["email"]) && !empty($_REQUEST["email"]))
$notificationlib->add_mail_event($_REQUEST["event"], ['*'], $_REQUEST["email"]);
}
if (isset($_REQUEST["removeevent"])) {
-
+
$notificationlib->remove_mail_event($_REQUEST["removeevent"], $_REQUEST["object"], $_REQUEST["email"]);
}
@@ -63,4 +63,4 @@ $gBitSmarty->assign('admin_mail', $admin_mail);
$gBitSmarty->assign('cuser_mail', $cuser_mail);
// Display the template
-$gBitSystem->display( 'bitpackage:kernel/admin_notifications.tpl', null, array( 'display_mode' => 'admin' ));
+$gBitSystem->display( 'bitpackage:kernel/admin_notifications.tpl', null, [ 'display_mode' => 'admin' ]);
diff --git a/admin/admin_packages_inc.php b/admin/admin_packages_inc.php
index 11faa4c..83bfddf 100755
--- a/admin/admin_packages_inc.php
+++ b/admin/admin_packages_inc.php
@@ -11,14 +11,14 @@ $fPackage = &$_REQUEST['fPackage']; // emulate register_globals
# rescan to include all packages, installed and not installed
$gBitSystem->scanPackages(
- 'bit_setup_inc.php', true, 'all', true, true
+ 'bit_setup_inc.php', true, 'all', true, true,
);
// make a copy of mPackages - expensive, but this is low use code
if( !empty( $_REQUEST['features'] ) ) {
$pkgArray = $gBitSystem->mPackages;
- foreach( array_keys( $pkgArray ) as $pkgKey ) {
+ foreach( array_keys( $pkgArray ) as $pkgKey ) {
$pkg = $pkgArray[$pkgKey];
if( !empty( $pkg['name'] )) {
$pkgName = strtolower( $pkg['name'] );
diff --git a/admin/admin_server_inc.php b/admin/admin_server_inc.php
index 98630cd..4bb947b 100755
--- a/admin/admin_server_inc.php
+++ b/admin/admin_server_inc.php
@@ -10,19 +10,19 @@ $processForm = set_tab();
if( $processForm ) {
- $pref_toggles = array(
+ $pref_toggles = [
"site_hidden",
"site_closed",
"site_use_load_threshold",
"site_use_proxy",
- "site_store_session_db"
- );
+ "site_store_session_db",
+ ];
foreach( $pref_toggles as $item ) {
simple_set_toggle( $item, KERNEL_PKG_NAME );
}
- $pref_simple_values = array(
+ $pref_simple_values = [
"kernel_server_name",
"site_sender_email",
"site_proxy_host",
@@ -31,20 +31,20 @@ if( $processForm ) {
"site_load_threshold",
"site_busy_msg",
"site_closed_msg",
- "storage_host"
- );
+ "storage_host",
+ ];
foreach( $pref_simple_values as $item ) {
simple_set_value( $item, KERNEL_PKG_NAME );
}
- $pref_byref_values = array(
+ $pref_byref_values = [
"site_title",
"site_slogan",
"site_description",
"site_notice",
"site_error_title",
- );
+ ];
foreach( $pref_byref_values as $item ) {
$_REQUEST['site_description'] = substr( $_REQUEST['site_description'], 0, 180 );
@@ -69,7 +69,7 @@ if( $processForm ) {
$gBitSystem->getConfig( 'site_keywords' ).
$gBitSystem->getConfig( 'site_keywords_1' ).
$gBitSystem->getConfig( 'site_keywords_2' ).
- $gBitSystem->getConfig( 'site_keywords_3' )
+ $gBitSystem->getConfig( 'site_keywords_3' ),
);
}
diff --git a/admin/admin_system.php b/admin/admin_system.php
index e474581..31a1d53 100755
--- a/admin/admin_system.php
+++ b/admin/admin_system.php
@@ -6,6 +6,7 @@
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
namespace Bitweaver\Liberty;
+
require_once '../../kernel/includes/setup_inc.php';
use Bitweaver\KernelTools;
use Bitweaver\Nexus\Nexus;
@@ -136,7 +137,6 @@ $gBitSmarty->assign( 'feedback', $feedback );
$gBitSystem->display( 'bitpackage:kernel/admin_system.tpl', KernelTools::tra( "System Cache" ) , [ 'display_mode' => 'admin' ] );
-
// {{{ Functions
/**
* du
diff --git a/admin/apc.php b/admin/apc.php
index 1886d07..c28db79 100755
--- a/admin/apc.php
+++ b/admin/apc.php
@@ -58,7 +58,6 @@ defaults('GRAPH_SIZE',200); // Image size
////////// END OF DEFAULT CONFIG AREA /////////////////////////////////////////////////////////////
-
// "define if not defined"
function defaults($d,$v) {
if (!defined($d)) define($d,$v); // or just @define(...)
@@ -80,7 +79,7 @@ define('OB_USER_CACHE',2);
define('OB_VERSION_CHECK',3);
// check validity of input variables
-$vardom=array(
+$vardom=[
'OB' => '/^\d+$/', // operational mode switch
'CC' => '/^[01]$/', // clear cache requested
'DU' => '/^.*$/', // Delete User Key
@@ -94,14 +93,14 @@ $vardom=array(
'SORT1' => '/^[AHSMCDTZ]$/', // first sort key
'SORT2' => '/^[DA]$/', // second sort key
'AGGR' => '/^\d+$/', // aggregation by dir level
- 'SEARCH' => '~^[a-zA-Z0-9/_.-]*$~' // aggregation by dir level
-);
+ 'SEARCH' => '~^[a-zA-Z0-9/_.-]*$~', // aggregation by dir level
+];
// cache scope
-$scope_list=array(
+$scope_list=[
'A' => 'cache_list',
- 'D' => 'deleted_list'
-);
+ 'D' => 'deleted_list',
+];
// handle POST and GET requests
if (empty($_REQUEST)) {
@@ -170,9 +169,9 @@ if (!USE_AUTHENTICATION) {
EOB;
exit;
- } else {
- $AUTHENTICATED=1;
}
+ $AUTHENTICATED=1;
+
}
}
@@ -201,25 +200,25 @@ header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
function duration($ts) {
- global $time;
- $years = (int)((($time - $ts)/(7*86400))/52.177457);
- $rem = (int)(($time-$ts)-($years * 52.177457 * 7 * 86400));
- $weeks = (int)(($rem)/(7*86400));
- $days = (int)(($rem)/86400) - $weeks*7;
- $hours = (int)(($rem)/3600) - $days*24 - $weeks*7*24;
- $mins = (int)(($rem)/60) - $hours*60 - $days*24*60 - $weeks*7*24*60;
- $str = '';
- if($years==1) $str .= "$years year, ";
- if($years>1) $str .= "$years years, ";
- if($weeks==1) $str .= "$weeks week, ";
- if($weeks>1) $str .= "$weeks weeks, ";
- if($days==1) $str .= "$days day,";
- if($days>1) $str .= "$days days,";
- if($hours == 1) $str .= " $hours hour and";
- if($hours>1) $str .= " $hours hours and";
- if($mins == 1) $str .= " 1 minute";
- else $str .= " $mins minutes";
- return $str;
+ global $time;
+ $years = (int)((($time - $ts)/(7*86400))/52.177457);
+ $rem = (int)(($time-$ts)-($years * 52.177457 * 7 * 86400));
+ $weeks = (int)(($rem)/(7*86400));
+ $days = (int)(($rem)/86400) - $weeks*7;
+ $hours = (int)(($rem)/3600) - $days*24 - $weeks*7*24;
+ $mins = (int)(($rem)/60) - $hours*60 - $days*24*60 - $weeks*7*24*60;
+ $str = '';
+ if($years==1) $str .= "$years year, ";
+ if($years>1) $str .= "$years years, ";
+ if($weeks==1) $str .= "$weeks week, ";
+ if($weeks>1) $str .= "$weeks weeks, ";
+ if($days==1) $str .= "$days day,";
+ if($days>1) $str .= "$days days,";
+ if($hours == 1) $str .= " $hours hour and";
+ if($hours>1) $str .= " $hours hours and";
+ if($mins == 1) $str .= " 1 minute";
+ else $str .= " $mins minutes";
+ return $str;
}
// create graphics
@@ -237,7 +236,6 @@ if (isset($MYREQUEST['IMG']))
$r=$diameter/2;
$w=deg2rad((360+$start+($end-$start)/2)%360);
-
if (function_exists("imagefilledarc")) {
// exists only if GD 2.0.1 is avaliable
imagefilledarc($im, $centerX+1, $centerY+1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE);
@@ -300,7 +298,7 @@ if (isset($MYREQUEST['IMG']))
$px=$x+40*2;
$py=($placeindex-15)*12+6;
} else {
- $px=$x+40*2+100*intval(($placeindex-15)/15);
+ $px=$x+40*2+100*(int) (($placeindex-15)/15);
$py=($placeindex%15)*12+6;
}
imagefilledrectangle($im, $px, $py+3, $px-4, $py-3, $color2);
@@ -313,7 +311,6 @@ if (isset($MYREQUEST['IMG']))
}
}
-
$size = GRAPH_SIZE; // image size
if ($MYREQUEST['IMG']==3)
$image = imagecreate(2*$size+150, $size+10);
@@ -349,7 +346,7 @@ if (isset($MYREQUEST['IMG']))
if( ($angle_to*360) - ($angle_from*360) >= 1) {
fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_red);
if (($angle_to-$angle_from)>0.05) {
- array_push($string_placement, array($angle_from,$angle_to));
+ array_push($string_placement, [$angle_from,$angle_to]);
}
}
$angle_from = $angle_to;
@@ -359,7 +356,7 @@ if (isset($MYREQUEST['IMG']))
if( ($angle_to*360) - ($angle_from*360) >= 1) {
fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_green);
if (($angle_to-$angle_from)>0.05) {
- array_push($string_placement, array($angle_from,$angle_to));
+ array_push($string_placement, [$angle_from,$angle_to]);
}
}
$angle_from = $angle_to;
@@ -370,7 +367,7 @@ if (isset($MYREQUEST['IMG']))
if(($angle_to+$fuzz)>1) $angle_to = 1;
fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_red);
if (($angle_to-$angle_from)>0.05) {
- array_push($string_placement, array($angle_from,$angle_to));
+ array_push($string_placement, [$angle_from,$angle_to]);
}
}
}
@@ -404,18 +401,18 @@ if (isset($MYREQUEST['IMG']))
if($block['offset']!=$ptr) { // Used block
$h=(GRAPH_SIZE-5)*($block['offset']-$ptr)/$s;
if ($h>0) {
- $j++;
+ $j++;
if($j<75) fill_box($image,$x,$y,50,$h,$col_black,$col_red,bsize($block['offset']-$ptr),$j);
- else fill_box($image,$x,$y,50,$h,$col_black,$col_red);
- }
+ else fill_box($image,$x,$y,50,$h,$col_black,$col_red);
+ }
$y+=$h;
}
$h=(GRAPH_SIZE-5)*($block['size'])/$s;
if ($h>0) {
- $j++;
+ $j++;
if($j<75) fill_box($image,$x,$y,50,$h,$col_black,$col_green,bsize($block['size']),$j);
else fill_box($image,$x,$y,50,$h,$col_black,$col_green);
- }
+ }
$y+=$h;
$ptr = $block['offset']+$block['size'];
}
@@ -445,7 +442,7 @@ if (isset($MYREQUEST['IMG']))
// pretty printer for byte values
//
function bsize($s) {
- foreach (array('','K','M','G') as $i => $k) {
+ foreach (['','K','M','G'] as $i => $k) {
if ($s < 1024) break;
$s/=1024;
}
@@ -502,11 +499,10 @@ function block_sort($array1, $array2)
{
if ($array1['offset'] > $array2['offset']) {
return 1;
- } else {
- return -1;
}
-}
+ return -1;
+}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@@ -741,7 +737,6 @@ echo <<<EOB
</ol>
EOB;
-
// CONTENT
echo <<<EOB
<div class=content>
@@ -772,7 +767,7 @@ case OB_HOST_STATS:
$apcversion = phpversion('apcu');
$phpversion = phpversion();
$number_vars = $cache['num_entries'];
- $size_vars = bsize($cache['mem_size']);
+ $size_vars = bsize($cache['mem_size']);
$i=0;
echo <<< EOB
<div class="info div1"><h2>General Cache Information</h2>
@@ -874,9 +869,9 @@ EOB;
++$nseg;
}
$ptr = $block['offset'] + $block['size'];
- /* Only consider blocks <5M for the fragmentation % */
- if($block['size']<(5*1024*1024)) $fragsize+=$block['size'];
- $freetotal+=$block['size'];
+ /* Only consider blocks <5M for the fragmentation % */
+ if($block['size']<(5*1024*1024)) $fragsize+=$block['size'];
+ $freetotal+=$block['size'];
}
$freeseg += count($mem['block_lists'][$i]);
}
@@ -898,28 +893,27 @@ EOB;
</td>
</tr>
EOB;
- if(isset($mem['adist'])) {
- foreach($mem['adist'] as $i=>$v) {
- $cur = pow(2,$i); $nxt = pow(2,$i+1)-1;
- if($i==0) $range = "1";
- else $range = "$cur - $nxt";
- echo "<tr><th align=right>$range</th><td align=right>$v</td></tr>\n";
- }
- }
- echo <<<EOB
+ if(isset($mem['adist'])) {
+ foreach($mem['adist'] as $i=>$v) {
+ $cur = pow(2,$i); $nxt = pow(2,$i+1)-1;
+ if($i==0) $range = "1";
+ else $range = "$cur - $nxt";
+ echo "<tr><th align=right>$range</th><td align=right>$v</td></tr>\n";
+ }
+ }
+ echo <<<EOB
</tbody></table>
</div>
EOB;
break;
-
// -----------------------------------------------
// User Cache Entries
// -----------------------------------------------
case OB_USER_CACHE:
if (!$AUTHENTICATED) {
- echo '<div class="error">You need to login to see the user values here!<br/>&nbsp;<br/>';
+ echo '<div class="error">You need to login to see the user values here!<br/>&nbsp;<br/>';
put_login_link("Login now!");
echo '</div>';
break;
@@ -964,7 +958,7 @@ EOB;
'<option value=500',$MYREQUEST['COUNT']=='500'? ' selected':'','>Top 500</option>',
'<option value=0 ',$MYREQUEST['COUNT']=='0' ? ' selected':'','>All</option>',
'</select>',
- '&nbsp; Search: <input name=SEARCH value="',$MYREQUEST['SEARCH'],'" type=text size=25/>',
+ '&nbsp; Search: <input name=SEARCH value="',$MYREQUEST['SEARCH'],'" type=text size=25/>',
'&nbsp;<input type=submit value="GO!">',
'</form></div>';
@@ -973,8 +967,8 @@ EOB;
// regular expression subpattern.
$MYREQUEST['SEARCH'] = '/'.str_replace('/', '\\/', $MYREQUEST['SEARCH']).'/i';
if (preg_match($MYREQUEST['SEARCH'], 'test') === false) {
- echo '<div class="error">Error: enter a valid regular expression as a search query.</div>';
- break;
+ echo '<div class="error">Error: enter a valid regular expression as a search query.</div>';
+ break;
}
}
@@ -1028,45 +1022,45 @@ EOB;
// output list
$i=0;
foreach($list as $k => $entry) {
- if(!$MYREQUEST['SEARCH'] || preg_match($MYREQUEST['SEARCH'], $entry[$fieldname]) != 0) {
+ if(!$MYREQUEST['SEARCH'] || preg_match($MYREQUEST['SEARCH'], $entry[$fieldname]) != 0) {
$sh=md5($entry["info"]);
- $field_value = htmlentities(strip_tags($entry[$fieldname],''), ENT_QUOTES, 'UTF-8');
- echo
- '<tr id="key-'. $sh .'" class=tr-',$i%2,'>',
- "<td class=td-0><a href=\"$MY_SELF&OB=",$MYREQUEST['OB'],"&SH=",$sh,"#key-". $sh ."\">",$field_value,'</a></td>',
- '<td class="td-n center">',$entry['num_hits'],'</td>',
- '<td class="td-n right">',$entry['mem_size'],'</td>',
- '<td class="td-n center">',date(DATE_FORMAT,$entry['access_time']),'</td>',
- '<td class="td-n center">',date(DATE_FORMAT,$entry['mtime']),'</td>',
- '<td class="td-n center">',date(DATE_FORMAT,$entry['creation_time']),'</td>';
+ $field_value = htmlentities(strip_tags($entry[$fieldname],''), ENT_QUOTES, 'UTF-8');
+ echo
+ '<tr id="key-'. $sh .'" class=tr-',$i%2,'>',
+ "<td class=td-0><a href=\"$MY_SELF&OB=",$MYREQUEST['OB'],"&SH=",$sh,"#key-". $sh ."\">",$field_value,'</a></td>',
+ '<td class="td-n center">',$entry['num_hits'],'</td>',
+ '<td class="td-n right">',$entry['mem_size'],'</td>',
+ '<td class="td-n center">',date(DATE_FORMAT,$entry['access_time']),'</td>',
+ '<td class="td-n center">',date(DATE_FORMAT,$entry['mtime']),'</td>',
+ '<td class="td-n center">',date(DATE_FORMAT,$entry['creation_time']),'</td>';
- if($fieldname=='info') {
- if($entry['ttl'])
- echo '<td class="td-n center">'.$entry['ttl'].' seconds</td>';
- else
- echo '<td class="td-n center">None</td>';
- }
- if ($entry['deletion_time']) {
+ if($fieldname=='info') {
+ if($entry['ttl'])
+ echo '<td class="td-n center">'.$entry['ttl'].' seconds</td>';
+ else
+ echo '<td class="td-n center">None</td>';
+ }
+ if ($entry['deletion_time']) {
- echo '<td class="td-last center">', date(DATE_FORMAT,$entry['deletion_time']), '</td>';
- } else if ($MYREQUEST['OB'] == OB_USER_CACHE) {
+ echo '<td class="td-last center">', date(DATE_FORMAT,$entry['deletion_time']), '</td>';
+ } else if ($MYREQUEST['OB'] == OB_USER_CACHE) {
- echo '<td class="td-last center">';
- echo '[<a href="', $MY_SELF, '&OB=', $MYREQUEST['OB'], '&DU=', urlencode($entry[$fieldkey]), '">Delete Now</a>]';
- echo '</td>';
- } else {
- echo '<td class="td-last center"> &nbsp; </td>';
- }
- echo '</tr>';
+ echo '<td class="td-last center">';
+ echo '[<a href="', $MY_SELF, '&OB=', $MYREQUEST['OB'], '&DU=', urlencode($entry[$fieldkey]), '">Delete Now</a>]';
+ echo '</td>';
+ } else {
+ echo '<td class="td-last center"> &nbsp; </td>';
+ }
+ echo '</tr>';
if ($sh == $MYREQUEST["SH"]) {
echo '<tr>';
echo '<td colspan="7"><pre>'.htmlentities(print_r(apcu_fetch($entry['info']), 1)).'</pre></td>';
echo '</tr>';
}
- $i++;
- if ($i == $MYREQUEST['COUNT'])
- break;
- }
+ $i++;
+ if ($i == $MYREQUEST['COUNT'])
+ break;
+ }
}
} else {
@@ -1097,10 +1091,10 @@ case OB_VERSION_CHECK:
</tr>
EOB;
if (defined('PROXY')) {
- $ctxt = stream_context_create( array( 'http' => array( 'proxy' => PROXY, 'request_fulluri' => True ) ) );
- $rss = @file_get_contents("http://pecl.php.net/feeds/pkg_apcu.rss", False, $ctxt);
+ $ctxt = stream_context_create( [ 'http' => [ 'proxy' => PROXY, 'request_fulluri' => True ] ] );
+ $rss = @file_get_contents("http://pecl.php.net/feeds/pkg_apcu.rss", False, $ctxt);
} else {
- $rss = @file_get_contents("http://pecl.php.net/feeds/pkg_apcu.rss");
+ $rss = @file_get_contents("http://pecl.php.net/feeds/pkg_apcu.rss");
}
if (!$rss) {
echo '<tr class="td-last center"><td>Unable to fetch version information.</td></tr>';
diff --git a/admin/backup.php b/admin/backup.php
index 2db3548..6333e31 100755
--- a/admin/backup.php
+++ b/admin/backup.php
@@ -8,6 +8,7 @@
// Initialization
namespace Bitweaver;
+
require_once '../../kernel/includes/setup_inc.php';
require_once KERNEL_PKG_INCLUDE_PATH.'backups_lib.php';
@@ -20,7 +21,7 @@ $backupPath = STORAGE_PKG_PATH."backups/$bitdomain";
KernelTools::mkdir_p( $backupPath );
if (isset($_REQUEST["generate"])) {
-
+
$filename = md5($gBitSystem->genPass()). '.sql';
$backuplib->backup_database( $backupPath.$filename );
@@ -29,26 +30,26 @@ if (isset($_REQUEST["generate"])) {
$gBitSmarty->assign('restore', 'n');
if (isset($_REQUEST["restore"])) {
-
+
$gBitSmarty->assign('restore', 'y');
$gBitSmarty->assign('restorefile', basename($_REQUEST["restore"]));
}
if (isset($_REQUEST["rrestore"])) {
-
+
$backuplib->restore_database( $backupPath.basename($_REQUEST["rrestore"]));
}
if (isset($_REQUEST["remove"])) {
-
+
$filename = $backupPath.basename($_REQUEST["remove"]);
unlink ($filename);
}
if (isset($_REQUEST["upload"])) {
-
+
if (isset($_FILES['userfile1']) && is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
$fp = fopen($_FILES['userfile1']['tmp_name'], "r");
@@ -91,5 +92,4 @@ closedir ($h);
$gBitSmarty->assign('backups', $backups);
$gBitSmarty->assign('bitdomain', $bitdomain);
-
-$gBitSystem->display( 'bitpackage:kernel/backup.tpl', KernelTools::tra( 'Backups') , array( 'display_mode' => 'admin' ));
+$gBitSystem->display( 'bitpackage:kernel/backup.tpl', KernelTools::tra( 'Backups') , [ 'display_mode' => 'admin' ]);
diff --git a/admin/db_performance.php b/admin/db_performance.php
index 26f2088..dc81a48 100755
--- a/admin/db_performance.php
+++ b/admin/db_performance.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver;
- require_once '../../kernel/includes/setup_inc.php';
+
+require_once '../../kernel/includes/setup_inc.php';
if (!$gBitUser->isAdmin()) {
$gBitSmarty->assign('msg', KernelTools::tra("You dont have permission to use this feature"));
diff --git a/admin/index.php b/admin/index.php
index 367a62f..976caa0 100755
--- a/admin/index.php
+++ b/admin/index.php
@@ -20,7 +20,7 @@ if( !empty( $_REQUEST["page"] )) {
// only admins may use this page
$gBitSystem->verifyPermission( 'p_'.$page.'_admin' );
-
+
if( preg_match( '/\.php/', $page )) {
$adminPage = $page;
} else {
@@ -61,7 +61,7 @@ if( !empty( $_REQUEST["page"] )) {
$gBitSmarty->assign( 'adminFile', $adminFile );
$gBitSmarty->assign( 'page', $page );
$gBitSystem->setBrowserTitle( preg_replace( '/_/', ' ', $page )." Settings" );
-
+
include_once $adminPage;
// Spiderr - a bit hackish, but need to force preferences refresh
diff --git a/admin/list_cache.php b/admin/list_cache.php
index 3794e9e..1c5230a 100755
--- a/admin/list_cache.php
+++ b/admin/list_cache.php
@@ -74,8 +74,7 @@ if ($offset > 0) {
$gBitSmarty->assign('listpages', $listpages["data"]);
//print_r($listpages["data"]);
-
// Display the template
-$gBitSystem->display( 'bitpackage:kernel/list_cache.tpl', null, array( 'display_mode' => 'list' ));
+$gBitSystem->display( 'bitpackage:kernel/list_cache.tpl', null, [ 'display_mode' => 'list' ]);
?>
diff --git a/admin/remote_backup.php b/admin/remote_backup.php
index d33f896..503596c 100755
--- a/admin/remote_backup.php
+++ b/admin/remote_backup.php
@@ -15,12 +15,12 @@
require_once '../../kernel/includes/setup_inc.php';
include_once 'lib/backups/backupslib.php';
if(isset($_REQUEST["generate"])) {
- if(isset($_REQUEST["my_word"]) &&
- $_REQUEST["my_word"] == "YOUR PASSWORD FOR BACKUPS HERE" ) {
- $filename = md5($gBitSystem->genPass()).'.sql';
- $backuplib->backup_database("backups/$bitdomain$filename");
- echo "Done";
- }
+ if(isset($_REQUEST["my_word"]) &&
+ $_REQUEST["my_word"] == "YOUR PASSWORD FOR BACKUPS HERE" ) {
+ $filename = md5($gBitSystem->genPass()).'.sql';
+ $backuplib->backup_database("backups/$bitdomain$filename");
+ echo "Done";
+ }
}
die;
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index b6acc58..c9cd76c 100755
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -102,7 +102,7 @@ $gBitInstaller->registerModules( $moduleHash );
// ### Default UserPermissions
$gBitInstaller->registerUserPermissions( KERNEL_PKG_NAME, [
[ 'p_admin' , 'Can manage users groups and permissions and all aspects of site management' , 'admin' , KERNEL_PKG_NAME ],
- [ 'p_access_closed_site' , 'Can access site when closed' , 'admin' , KERNEL_PKG_NAME ]
+ [ 'p_access_closed_site' , 'Can access site when closed' , 'admin' , KERNEL_PKG_NAME ],
] );
// Package requirements
diff --git a/admin/sitemaps.php b/admin/sitemaps.php
index d785f7d..38ace36 100755
--- a/admin/sitemaps.php
+++ b/admin/sitemaps.php
@@ -8,7 +8,6 @@
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
*/
-
// Initialization
require_once '../../kernel/includes/setup_inc.php';