From d3d4b443fdca69b247d25c657f4b6bed156e4ea3 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sun, 2 Jun 2024 10:07:53 +0000 Subject: [PATCH] Apply fixes from StyleCI --- Plugins/ControlPanel/Assets/ChkValues.php | 5 ++++- Plugins/ControlPanel/CPURLs.php | 2 +- Plugins/ControlPanel/Checksums.php | 1 + Processes/Saturn/AccountManager/Login.php | 2 +- Processes/Saturn/RouteManager/RouteMain.php | 2 +- Processes/Saturn/RouteManager/RoutePages.php | 6 +++--- Processes/Saturn/System.php | 2 +- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Plugins/ControlPanel/Assets/ChkValues.php b/Plugins/ControlPanel/Assets/ChkValues.php index 85ea810..7f0248f 100644 --- a/Plugins/ControlPanel/Assets/ChkValues.php +++ b/Plugins/ControlPanel/Assets/ChkValues.php @@ -1 +1,4 @@ -Select('*', 'user', "`username` = '" . $DB->Escape($_POST['username']) . "'", 'first:object'); +$Result = $DB->Select('*', 'user', "`username` = '".$DB->Escape($_POST['username'])."'", 'first:object'); if ($DB->RowCount() == 1) { if ($CSRF->Check()) { diff --git a/Processes/Saturn/RouteManager/RouteMain.php b/Processes/Saturn/RouteManager/RouteMain.php index 7eef5f1..4319d3c 100644 --- a/Processes/Saturn/RouteManager/RouteMain.php +++ b/Processes/Saturn/RouteManager/RouteMain.php @@ -16,7 +16,7 @@ public function __construct(Router $Router) public function Register(): void { if (WEBSITE_MODE == 1) { - require_once __DIR__ . '/../../DefaultViews/Maintenance.php'; + require_once __DIR__.'/../../DefaultViews/Maintenance.php'; exit; } } diff --git a/Processes/Saturn/RouteManager/RoutePages.php b/Processes/Saturn/RouteManager/RoutePages.php index 39c2a26..4e9af13 100644 --- a/Processes/Saturn/RouteManager/RoutePages.php +++ b/Processes/Saturn/RouteManager/RoutePages.php @@ -17,12 +17,12 @@ public function __construct(Router $Router) public function Register(): void { $DBMS = new DBMS(); - $Page = $DBMS->Query("SELECT * FROM `".DB_PREFIX."pages` WHERE `url` = '".$DBMS->Escape($_SERVER['REQUEST_URI'])."';"); + $Page = $DBMS->Query('SELECT * FROM `'.DB_PREFIX."pages` WHERE `url` = '".$DBMS->Escape($_SERVER['REQUEST_URI'])."';"); - if ($Page !== NULL && $Page->num_rows !== 0) { + if ($Page !== null && $Page->num_rows !== 0) { $this->Router->GET($DBMS->Escape($_SERVER['REQUEST_URI']), 'DefaultViews/Page.php'); } elseif ($DBMS->Escape($_SERVER['REQUEST_URI']) === '/') { - require_once __DIR__ . '/../../DefaultViews/NoHomepage.php'; + require_once __DIR__.'/../../DefaultViews/NoHomepage.php'; exit; } } diff --git a/Processes/Saturn/System.php b/Processes/Saturn/System.php index 436eba5..bc10b29 100644 --- a/Processes/Saturn/System.php +++ b/Processes/Saturn/System.php @@ -12,4 +12,4 @@ // Website environemnts const ENV_PROD = 0; -const ENV_DEV = 1; \ No newline at end of file +const ENV_DEV = 1;