Test Failed
Push — main ( a0a7aa...e9fad0 )
by chief
03:33
created
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.