Test Failed
Pull Request — main (#32)
by
unknown
02:53
created
web/public/s/mod/sidebar.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
 <div id="browse-side-column" class="ytg-2col ytg-last">
41 41
     <ol class="navigation-menu">
42 42
         <?php foreach($__tabs as $_tab) { 
43
-            if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) != $_tab->url)
44
-                $_tab->selected = true;
43
+            if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) != $_tab->url) {
44
+                            $_tab->selected = true;
45
+            }
45 46
             ?>
46 47
             <li class="menu-item">
47 48
                 <a class="<?php echo $_tab->selected ? true : "selected"; ?>" href="<?php echo $_tab->url; ?>">
Please login to merge, or discard this patch.
web/public/uploaded_video.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,8 +12,9 @@  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(!$__video_h->video_exists($_GET['v']))
16
-		header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag.");
15
+	if(!$__video_h->video_exists($_GET['v'])) {
16
+			header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag.");
17
+	}
17 18
 
18 19
 	$_video = $__video_h->fetch_video_rid($_GET['v']); 
19 20
 	$_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
@@ -24,9 +25,10 @@  discard block
 block discarded – undo
24 25
 	$_video['title'] = htmlspecialchars($_video['title']);
25 26
 	$_video['description'] = $__video_h->shorten_description($_video['description'], 50);
26 27
 
27
-    if($_SESSION['siteusername'] != $_video['author'])
28
-        header("Location: /");
29
-?>
28
+    if($_SESSION['siteusername'] != $_video['author']) {
29
+            header("Location: /");
30
+    }
31
+    ?>
30 32
 <?php
31 33
 	$__server->page_embeds->page_title = "SubRocks - Uploaded Video";
32 34
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
Please login to merge, or discard this patch.
web/public/report.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,8 +8,9 @@
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-if(!isset($_SESSION['siteusername']))
11
+if(!isset($_SESSION['siteusername'])) {
12 12
     header('Location: ' . $_SERVER['HTTP_REFERER'] . '&error=You have to be logged in to report videos.');
13
+}
13 14
 
14 15
 $_video = $__video_h->fetch_video_rid($_GET['v']);
15 16
 $webhookurl = $__server->discord_webhook;
Please login to merge, or discard this patch.
web/public/s/mod/old_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/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['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_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();
@@ -188,8 +192,9 @@  discard block
 block discarded – undo
188 192
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
189 193
 				<?php } ?>
190 194
 				<?php
191
-					if(empty(trim($_user['bio'])))
192
-						$_user['bio'] = "This user has no description.";
195
+					if(empty(trim($_user['bio']))) {
196
+											$_user['bio'] = "This user has no description.";
197
+					}
193 198
 				?>
194 199
 				<div id="content">
195 200
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
@@ -272,7 +277,7 @@  discard block
 block discarded – undo
272 277
 												<div class="header-stats">
273 278
 													<div class="stat-entry">
274 279
 														<span class="stat-value"><?php echo $_user['subscribers']; ?></span>
275
-														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span>
280
+														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php } else{ ?>subscribers<?php } ?></span>
276 281
 													</div>
277 282
 													<div class="stat-entry">
278 283
 														<span class="stat-value"><?php echo $_user['views']; ?></span>
Please login to merge, or discard this patch.
web/public/s/mod/sidebar_admin.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
 <div id="browse-side-column" class="ytg-2col ytg-last">
41 41
     <ol class="navigation-menu">
42 42
         <?php foreach($__tabs as $_tab) { 
43
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
44
-                $_tab->selected = true;
43
+            if($_SERVER['REQUEST_URI'] != $_tab->url) {
44
+                            $_tab->selected = true;
45
+            }
45 46
             ?>
46 47
             <li class="menu-item">
47 48
                 <a class="<?php echo $_tab->selected ? true : "selected"; ?>" href="<?php echo $_tab->url; ?>">
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
@@ -174,8 +174,9 @@  discard block
 block discarded – undo
174 174
         if(!empty($_POST['solidcolor'])) {
175 175
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
176 176
 
177
-            if($_POST['bgoption'] == "solid")
178
-                $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
177
+            if($_POST['bgoption'] == "solid") {
178
+                            $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
179
+            }
179 180
 
180 181
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
181 182
         }
@@ -225,8 +226,9 @@  discard block
 block discarded – undo
225 226
         }
226 227
 
227 228
         if(!empty($_POST['layout_channel'])) {
228
-            if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists")
229
-                $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
229
+            if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists") {
230
+                            $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
231
+            }
230 232
         }
231 233
 
232 234
     if(!empty($_POST['bgoptionset'])) {
Please login to merge, or discard this patch.
web/public/das_captcha.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
 if (isset($_GET['next']))
10 10
 {
11 11
     $next = $_GET['next'];
12
-}
13
-else
12
+} else
14 13
 {
15 14
     $next = "/";
16 15
 }
Please login to merge, or discard this patch.
web/public/comment_service_ajax.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@
 block discarded – undo
31 31
         $stmt->execute();
32 32
 
33 33
         $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment");
34
-        if(@$_SESSION['siteusername'] != $_video['author'])
35
-            $__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt");
34
+        if(@$_SESSION['siteusername'] != $_video['author']) {
35
+                    $__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt");
36
+        }
36 37
     }
37 38
 }
38 39
 
Please login to merge, or discard this patch.