From bdff242d1a0a934b23b01dd46e45074825da271f Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 5 Mar 2023 12:35:36 +0700 Subject: [PATCH] Fixed deprecated in html.php line 140 Deprecated: Required parameter $name follows optional parameter $arr in C:\OSPanel\domains\localhost\system\library\html.php on line 140 --- system/distributor.php | 24 ++++++++++++------------ system/library/html.php | 2 +- system/sections/help/close.php | 12 ++++++------ system/sections/help/open.php | 12 ++++++------ 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/system/distributor.php b/system/distributor.php index 7c3a9d9..749a5ca 100644 --- a/system/distributor.php +++ b/system/distributor.php @@ -163,26 +163,26 @@ $servers = $sql->query('(SELECT `id` FROM `servers` WHERE `user`="'.$user['id'].'" LIMIT 1) UNION (SELECT `id` FROM `owners` WHERE `user`="'.$user['id'].'" LIMIT 1)'); if($sql->num()) - $html->unitall('all', 'servers', 1, 1); + $html->unitall('servers', 'all', 1, 1); else - $html->unitall('all', 'servers', 0, 1); + $html->unitall('servers', 'all', 0, 1); // Проверка наличия игрового сервера $servers = $sql->query('SELECT `id` FROM `control` WHERE `user`="'.$user['id'].'" LIMIT 1'); if($sql->num()) - $html->unitall('all', 'control', 1); + $html->unitall('control', 'all', 1); else - $html->unitall('all', 'control', 0); + $html->unitall('control', 'all', 0); - $html->unitall('all', 'auth', 1, 1); - $html->unitall('all', 'admin', $user['group'] == 'admin', 1); - $html->unitall('all', 'support', $user['group'] == 'support', 1); + $html->unitall('auth', 'all', 1, 1); + $html->unitall('admin', 'all', $user['group'] == 'admin', 1); + $html->unitall('support', 'all', $user['group'] == 'support', 1); }else{ - $html->unitall('all', 'auth', 0, 1); - $html->unitall('all', 'servers', 0, 1); - $html->unitall('all', 'control', 0, 1); - $html->unitall('all', 'admin', 0, 1); - $html->unitall('all', 'support', 0, 1); + $html->unitall('auth', 'all', 0, 1); + $html->unitall('servers', 'all', 0, 1); + $html->unitall('control', 'all', 0, 1); + $html->unitall('admin', 'all', 0, 1); + $html->unitall('support', 'all', 0, 1); } ?> \ No newline at end of file diff --git a/system/library/html.php b/system/library/html.php index f68d376..58d6016 100644 --- a/system/library/html.php +++ b/system/library/html.php @@ -137,7 +137,7 @@ return NULL; } - public function unitall($arr = array(), $name, $var = false, $mirror = false) + public function unitall($name, $arr = array(), $var = false, $mirror = false) { $block = str_replace($name, "'\\|".$name."\\|(.*?)\\|_".$name."\\|'si", $name); diff --git a/system/sections/help/close.php b/system/sections/help/close.php index 5bc1b24..a512bf0 100644 --- a/system/sections/help/close.php +++ b/system/sections/help/close.php @@ -89,15 +89,15 @@ if(!in_array($user['group'], array('admin', 'support'))) { - $html->unitall('main', 'user', 1); - $html->unitall('main', 'support'); + $html->unitall('user', 'main', 1); + $html->unitall('support', 'main'); }else{ - $html->unitall('main', 'user'); - $html->unitall('main', 'support', 1); + $html->unitall('user', 'main'); + $html->unitall('support', 'main', 1); } if($user['group'] == 'admin') - $html->unitall('main', 'admin', 1); + $html->unitall('admin', 'main', 1); else - $html->unitall('main', 'admin'); + $html->unitall('admin', 'main'); ?> \ No newline at end of file diff --git a/system/sections/help/open.php b/system/sections/help/open.php index f682d9a..2e64fb4 100644 --- a/system/sections/help/open.php +++ b/system/sections/help/open.php @@ -99,15 +99,15 @@ if(!in_array($user['group'], array('admin', 'support'))) { - $html->unitall('main', 'user', 1); - $html->unitall('main', 'support'); + $html->unitall('user', 'main', 1); + $html->unitall('support', 'main'); }else{ - $html->unitall('main', 'user'); - $html->unitall('main', 'support', 1); + $html->unitall('user', 'main'); + $html->unitall('support', 'main', 1); } if($user['group'] == 'admin') - $html->unitall('main', 'admin', 1); + $html->unitall('admin', 'main', 1); else - $html->unitall('main', 'admin'); + $html->unitall('admin', 'main'); ?> \ No newline at end of file