Passed
Push — master ( 0483c6...e7012a )
by Nicolas
08:54
created
public/php/lib/user_functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                     $random_salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true));
68 68
 
69 69
                     // Create salted password
70
-                    $update_password = hash('sha512', $password . $random_salt);
70
+                    $update_password = hash('sha512', $password.$random_salt);
71 71
 
72 72
                     if ($update_stmt = $mysqli->prepare("UPDATE users
73 73
                         SET password=NULL, sha512_password=?, salt=?WHERE user_id=?")) {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $stmt->bind_result($user_id, $userid, $db_password, $salt, $permission, $avatar_ext, $inactive);
110 110
         $stmt->fetch();
111 111
         // hash the password with the unique salt.
112
-        $password = hash('sha512', $password . $salt);
112
+        $password = hash('sha512', $password.$salt);
113 113
         if ($stmt->num_rows == 1) {
114 114
             // If the user exists we check if the account is locked
115 115
             // from too many login attempts
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                 $userid                   = preg_replace("/[^a-zA-Z0-9_\-]+/", "", $userid);
132 132
                 $_SESSION['userid']       = $userid;
133 133
                 $_SESSION['permission']   = $permission;
134
-                $_SESSION['login_string'] = hash('sha512', $password . $user_browser);
134
+                $_SESSION['login_string'] = hash('sha512', $password.$user_browser);
135 135
                 $_SESSION['image']        = $avatar_ext;
136 136
                 // Login successful.
137 137
                 return true;
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
                     // If the user exists get variables from result.
234 234
                     $stmt->bind_result($password);
235 235
                     $stmt->fetch();
236
-                    $login_check = hash('sha512', $password . $user_browser);
236
+                    $login_check = hash('sha512', $password.$user_browser);
237 237
 
238 238
                     if ($login_check == $login_string) {
239 239
                         // Logged In!!!!
Please login to merge, or discard this patch.
public/php/admin/interviews/db_interview.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 //include("../../config/admin_rights.php"); /*--> We can not use it like this because of the ajax.
24 24
 // redirecting does not work correctly with the inheritance of Ajax.
25 25
 
26
-require_once __DIR__."/../../lib/Db.php" ;
26
+require_once __DIR__."/../../lib/Db.php";
27 27
 
28 28
 if (isset($action) and $action == "stop") {
29 29
     echo "test";
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 //If we are uploading new screenshots
38 38
 if (isset($action2) and $action2 == 'add_screens') {
39
-    if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') {
39
+    if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') {
40 40
         //Here we'll be looping on each of the inputs on the page that are filled in with an image!
41 41
         $image = $_FILES['image'];
42 42
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     $smarty->assign('interview_id', $interview_id);
148 148
 
149 149
     //Send to smarty for return value
150
-    $smarty->display("file:" . $cpanel_template_folder . "interviews/ajax_interview_add_screenshots.html");
150
+    $smarty->display("file:".$cpanel_template_folder."interviews/ajax_interview_add_screenshots.html");
151 151
 }
152 152
 
153 153
 //*************************************************************************
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
 //If the delete comment has been triggered
205 205
 if (isset($action) and $action == 'delete_screenshot_comment') {
206
-    if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') {
206
+    if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') {
207 207
         $sql_interviewshot = $mysqli->query("SELECT * FROM screenshot_interview
208 208
                               WHERE interview_id = $interview_id
209 209
                         AND screenshot_id = $screenshot_id") or die("Database error - selecting screenshots interview");
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     $smarty->assign('interview_id', $interview_id);
284 284
 
285 285
     //Send to smarty for return value
286
-    $smarty->display("file:" . $cpanel_template_folder . "interviews/ajax_interview_add_screenshots.html");
286
+    $smarty->display("file:".$cpanel_template_folder."interviews/ajax_interview_add_screenshots.html");
287 287
 }
288 288
 
289 289
 //*************************************************************************
Please login to merge, or discard this patch.
public/php/admin/interviews/interviews_edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         'interview_chapters' => $interview['interview_chapters'],
67 67
         'interview_text' => $interview['interview_text'],
68 68
         'interview_ind_name' => $interview['ind_name'],
69
-        'interview_author' => $author_id ,
69
+        'interview_author' => $author_id,
70 70
         'interview_author_name' => $interview['userid'],
71 71
         'interview_ind_id' => $interview['ind_id'],
72 72
         'interview_draft' => $interview['draft'],
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 $smarty->assign("user_id", $_SESSION['user_id']);
111 111
 
112 112
 //Send all smarty variables to the templates
113
-$smarty->display("file:" . $cpanel_template_folder . "interviews/interviews_edit.html");
113
+$smarty->display("file:".$cpanel_template_folder."interviews/interviews_edit.html");
114 114
 
115 115
 //close the connection
116 116
 mysqli_close($mysqli);
Please login to merge, or discard this patch.
public/php/admin/games/ajax_game_search.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             //Game names can only be 40 chars long
271 271
             if (strlen($sql_game_search['game_name']) > 40) {
272 272
                 $game_name = substr($sql_game_search['game_name'], 0, 40);
273
-                $game_name = $game_name . '...';
273
+                $game_name = $game_name.'...';
274 274
             } else {
275 275
                 $game_name = $sql_game_search['game_name'];
276 276
             }
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             //publishers can only be 18 chars long
279 279
             if ($sql_game_search['publisher_name'] !== null && strlen($sql_game_search['publisher_name']) > 18) {
280 280
                 $pub_name = substr($sql_game_search['publisher_name'], 0, 18);
281
-                $pub_name = $pub_name . '...';
281
+                $pub_name = $pub_name.'...';
282 282
             } else {
283 283
                 $pub_name = $sql_game_search['publisher_name'];
284 284
             }
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             //developers can only be 18 chars long
287 287
             if ($sql_game_search['developer_name'] !== null && strlen($sql_game_search['developer_name']) > 18) {
288 288
                 $dev_name = substr($sql_game_search['developer_name'], 0, 18);
289
-                $dev_name = $dev_name . '...';
289
+                $dev_name = $dev_name.'...';
290 290
             } else {
291 291
                 $dev_name = $sql_game_search['developer_name'];
292 292
             }
@@ -312,10 +312,10 @@  discard block
 block discarded – undo
312 312
         $smarty->assign("user_id", $_SESSION['user_id']);
313 313
 
314 314
         //Send all smarty variables to the templates
315
-        $smarty->display("file:" . $cpanel_template_folder . "games/ajax_game_search.html");
315
+        $smarty->display("file:".$cpanel_template_folder."games/ajax_game_search.html");
316 316
     } else {
317 317
         // If there are no search results
318 318
         $smarty->assign("nr_of_games", 'none');
319
-        $smarty->display("file:" . $cpanel_template_folder . "games/ajax_game_search.html");
319
+        $smarty->display("file:".$cpanel_template_folder."games/ajax_game_search.html");
320 320
     }
321 321
 }
Please login to merge, or discard this patch.
public/php/common/Model/Database/ChangeLog.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
         "Downloads" => array("Crew", "Details", "TOS"),
23 23
         "Format" => array("Format"),
24 24
         "Game series" => array("Game", "Series"),
25
-        "Games" => array("AKA", "Box back", "Box front", "Comment","Creator",
26
-            "Developer", "Fact", "File", "Mag score", "Music","Game", "Publisher",
25
+        "Games" => array("AKA", "Box back", "Box front", "Comment", "Creator",
26
+            "Developer", "Fact", "File", "Mag score", "Music", "Game", "Publisher",
27 27
             "Review", "Review comment", "Screenshot", "Similar", "Submission", "Year",
28 28
             "Release", "Sound hardware", "Video", "Vs"
29 29
         ),
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $this->id = $id;
71 71
 
72 72
         // Check if the section is valid
73
-        if (! array_key_exists($section, self::SECTIONS)) {
73
+        if (!array_key_exists($section, self::SECTIONS)) {
74 74
             die("Unknown section '$section'. Only "
75 75
                 .join(", ", array_keys(self::SECTIONS))." are supported");
76 76
         }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $this->section_value = $section_value;
80 80
 
81 81
         // Check is the sub-section is valid for the section
82
-        if (! in_array($sub_section, self::SECTIONS[$section])) {
82
+        if (!in_array($sub_section, self::SECTIONS[$section])) {
83 83
             die("Unknown sub-section '$sub_section'. Only "
84 84
                 .join(", ", self::SECTIONS[$section])." are supported for $section");
85 85
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $this->user_id = $user_id;
91 91
 
92 92
         // Check if the action is valid
93
-        if (! in_array($action, self::ACTIONS)) {
93
+        if (!in_array($action, self::ACTIONS)) {
94 94
             die("Unknown action '$action'. Only ".self::ACTIONS." are supported");
95 95
         }
96 96
         $this->action = $action;
Please login to merge, or discard this patch.