Test Failed
Pull Request — main (#21)
by
unknown
02:57
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.