Fix: regression in utils

This commit is contained in:
Bartek Fabiszewski 2017-09-15 15:19:05 +02:00
parent b04b015a5d
commit e0596395a0
2 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,7 @@
*/ */
require_once(dirname(__DIR__) . "/helpers/auth.php"); require_once(dirname(__DIR__) . "/helpers/auth.php");
require_once(ROOT_DIR . "/lang.php");
require_once(ROOT_DIR . "/helpers/track.php"); require_once(ROOT_DIR . "/helpers/track.php");
require_once(ROOT_DIR . "/helpers/utils.php"); require_once(ROOT_DIR . "/helpers/utils.php");

View File

@ -18,6 +18,7 @@
*/ */
require_once(dirname(__DIR__) . "/helpers/auth.php"); require_once(dirname(__DIR__) . "/helpers/auth.php");
require_once(ROOT_DIR . "/lang.php");
require_once(ROOT_DIR . "/helpers/utils.php"); require_once(ROOT_DIR . "/helpers/utils.php");
$auth = new uAuth(); $auth = new uAuth();
@ -25,7 +26,7 @@
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : NULL; $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : NULL;
$login = isset($_REQUEST['login']) ? trim($_REQUEST['login']) : NULL; $login = isset($_REQUEST['login']) ? trim($_REQUEST['login']) : NULL;
$pass = isset($_REQUEST['pass']) ? $_REQUEST['pass'] : NULL; $pass = isset($_REQUEST['pass']) ? $_REQUEST['pass'] : NULL;
if (!$auth->isAuthenticated() || !$auth->isAdmin || $auth->user->login == $login || empty($action) || empty($login)) { if (!$auth->isAuthenticated() || !$auth->isAdmin() || $auth->user->login == $login || empty($action) || empty($login)) {
uUtils::exitWithError($lang["servererror"]); uUtils::exitWithError($lang["servererror"]);
} }