Test Failed
Push — main ( 01cf0c...594560 )
by chief
02:58
created
web/public/watch.php 1 patch
Braces   +14 added lines, -10 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'], @$_SERVER["HTTP_CF_CONNECTING_IP"]);
22
+	if(isset($_SESSION['siteusername'])) {
23
+			$__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]);
24
+	}
23 25
 
24 26
 	$_SESSION['current_video'] = $_video['rid'];
25 27
 
@@ -165,11 +167,12 @@  discard block
 block discarded – undo
165 167
 										if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; }
166 168
 
167 169
 										while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { 
168
-											if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0")
169
-												echo "
170
+											if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") {
171
+																							echo "
170 172
 												  <a style='font-size:10px;' href='/user/" .  htmlspecialchars($username['username']) . "'>" . 
171 173
 													htmlspecialchars($username['username']) 
172 174
 												. "</a><br>";
175
+											}
173 176
 										}
174 177
 									?>
175 178
 									<hr>
@@ -791,10 +794,11 @@  discard block
 block discarded – undo
791 794
 														$stmt->execute();
792 795
 
793 796
 														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
794
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
795
-																$comment['liked'] = true;
796
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
797
-																$comment['disliked'] = true;
797
+															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) {
798
+																															$comment['liked'] = true;
799
+															} else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) {
800
+																															$comment['disliked'] = true;
801
+															}
798 802
 																
799 803
 															$comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
800 804
 															$comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false);
Please login to merge, or discard this patch.