Passed
Push — master ( 0483c6...e7012a )
by Nicolas
08:54
created
public/php/common/DAO/MediaDAO.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Dump/Media.php" ;
6
-require_once __DIR__."/../Model/Dump/MediaType.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Dump/Media.php";
6
+require_once __DIR__."/../Model/Dump/MediaType.php";
7 7
 
8 8
 /**
9 9
  * DAO for Media
Please login to merge, or discard this patch.
public/php/common/DAO/EmulatorDAO.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Game/Emulator.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/Emulator.php";
6 6
 
7 7
 /**
8 8
  * DAO for Emulators
Please login to merge, or discard this patch.
public/php/common/DAO/SystemDAO.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Game/System.php" ;
6
-require_once __DIR__."/../Model/Game/Enhancement.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/System.php";
6
+require_once __DIR__."/../Model/Game/Enhancement.php";
7 7
 
8 8
 /**
9 9
  * DAO for systems
Please login to merge, or discard this patch.
public/php/common/DAO/MediaTypeDAO.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Dump/MediaType.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Dump/MediaType.php";
6 6
 
7 7
 /**
8 8
  * DAO for Media Type
Please login to merge, or discard this patch.
public/php/common/DAO/ResolutionDAO.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Game/Resolution.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/Resolution.php";
6 6
 
7 7
 /**
8 8
  * DAO for resolutions
Please login to merge, or discard this patch.
public/php/common/DAO/ControlDAO.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Game/Control.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/Control.php";
6 6
 
7 7
 /**
8 8
  * DAO for game controls
Please login to merge, or discard this patch.
public/php/common/login/user_process_logout.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 //$params = session_get_cookie_params();
28 28
 
29 29
 // Delete the actual cookie.
30
-setcookie("cooksession", session_id(), time()-60*60*24*100, "/");
30
+setcookie("cooksession", session_id(), time() - 60 * 60 * 24 * 100, "/");
31 31
 
32 32
 // Destroy session
33 33
 session_destroy();
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     header('Location: ../../main/front/front.php');
38 38
 } else {
39 39
     $_SESSION['edit_message'] = "Log out succesfull";
40
-    header('Location: ' . $_SERVER['HTTP_REFERER']);
40
+    header('Location: '.$_SERVER['HTTP_REFERER']);
41 41
 }
42 42
 
43 43
 mysql_close();
Please login to merge, or discard this patch.
public/php/common/login/db_reset.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 
19 19
 include("../../config/common.php");
20 20
 
21
-require_once __DIR__."/../../common/Model/Database/ChangeLog.php" ;
22
-require_once __DIR__."/../../common/DAO/ChangeLogDAO.php" ;
21
+require_once __DIR__."/../../common/Model/Database/ChangeLog.php";
22
+require_once __DIR__."/../../common/DAO/ChangeLogDAO.php";
23 23
 
24 24
 use PHPMailer\PHPMailer\PHPMailer;
25 25
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     } else {
36 36
         //check if the email addres is valid
37 37
         if (!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) {
38
-            $_SESSION['edit_message'] =  "Invalid email format";
38
+            $_SESSION['edit_message'] = "Invalid email format";
39 39
             header("Location: ../../main/front/front.php?action=reset");
40 40
         } else {
41 41
             //check if email address exists in DB
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             $number = $query_rows->num_rows;
44 44
 
45 45
             if ($number == 0) {
46
-                $_SESSION['edit_message'] =  "There is no user with this email address in our DB - "
46
+                $_SESSION['edit_message'] = "There is no user with this email address in our DB - "
47 47
                     ."Please contact the admins";
48 48
                 header("Location: ../../main/front/front.php?action=reset");
49 49
             } else { //lets create an email
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
                 $mailbody = "Dear user,\n\nIf this e-mail does not apply to you please ignore it. It appears that "
101 101
                     ."you have requested a password reset at our website www.atarilegend.com\n\nTo reset your password,"
102 102
                     ." please click the link below. If you cannot click it, please paste it into your web browser's "
103
-                    ."address bar.\n\n" . $pwrurl . "\n\nThanks,\nTEAM AL";
103
+                    ."address bar.\n\n".$pwrurl."\n\nThanks,\nTEAM AL";
104 104
 
105
-                $mail->Body    = $mailbody;
105
+                $mail->Body = $mailbody;
106 106
 
107 107
                 try {
108 108
                     $mail->send();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
     //check if the email addres is valid
132 132
     if (!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) {
133
-        $_SESSION['edit_message'] =  "Invalid email format";
133
+        $_SESSION['edit_message'] = "Invalid email format";
134 134
         header("Location: ../../main/front/front.php?action=new_pwd&q=$hash");
135 135
     } else {
136 136
         //check if email address exists in DB
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
         $number = $query_rows->num_rows;
139 139
 
140 140
         if ($number == 0) {
141
-            $_SESSION['edit_message'] =  "There is no user with this email address in our DB - "
141
+            $_SESSION['edit_message'] = "There is no user with this email address in our DB - "
142 142
                 ."Please contact the admins";
143 143
             header("Location: ../../main/front/front.php?action=new_pwd&q=$hash");
144 144
         } else {
145 145
             if ($password != $confirmpassword) {
146
-                $_SESSION['edit_message'] =  "The passwords you entered are not the same - please try again";
146
+                $_SESSION['edit_message'] = "The passwords you entered are not the same - please try again";
147 147
                 header("Location: ../../main/front/front.php?action=new_pwd&q=$hash");
148 148
             } else {
149 149
                 //get the userid
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
                 // Does the new reset key match the old one?
158 158
                 if ($resetkey == $hash) {
159 159
                     //now check if this hash exists
160
-                    $twentyfour_hours = time()-(60*1440);
160
+                    $twentyfour_hours = time() - (60 * 1440);
161 161
                     $query_time = $mysqli->query("select * from users_reset where password = '$resetkey'")
162 162
                         or die("problem getting time from the users_reset table");
163 163
                     $number_hash = $query_time->num_rows;
164 164
 
165 165
                     if ($number_hash == 0) {
166
-                        $_SESSION['edit_message'] =  "Something went wrong - validation not possible, contact the "
166
+                        $_SESSION['edit_message'] = "Something went wrong - validation not possible, contact the "
167 167
                             ."admins or try a new password request";
168 168
                         header("Location: ../../main/front/front.php");
169 169
                     } else {
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
                             $random_salt = hash(
177 177
                                 'sha512',
178 178
                                 uniqid(mt_rand(1, mt_getrandmax()), true)
179
-                            );//create random salt
180
-                            $update_password = hash('sha512', $sha512 . $random_salt); // Create salted password
179
+                            ); //create random salt
180
+                            $update_password = hash('sha512', $sha512.$random_salt); // Create salted password
181 181
                             $timestamp = time();
182 182
 
183 183
                             $sdbquery = $mysqli->query("UPDATE users SET password = '$md5pass',
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                                 header("Location: ../../main/front/front.php");
214 214
                             }
215 215
                         } else {
216
-                            $_SESSION['edit_message'] =  "Something went wrong - hash password request expired, try a "
216
+                            $_SESSION['edit_message'] = "Something went wrong - hash password request expired, try a "
217 217
                                 ."new password request";
218 218
 
219 219
                             //delete the hash from the user_reset table so a new reset can be done
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                         }
225 225
                     }
226 226
                 } else {
227
-                    $_SESSION['edit_message'] =  "Something went wrong - Did you enter the correct email addres?";
227
+                    $_SESSION['edit_message'] = "Something went wrong - Did you enter the correct email addres?";
228 228
                     header("Location: ../../main/front/front.php?action=new_pwd&q=$hash");
229 229
                 }
230 230
             }
Please login to merge, or discard this patch.
public/php/common/login/user_process_login.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             //$params = session_get_cookie_params();
47 47
 
48 48
             // Delete the actual cookie.
49
-            setcookie("cooksession", session_id(), time()+60*60*24*100, "/");
49
+            setcookie("cooksession", session_id(), time() + 60 * 60 * 24 * 100, "/");
50 50
             $session_id = session_id();
51 51
 
52 52
             //update the table with the session id
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         }
57 57
         //header('Location: ../../main/front/front.php');
58 58
         $_SESSION['edit_message'] = "Login successful";
59
-        header('Location: ' . $_SERVER['HTTP_REFERER']);
59
+        header('Location: '.$_SERVER['HTTP_REFERER']);
60 60
     } else {
61 61
         // Login failed
62 62
         // check the cause - is the user inactive?
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
         if ($query_inactive['inactive'] == 1) {
66 66
             //header('Location: ../../main/front/front.php?error=2');
67 67
             $_SESSION['edit_message'] = 'User is set inactive - contact admin';
68
-            header('Location: ' . $_SERVER['HTTP_REFERER']);
68
+            header('Location: '.$_SERVER['HTTP_REFERER']);
69 69
         } else {
70 70
             $_SESSION['edit_message'] = 'Usn or pwd incorrect - Please try again';
71
-            header('Location: ' . $_SERVER['HTTP_REFERER']);
71
+            header('Location: '.$_SERVER['HTTP_REFERER']);
72 72
             //header('Location: ../../main/front/front.php?error=1');
73 73
         }
74 74
     }
@@ -76,5 +76,5 @@  discard block
 block discarded – undo
76 76
     // The correct POST variables were not sent to this page.
77 77
     //header('Location: ../../main/front/front.php?error=1');
78 78
     $_SESSION['edit_message'] = 'Usn or pwd incorrect - Please try again';
79
-    header('Location: ' . $_SERVER['HTTP_REFERER']);
79
+    header('Location: '.$_SERVER['HTTP_REFERER']);
80 80
 }
Please login to merge, or discard this patch.