Passed
Push — master ( f3e91e...f82432 )
by Maxwell
03:14 queued 48s
created
updateinfo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@
 block discarded – undo
17 17
             $stmt->bind_param("si", $_SESSION['user'], $_GET['id']);
18 18
             $stmt->execute();
19 19
             $result = $stmt->get_result();
20
-            if($result->num_rows === 0) die('Item doesnt exist or item isnt made by you.');
20
+            if($result->num_rows === 0) {
21
+                die('Item doesnt exist or item isnt made by you.');
22
+            }
21 23
         } else {
22 24
             header("Location: index.php");
23 25
         }
Please login to merge, or discard this patch.
home.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@
 block discarded – undo
9 9
             $stmt->bind_param("s", $_SESSION['user']);
10 10
             $stmt->execute();
11 11
             $result = $stmt->get_result();
12
-            if($result->num_rows === 0) header('Location: index.php');
12
+            if($result->num_rows === 0) {
13
+                header('Location: index.php');
14
+            }
13 15
             while($row = $result->fetch_assoc()) {
14 16
                 $username = $row['username'];
15 17
                 $id = $row['id'];
Please login to merge, or discard this patch.
important/header.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
         $stmt->execute();
6 6
         $result = $stmt->get_result();
7 7
     
8
-        if($result->num_rows == 0) echo('welcome to gamestop how may i help you');
8
+        if($result->num_rows == 0) {
9
+            echo('welcome to gamestop how may i help you');
10
+        }
9 11
     }
10 12
 ?>
11 13
 
Please login to merge, or discard this patch.
adminpanel/index.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@  discard block
 block discarded – undo
33 33
     $stmt = $conn->prepare("SELECT * FROM files WHERE status = 'n'");
34 34
     $stmt->execute();
35 35
     $result = $stmt->get_result();
36
-    if($result->num_rows === 0) echo('There are no items waiting for approval.');
36
+    if($result->num_rows === 0) {
37
+        echo('There are no items waiting for approval.');
38
+    }
37 39
     while($row = $result->fetch_assoc()) {
38 40
         echo "" . $row['title'] . " by " . $row['author'] . " @ " . $row['date'] . " | <a href='approve.php?id=" . $row['id'] . "'>Approve</a> | <a href='deny.php?id=" . $row['id'] . "'>Deny</a><br>";
39 41
     }
@@ -45,7 +47,9 @@  discard block
 block discarded – undo
45 47
     $stmt = $conn->prepare("SELECT * FROM users ORDER BY id DESC");
46 48
     $stmt->execute();
47 49
     $result = $stmt->get_result();
48
-    if($result->num_rows === 0) echo('There are no items waiting for approval.');
50
+    if($result->num_rows === 0) {
51
+        echo('There are no items waiting for approval.');
52
+    }
49 53
     while($row = $result->fetch_assoc()) {
50 54
         echo "<a href='/index.php?id=" . $row['id'] . "'>" . $row['username'] . "</a> | <a href='ban.php?id=" . $row['id'] . "'>Ban</a><br>";
51 55
     }
Please login to merge, or discard this patch.
adminpanel/dependencies.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@
 block discarded – undo
7 7
     $stmt->bind_param("s", $user);
8 8
     $stmt->execute();
9 9
     $result = $stmt->get_result();
