Test Failed
Push — main ( e9fad0...f33069 )
by chief
07:43
created
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/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/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
 
@@ -716,10 +717,11 @@  discard block
 block discarded – undo
716 717
 														$stmt->execute();
717 718
 
718 719
 														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
719
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
720
-																$comment['liked'] = true;
721
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
722
-																$comment['disliked'] = true;
720
+															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) {
721
+																															$comment['liked'] = true;
722
+															} else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) {
723
+																															$comment['disliked'] = true;
724
+															}
723 725
 																
724 726
 															$comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
725 727
 															$comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false);
Please login to merge, or discard this patch.