Test Failed
Push — main ( f33069...16470f )
by chief
03:10
created
web/public/watch.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,11 +15,13 @@  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($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author'])
19
-		header("Location: /");
18
+	if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) {
19
+			header("Location: /");
20
+	}
20 21
 
21
-	if(isset($_SESSION['siteusername']))
22
-		$__video_h->check_view($_GET['v'], @$_SESSION['siteusername']);
22
+	if(isset($_SESSION['siteusername'])) {
23
+			$__video_h->check_view($_GET['v'], @$_SESSION['siteusername']);
24
+	}
23 25
 
24 26
 	$_SESSION['current_video'] = $_video['rid'];
25 27
 
@@ -739,10 +741,11 @@  discard block
 block discarded – undo
739 741
 														$stmt->execute();
740 742
 
741 743
 														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
742
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
743
-																$comment['liked'] = true;
744
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
745
-																$comment['disliked'] = true;
744
+															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) {
745
+																															$comment['liked'] = true;
746
+															} else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) {
747
+																															$comment['disliked'] = true;
748
+															}
746 749
 																
747 750
 															$comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
748 751
 															$comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false);
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.