Test Failed
Push — main ( 00747d...5f665f )
by chief
03:00
created
web/public/s/classes/config.inc.php 1 patch
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@  discard block
 block discarded – undo
40 40
             ]
41 41
         );
42 42
         $__server->db_properties->db_connected = true;
43
-    }
44
-    catch(PDOException $e)
43
+    } catch(PDOException $e)
45 44
     {
46 45
         die("An error occured connecting to the database: ".$e->getMessage());
47 46
     }
@@ -55,8 +54,9 @@  discard block
 block discarded – undo
55 54
 
56 55
 	while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
57 56
         $ban_info = $ban;
58
-        if($_SERVER['REQUEST_URI'] != "/ban")
59
-		    header("Location: /ban");
57
+        if($_SERVER['REQUEST_URI'] != "/ban") {
58
+        		    header("Location: /ban");
59
+        }
60 60
 	}
61 61
 
62 62
     /* IP BANS */
@@ -66,8 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
     while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
68 68
         $ban_info = $ban;
69
-        if($_SERVER['REQUEST_URI'] != "/ip_ban")
70
-            header("Location: /ip_ban");
69
+        if($_SERVER['REQUEST_URI'] != "/ip_ban") {
70
+                    header("Location: /ip_ban");
71
+        }
71 72
     }
72 73
 
73 74
     /* NOT RUNNING UNDER CF CHECK */
Please login to merge, or discard this patch.
web/public/channel_discussion.php 1 patch
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,11 +13,13 @@  discard block
 block discarded – undo
13 13
 <?php $__db_h = new db_helper(); ?>
14 14
 <?php $__time_h = new time_helper(); ?>
15 15
 <?php
16
-	if(isset($_SESSION['siteusername']))
17
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
16
+	if(isset($_SESSION['siteusername'])) {
17
+		    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18
+	}
18 19
 
19
-    if(!$__user_h->user_exists($_GET['n']))
20
-        header("Location: /?userdoesntexist");
20
+    if(!$__user_h->user_exists($_GET['n'])) {
21
+            header("Location: /?userdoesntexist");
22
+    }
21 23
 
22 24
     $_user = $__user_h->fetch_user_username($_GET['n']);
23 25
 
@@ -40,10 +42,11 @@  discard block
 block discarded – undo
40 42
     
41 43
         if (
42 44
               ctype_xdigit($colorCode) &&
43
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
44
-                   return true;
45
-    
46
-        else return false;
45
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
46
+                           return true;
47
+        } else {
48
+            return false;
49
+        }
47 50
     }
48 51
 
49 52
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
@@ -76,8 +79,9 @@  discard block
 block discarded – undo
76 79
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
77 80
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
78 81
 
79
-	if(isset($_SESSION['siteusername']))
80
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
82
+	if(isset($_SESSION['siteusername'])) {
83
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
84
+	}
81 85
 
82 86
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
83 87
         $error = array();
@@ -146,8 +150,9 @@  discard block
 block discarded – undo
146 150
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
147 151
 				<?php } ?> 
148 152
 				<?php
149
-					if(empty(trim($_user['bio'])))
150
-						$_user['bio'] = "This user has no description.";
153
+					if(empty(trim($_user['bio']))) {
154
+											$_user['bio'] = "This user has no description.";
155
+					}
151 156
 				?>
152 157
 				<div id="content">
153 158
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
Please login to merge, or discard this patch.
web/public/d/comment_profile.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,9 @@
 block discarded – undo
39 39
         $stmt->execute();
40 40
 
41 41
         $__user_u->update_cooldown_time($request->username, "cooldown_comment");
42
-        if(@$request->username != $_user['author'])
43
-            $__user_i->send_message($request->username, "New profile comment", $_user['username'], "I commented \"" . $request->touser . "\" on your profile!", "", "nt");
42
+        if(@$request->username != $_user['author']) {
43
+                    $__user_i->send_message($request->username, "New profile comment", $_user['username'], "I commented \"" . $request->touser . "\" on your profile!", "", "nt");
44
+        }
44 45
         
45 46
         header("Location: /user/" . $request->touser . "/discussion");
46 47
     } else {
Please login to merge, or discard this patch.
web/public/watch.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
 <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?>
16 16
 <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?>
17 17
 <?php
18
-	if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author'])
19
-		header("Location: /");
18
+	if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) {
19
+			header("Location: /");
20
+	}
20 21
 
21 22
 	$__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]);
22 23
 
@@ -164,11 +165,12 @@  discard block
 block discarded – undo
164 165
 										if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; }
165 166
 
166 167
 										while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { 
167
-											if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0")
168
-												echo "
168
+											if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") {
169
+																							echo "
169 170
 												  <a style='font-size:10px;' href='/user/" .  htmlspecialchars($username['username']) . "'>" . 
170 171
 													htmlspecialchars($username['username']) 
171 172
 												. "</a><br>";
173
+											}
172 174
 										}
173 175
 									?>
174 176
 									<hr>
@@ -790,10 +792,11 @@  discard block
 block discarded – undo
790 792
 														$stmt->execute();
791 793
 
792 794
 														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
793
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
794
-																$comment['liked'] = true;
795
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
796
-																$comment['disliked'] = true;
795
+															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) {
796
+																															$comment['liked'] = true;
797
+															} else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) {
798
+																															$comment['disliked'] = true;
799
+															}
797 800
 																
798 801
 															$comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
799 802
 															$comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false);
Please login to merge, or discard this patch.
web/public/d/channel_update.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -219,8 +219,9 @@  discard block
 block discarded – undo
219 219
         if(!empty($_POST['solidcolor'])) {
220 220
             $__user_u->update_row($_SESSION['siteusername'], "background_option", $_POST['bgoption']);
221 221
 
222
-            if($_POST['bgoption'] == "solid")
223
-                $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
222
+            if($_POST['bgoption'] == "solid") {
223
+                            $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
224
+            }
224 225
 
225 226
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
226 227
         }
@@ -275,8 +276,9 @@  discard block
 block discarded – undo
275 276
                 $_POST['layout_channel'] == "featured"  || 
276 277
                 $_POST['layout_channel'] == "playlists" || 
277 278
                 $_POST['layout_channel'] == "everything"
278
-            )
279
-                $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
279
+            ) {
280
+                            $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
281
+            }
280 282
         }
281 283
 
282 284
     if(!empty($_POST['bgoptionset'])) {
Please login to merge, or discard this patch.