Passed
Push — main ( d723cc...3def04 )
by chief
02:42
created
channel.php 1 patch
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,11 +15,13 @@  discard block
 block discarded – undo
15 15
 <?php $__db_h = new db_helper(); ?>
16 16
 <?php $__time_h = new time_helper(); ?>
17 17
 <?php
18
-	if(isset($_SESSION['siteusername']))
19
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18
+	if(isset($_SESSION['siteusername'])) {
19
+		    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
20
+	}
20 21
 
21
-    if(!$__user_h->user_exists($_GET['n']))
22
-        header("Location: /?userdoesntexist");
22
+    if(!$__user_h->user_exists($_GET['n'])) {
23
+            header("Location: /?userdoesntexist");
24
+    }
23 25
 
24 26
     $_user = $__user_h->fetch_user_username($_GET['n']);
25 27
 
@@ -42,10 +44,11 @@  discard block
 block discarded – undo
42 44
     
43 45
         if (
44 46
               ctype_xdigit($colorCode) &&
45
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
46
-                   return true;
47
-    
48
-        else return false;
47
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
48
+                           return true;
49
+        } else {
50
+            return false;
51
+        }
49 52
     }
50 53
 
51 54
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
@@ -77,8 +80,9 @@  discard block
 block discarded – undo
77 80
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
78 81
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
79 82
 
80
-	if(isset($_SESSION['siteusername']))
81
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
83
+	if(isset($_SESSION['siteusername'])) {
84
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
85
+	}
82 86
 
83 87
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
84 88
         $error = array();
Please login to merge, or discard this patch.
video_manager_ajax.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,10 +85,11 @@
 block discarded – undo
85 85
                 $status = "Unknown";
86 86
             }                      
87 87
             
88
-            if($video['commenting'] == "a") 
89
-                $video['commentstatus'] = "Commenting allowed";
90
-            else 
91
-                $video['commentstatus'] = "Commenting disallowed";
88
+            if($video['commenting'] == "a") {
89
+                            $video['commentstatus'] = "Commenting allowed";
90
+            } else {
91
+                            $video['commentstatus'] = "Commenting disallowed";
92
+            }
92 93
     ?> 
93 94
     <tr style="margin-top: 5px;" id="videoslist">
94 95
         <td class="video-manager-left">
Please login to merge, or discard this patch.
my_videos.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -224,10 +224,11 @@
 block discarded – undo
224 224
                                                 $status = "Unknown";
225 225
                                             }                      
226 226
                                             
227
-                                            if($video['commenting'] == "a") 
228
-                                                $video['commentstatus'] = "Commenting allowed";
229
-                                            else 
230
-                                                $video['commentstatus'] = "Commenting disallowed";
227
+                                            if($video['commenting'] == "a") {
228
+                                                                                            $video['commentstatus'] = "Commenting allowed";
229
+                                            } else {
230
+                                                                                            $video['commentstatus'] = "Commenting disallowed";
231
+                                            }
231 232
                                     ?> 
232 233
                                     <tr style="margin-top: 5px;" id="videoslist">
233 234
                                         <td class="video-manager-left">
Please login to merge, or discard this patch.
favorite_ajax.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,10 +83,11 @@
 block discarded – undo
83 83
                     $status = "Unknown";
84 84
                 }                      
85 85
                 
86
-                if($_video['commenting'] == "a") 
87
-                    $_video['commentstatus'] = "Commenting allowed";
88
-                else 
89
-                    $_video['commentstatus'] = "Commenting disallowed";
86
+                if($_video['commenting'] == "a") {
87
+                                    $_video['commentstatus'] = "Commenting allowed";
88
+                } else {
89
+                                    $_video['commentstatus'] = "Commenting disallowed";
90
+                }
90 91
     ?> 
91 92
     <tr style="margin-top: 5px;" id="videoslist">
92 93
         <td class="video-manager-left">
Please login to merge, or discard this patch.
playlists.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,9 @@
 block discarded – undo
23 23
         $stmt->bind_param("ssss", $_POST['title'], $_POST['comment'], $rid, $_SESSION['siteusername']);
24 24
         $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_';
25 25
         $result = '';
26
-        for ($i = 0; $i < 11; $i++)
27
-            $rid .= $characters[mt_rand(0, 63)];
26
+        for ($i = 0; $i < 11; $i++) {
27
+                    $rid .= $characters[mt_rand(0, 63)];
28
+        }
28 29
         $text = htmlspecialchars($_POST['comment']);
29 30
         $stmt->execute();
30 31
         $stmt->close();
Please login to merge, or discard this patch.
d/post/login.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
 
35 35
         $row = $result->fetch_assoc();
36 36
         if(!isset($row['password'])) 
37
-            { $request->error->message = "Incorrect username or password!"; $request->error->status = ""; } 
38
-        else 
37
+            { $request->error->message = "Incorrect username or password!"; $request->error->status = ""; } else 
39 38
             { $request->returned_password = $row['password']; }
40 39
 
41 40
         if(!password_verify($request->password, $request->returned_password)) 
Please login to merge, or discard this patch.
d/post/upload.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,9 @@
 block discarded – undo
23 23
 ?>
24 24
 <?php
25 25
     $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_';
26
-    for ($i = 0; $i < 11; $i++)
27
-        $rid .= $characters[mt_rand(0, 63)];
26
+    for ($i = 0; $i < 11; $i++) {
27
+            $rid .= $characters[mt_rand(0, 63)];
28
+    }
28 29
 
29 30
     $video_properties = (object) [
30 31
         'video_rid' => $rid,
Please login to merge, or discard this patch.
s/classes/user_helper.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,10 +24,11 @@  discard block
 block discarded – undo
24 24
             $pfp = $row['pfp'];
25 25
         }
26 26
 
27
-        if(!isset($pfp))
28
-            return "default.png";
29
-        else
30
-            return $pfp;
27
+        if(!isset($pfp)) {
28
+                    return "default.png";
29
+        } else {
30
+                    return $pfp;
31
+        }
31 32
 
32 33
         $stmt->close();
33 34
     }
@@ -87,10 +88,11 @@  discard block
 block discarded – undo
87 88
         $result = $stmt->get_result();
88 89
         $user = $result->fetch_assoc();
89 90
 
90
-        if($result->num_rows === 0) 
91
-            return 0;
92
-        else
93
-            return $user;
91
+        if($result->num_rows === 0) {
92
+                    return 0;
93
+        } else {
94
+                    return $user;
95
+        }
94 96
 
95 97
         $stmt->close();
96 98
     }
Please login to merge, or discard this patch.
s/classes/time_manip.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,10 +58,14 @@
 block discarded – undo
58 58
         }
59 59
     
60 60
         if(!isset($cLang)) {
61
-            if (!$full) $string = array_slice($string, 0, 1);
61
+            if (!$full) {
62
+                $string = array_slice($string, 0, 1);
63
+            }
62 64
             return $string ? implode(', ', $string) . ' ago' : 'just now';
63 65
         } else {
64
-            if (!$full) $string = array_slice($string, 0, 1);
66
+            if (!$full) {
67
+                $string = array_slice($string, 0, 1);
68
+            }
65 69
             return $string ? implode($cLang['agoLeft'], $string) . " " . " " . $cLang['agoRight'] : $cLang['justNow'];
66 70
         }
67 71
     }
Please login to merge, or discard this patch.