Skip to content

Commit

Permalink
Merge pull request #117 from PixelsetDev/analysis-wO11lo
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
lewmilburn authored Jun 2, 2024
2 parents 5a0664f + d3d4b44 commit cca59c0
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
5 changes: 4 additions & 1 deletion Plugins/ControlPanel/Assets/ChkValues.php
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<?php $Checksum['CoreSettings'] = '1016dd99a95446af7cbfc00b99ec8102c86d76da54515cbed96cccfa9c43d4167db5be5b234ddf82c4162d138545d5a0944b53c55f3ce3f1510b95c2eba2b25d'; $Checksum['CoreDeveloper'] = 'd8ac0d6566de0980d2853e6b8e403e533cc2b8dd3b37e54f2f2883300302973f887aefee47c12bd8c28533c6ca741bb82a018288c782a623f990698dd4455f88';
<?php

$Checksum['CoreSettings'] = '1016dd99a95446af7cbfc00b99ec8102c86d76da54515cbed96cccfa9c43d4167db5be5b234ddf82c4162d138545d5a0944b53c55f3ce3f1510b95c2eba2b25d';
$Checksum['CoreDeveloper'] = 'd8ac0d6566de0980d2853e6b8e403e533cc2b8dd3b37e54f2f2883300302973f887aefee47c12bd8c28533c6ca741bb82a018288c782a623f990698dd4455f88';
2 changes: 1 addition & 1 deletion Plugins/ControlPanel/CPURLs.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
const CPPAGE_LOGIN = '../Plugins/ControlPanel/Views/Login.php';
const CPPAGE_REGISTER = '../Plugins/ControlPanel/Views/Join.php';
const CPPAGE_LOGOUT = '../Plugins/ControlPanel/Views/Logout.php';
const CPPAGE_ACCOUNT = '../Plugins/ControlPanel/Views/Account.php';
const CPPAGE_ACCOUNT = '../Plugins/ControlPanel/Views/Account.php';
1 change: 1 addition & 0 deletions Plugins/ControlPanel/Checksums.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public function Validate()
if ($Checksum['CoreDeveloper'] !== $CoreDeveloper) {
return false;
}

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion Processes/Saturn/AccountManager/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$DB = new DBMS();
$CSRF = new CSRF();

$Result = $DB->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()) {
Expand Down
2 changes: 1 addition & 1 deletion Processes/Saturn/RouteManager/RouteMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
6 changes: 3 additions & 3 deletions Processes/Saturn/RouteManager/RoutePages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Processes/Saturn/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

// Website environemnts
const ENV_PROD = 0;
const ENV_DEV = 1;
const ENV_DEV = 1;

0 comments on commit cca59c0

Please sign in to comment.