10
-    if($result->num_rows === 0) return "user doesn't exist";
10
+    if($result->num_rows === 0) {
11
+        return "user doesn't exist";
12
+    }
11 13
     while($row = $result->fetch_assoc()) {
12 14
         if($row['rank'] == "Admin" || $row['rank'] == "Owner") {
13 15
             return "admin";
Please login to merge, or discard this patch.
view/index.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@  discard block
 block discarded – undo
12 12
                 $stmt->bind_param("i", $_GET['id']);
13 13
                 $stmt->execute();
14 14
                 $result = $stmt->get_result();
15
-                if($result->num_rows === 0) echo('There are no users.');
15
+                if($result->num_rows === 0) {
16
+                    echo('There are no users.');
17
+                }
16 18
                 while($row = $result->fetch_assoc()) {
17 19
                     $author = $row['author'];
18 20
                     $id = $row['id'];
@@ -215,12 +217,13 @@  discard block
 block discarded – undo
215 217
             <form method="post" enctype="multipart/form-data" id="submitform">
216 218
                 <textarea required cols="77" placeholder="Comment" name="comment"></textarea><br>
217 219
                 <input type="submit" value="Post" <?php 
218
-                  if ($config['use_recaptcha']) 
219
-                    echo 'class="g-recaptcha" data-sitekey="' . $config['recaptcha_sitekey'] . '" data-callback="onSubmit"'
220
+                  if ($config['use_recaptcha']) {
221
+                                      echo 'class="g-recaptcha" data-sitekey="' . $config['recaptcha_sitekey'] . '" data-callback="onSubmit"'
220 222
                 ?>> <small>max limit: 500 characters | supports <a href="https://www.markdownguide.org/basic-syntax">Markdown</a></small>
221 223
             </form>
222 224
             <?php
223 225
                 $stmt = $conn->prepare("SELECT * FROM `gamecomments` WHERE toid = ? ORDER BY id DESC");
226
+                  }
224 227
                 $stmt->bind_param("s", $_GET['id']);
225 228
                 $stmt->execute();
226 229
                 $result = $stmt->get_result();
Please login to merge, or discard this patch.
view/group.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@  discard block
 block discarded – undo
50 50
                     $stmt->bind_param("i", $_GET['id']);
51 51
                     $stmt->execute();
52 52
                     $result = $stmt->get_result();
53
-                    if($result->num_rows === 0) echo('Group doesnt exist.');
53
+                    if($result->num_rows === 0) {
54
+                        echo('Group doesnt exist.');
55
+                    }
54 56
                     while($row = $result->fetch_assoc()) {
55 57
                         $id = $row['id'];
56 58
                         ?>
@@ -80,7 +82,9 @@  discard block
 block discarded – undo
80 82
                     $stmt->bind_param("i", $id);
81 83
                     $stmt->execute();
82 84
                     $result = $stmt->get_result();
83
-                    if($result->num_rows === 0) echo('There are no users.');
85
+                    if($result->num_rows === 0) {
86
+                        echo('There are no users.');
87
+                    }
84 88
                     $members = 0;
85 89
                     while($row = $result->fetch_assoc()) {
86 90
                         $members++;
Please login to merge, or discard this patch.
index.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,9 @@
 block discarded – undo
99 99
                             $stmt = $conn->prepare("SELECT * FROM users ORDER BY id DESC");
100 100
                             $stmt->execute();
101 101
                             $result = $stmt->get_result();
102
-                            if($result->num_rows === 0) echo('There are no users.');
102
+                            if($result->num_rows === 0) {
103
+                                echo('There are no users.');
104
+                            }
103 105
                             while($row = $result->fetch_assoc()) {
104 106
                                 $id = 1;
105 107
                                 echo "<div class='item" . $id . "'><img style='height: 8em;width: 8em;' src='/dynamic/pfp/" . getPFP($row['username'], $conn) . "'><br><a href='/view/profile?id=" . $row['id'] . "'>" . $row['username'] . "</a></div>";
Please login to merge, or discard this patch.
view/groups.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,9 @@
 block discarded – undo
18 18
                 $stmt = $conn->prepare("SELECT * FROM `groups` ORDER BY id DESC");
19 19
                 $stmt->execute();
20 20
                 $result = $stmt->get_result();
21
-                if($result->num_rows === 0) echo('There are no users.');
21
+                if($result->num_rows === 0) {
22
+                    echo('There are no users.');
23
+                }
22 24
                 while($row = $result->fetch_assoc()) {
23 25
                     echo "<img style='position: absolute;border: 1px solid white; width: 5em;' src='/dynamic/pfp/" . getPFP($row['author'], $conn) . "'>
24 26
                     <small>
Please login to merge, or discard this patch.