Test Failed
Push — main ( 8ba42a...e78405 )
by chief
02:52
created
web/public/channel.php 1 patch
Braces   +18 added lines, -13 removed lines patch added patch discarded remove patch
@@ -12,11 +12,13 @@  discard block
 block discarded – undo
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14 14
 <?php
15
-	if(isset($_SESSION['siteusername']))
16
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
15
+	if(isset($_SESSION['siteusername'])) {
16
+		    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17
+	}
17 18
 
18
-    if(!$__user_h->user_exists($_GET['n']))
19
-        header("Location: /?userdoesntexist");
19
+    if(!$__user_h->user_exists($_GET['n'])) {
20
+            header("Location: /?userdoesntexist");
21
+    }
20 22
 
21 23
     $_user = $__user_h->fetch_user_username($_GET['n']);
22 24
 
@@ -39,10 +41,11 @@  discard block
 block discarded – undo
39 41
     
40 42
         if (
41 43
               ctype_xdigit($colorCode) &&
42
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
43
-                   return true;
44
-    
45
-        else return false;
44
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
45
+                           return true;
46
+        } else {
47
+            return false;
48
+        }
46 49
     }
47 50
 
48 51
     $_user['subscribers'] = $__user_h->fetch_subs_count($_user['username']);
@@ -74,8 +77,9 @@  discard block
 block discarded – undo
74 77
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
75 78
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
76 79
 
77
-	if(isset($_SESSION['siteusername']))
78
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
80
+	if(isset($_SESSION['siteusername'])) {
81
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
82
+	}
79 83
 
80 84
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
81 85
         $error = array();
@@ -151,8 +155,9 @@  discard block
 block discarded – undo
151 155
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
152 156
 				<?php } ?>
153 157
 				<?php
154
-					if(empty(trim($_user['bio'])))
155
-						$_user['bio'] = "This user has no description.";
158
+					if(empty(trim($_user['bio']))) {
159
+											$_user['bio'] = "This user has no description.";
160
+					}
156 161
 				?>
157 162
 				<div id="content">
158 163
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
@@ -235,7 +240,7 @@  discard block
 block discarded – undo
235 240
 												<div class="header-stats">
236 241
 													<div class="stat-entry">
237 242
 														<span class="stat-value"><?php echo $_user['subscribers']; ?></span>
238
-														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span>
243
+														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php } else{ ?>subscribers<?php } ?></span>
239 244
 													</div>
240 245
 													<div class="stat-entry">
241 246
 														<span class="stat-value"><?php echo $_user['views']; ?></span>
Please login to merge, or discard this patch.
web/public/s/mod/channel_customization.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -313,14 +313,15 @@
 block discarded – undo
313 313
                             for($i = 0;$i <= $countryLength; $i++)
314 314
                             {
315 315
                                 $c = $countries[$i];
316
-                                if ($c == $_user['country'])
317
-                                //country is the same as in database
316
+                                if ($c == $_user['country']) {
317
+                                                                //country is the same as in database
318 318
                                 {
319 319
                                 ?>
320
-                                <option value="<?php echo $c; ?>" selected="selected"><?php echo $c; ?></option>
321
-                                <?php
320
+                                <option value="<?php echo $c;
322 321
                                 }
323
-                                else
322
+                                ?>" selected="selected"><?php echo $c; ?></option>
323
+                                <?php
324
+                                } else
324 325
                                 {
325 326
                                 ?>
326 327
                                 <option value="<?php echo $c;?>"><?php echo $c; ?></option>
Please login to merge, or discard this patch.
web/public/results.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -253,8 +253,9 @@
 block discarded – undo
253 253
                                  </div>
254 254
                               </li>
255 255
                         <?php } ?>
256
-                        <?php if($request->search_amount == 0)
256
+                        <?php if($request->search_amount == 0) {
257 257
                            echo "Your search query has brought no results.<br><br>";
258
+}
258 259
                         ?>
259 260
                      </ol>
260 261
                   </div>
Please login to merge, or discard this patch.
web/public/comment_voting.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,11 +14,13 @@
 block discarded – undo
14 14
     "action" => "l" /* fallback */
15 15
 ];
16 16
 
17
-if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) 
18
-    header('Location: ' . $_SERVER['HTTP_REFERER']); 
17
+if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) {
18
+    header('Location: ' . $_SERVER['HTTP_REFERER']);
19
+}
19 20
 
20
-if(isset($_GET['a']) && $_GET['a'] == "-1") 
21
+if(isset($_GET['a']) && $_GET['a'] == "-1") {
21 22
     $request->action = "d";
23
+}
22 24
 
23 25
 $stmt = $__db->prepare("SELECT * FROM comment_likes WHERE sender = :username AND reciever = :reciever AND type = 'l'");
24 26
 $stmt->bindParam(":username", $_SESSION['siteusername']);
Please login to merge, or discard this patch.
web/public/d/channel_update.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,8 +197,9 @@
 block discarded – undo
197 197
         if(!empty($_POST['solidcolor'])) {
198 198
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
199 199
 
200
-            if($_POST['bgoption'] == "solid")
201
-                $__user_u->update_row($_SESSION['siteusername'], "2009_bg", "");
200
+            if($_POST['bgoption'] == "solid") {
201
+                            $__user_u->update_row($_SESSION['siteusername'], "2009_bg", "");
202
+            }
202 203
 
203 204
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
204 205
         }
Please login to merge, or discard this patch.
web/public/watch.php 1 patch
Braces   +8 added lines, -6 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(isset($_SESSION['siteusername']))
19
-		$__video_h->check_view($_GET['v'], @$_SESSION['siteusername']);
18
+	if(isset($_SESSION['siteusername'])) {
19
+			$__video_h->check_view($_GET['v'], @$_SESSION['siteusername']);
20
+	}
20 21
 
21 22
 	$_SESSION['current_video'] = $_video['rid'];
22 23
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
@@ -735,10 +736,11 @@  discard block
 block discarded – undo
735 736
 														$stmt->execute();
736 737
 
737 738
 														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
738
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
739
-																$comment['liked'] = true;
740
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
741
-																$comment['disliked'] = true;
739
+															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) {
740
+																															$comment['liked'] = true;
741
+															} else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) {
742
+																															$comment['disliked'] = true;
743
+															}
742 744
 																
743 745
 															$comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
744 746
 															$comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false);
Please login to merge, or discard this patch.