Test Failed
Pull Request — main (#12)
by
unknown
03:17
created
web/public/s/mod/header.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 	<a id="logo-container" href="/" title="SubRocks home">
6 6
 	<img id="logo" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="SubRocks home">
7 7
 	</a>
8
-	<?php if(!isset($_SESSION['siteusername'])) { ?>
8
+	<?php if (!isset($_SESSION['siteusername'])) { ?>
9 9
 	<div id="yt-masthead-signin">
10 10
 		<div id="masthead-user-display"><span id="masthead-user-wrapper"><button href="/sign_in" type="button" id="masthead-user-button" onclick=";window.location.href=this.getAttribute('href');return false;" class=" yt-uix-button yt-uix-button-text" role="button"><span class="yt-uix-button-content">  <span id="masthead-user-image">
11 11
 			<span class="clip">
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 		<span id="yt-masthead-user-displayname" dir="ltr" class="yt-valign-container" onclick="yt.www.masthead.toggleExpandedMasthead();">
24 24
 		<?php echo htmlspecialchars($_SESSION['siteusername']); ?>
25 25
 		</span>
26
-		<?php if($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?>
26
+		<?php if ($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?>
27 27
 		<a style="border-radius:2px;font-weight:bold;border:1px solid #CE4D34;position:relative;top:1px;color: white;text-decoration: none;background-color: #E26148;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
28 28
 		<?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?> 
29 29
 		</a>
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 			</form>
46 46
 		</div>
47 47
 	</div></div>
48
-<?php if(isset($_SESSION['siteusername'])) { ?>
48
+<?php if (isset($_SESSION['siteusername'])) { ?>
49 49
 <div id="masthead-expanded" class="hid" style="display: none;">
50 50
 	<div id="masthead-expanded-container" class="with-sandbar">
51 51
 	<div class="yt-uix-slider yt-rounded" id="watch-channel-discoverbox" data-slider-slide-selected="3" data-slider-slides="4"
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                     $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
67 67
                     $stmt->bindParam(":username", $_SESSION['siteusername']);
68 68
                     $stmt->execute();
69
-                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
69
+                    while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
70 70
                         $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
71 71
                         $video['duration'] = $__time_h->timestamp($video['duration']);
72 72
                         $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 <?php } ?>
211 211
 </div>
212 212
 <div id="alerts">
213
-	<?php if(isset($error['status'])) { ?>
213
+	<?php if (isset($error['status'])) { ?>
214 214
 		<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error  yt-alert-player">  <div class="yt-alert-icon">
215 215
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
216 216
 		</div>
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 			</div>
221 221
 		</div></div></div>
222 222
 	<?php } ?>
223
-	<?php if(isset($_GET['error'])) { ?>
223
+	<?php if (isset($_GET['error'])) { ?>
224 224
 		<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error ">  <div class="yt-alert-icon">
225 225
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
226 226
 		</div>
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 			</div>
231 231
 		</div></div></div>
232 232
 	<?php } ?>
233
-	<?php if(isset($_GET['success'])) { ?>
233
+	<?php if (isset($_GET['success'])) { ?>
234 234
 		<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-success ">  <div class="yt-alert-icon">
235 235
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
236 236
 		</div>
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 			</div>
241 241
 		</div></div></div>
242 242
 	<?php } ?>
243
-	<?php if(isset($_SESSION['error'])) { ?>
243
+	<?php if (isset($_SESSION['error'])) { ?>
244 244
 		<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error">  <div class="yt-alert-icon">
245 245
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
246 246
 		</div>
Please login to merge, or discard this patch.
web/public/favorite_videos.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 <?php $__user_h = new user_helper($__db); ?>
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); error_reporting(E_ERROR | E_PARSE); ?>
10
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
10
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
11 11
 <!DOCTYPE html>
12 12
 <html dir="ltr">
13 13
 	<head>
@@ -160,15 +160,15 @@  discard block
 block discarded – undo
160 160
                                     $stmt->execute();
161 161
 
162 162
                                     $number_of_result = $stmt->rowCount();
163
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
163
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
164 164
 
165
-                                    if (!isset ($_GET['page']) ) {  
165
+                                    if (!isset ($_GET['page'])) {  
166 166
                                         $page = 1;  
167 167
                                     } else {  
168
-                                        $page = (int)$_GET['page'];  
168
+                                        $page = (int) $_GET['page'];  
169 169
                                     }  
170 170
 
171
-                                    $page_first_result = ($page - 1) * $results_per_page;  
171
+                                    $page_first_result = ($page - 1)*$results_per_page;  
172 172
                                 ?>
173 173
                                 <?php 
174 174
                                     $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = :search ORDER BY id DESC LIMIT :pfirst, :pper");
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
                                     </tr>
189 189
                                     
190 190
                                     <?php
191
-                                        while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
192
-											if($__video_h->video_exists($video['reciever'])) {
191
+                                        while ($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
192
+											if ($__video_h->video_exists($video['reciever'])) {
193 193
 												$_video = $__video_h->fetch_video_rid($video['reciever']);
194 194
 												$_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
195 195
 												$_video['age'] = $__time_h->time_elapsed_string($_video['publish']);		
@@ -199,19 +199,19 @@  discard block
 block discarded – undo
199 199
 												$_video['title'] = htmlspecialchars($_video['title']);
200 200
 												$_video['description'] = $__video_h->shorten_description($_video['description'], 50);
201 201
 
202
-												if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") {
202
+												if ($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") {
203 203
 													$status = "Corrupted";
204
-												} else if($_video['visibility'] == "v") {
204
+												} else if ($_video['visibility'] == "v") {
205 205
 													$status = "Approved";
206
-												} else if($_video['visibility'] == "n") {
206
+												} else if ($_video['visibility'] == "n") {
207 207
 													$status = "Approved";
208
-												} else if($_video['visibility'] == "o") {
208
+												} else if ($_video['visibility'] == "o") {
209 209
 													$status = "Disapproved";
210 210
 												} else {
211 211
 													$status = "Unknown";
212 212
 												}                      
213 213
 												
214
-												if($_video['commenting'] == "a") 
214
+												if ($_video['commenting'] == "a") 
215 215
 													$_video['commentstatus'] = "Commenting allowed";
216 216
 												else 
217 217
 													$_video['commentstatus'] = "Commenting disallowed";
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
                                     </div>
258 258
                                 </center>
259 259
 
260
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
260
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
261 261
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch_videomanager(<?php echo $page; ?>)"><?php echo $page; ?></button>
262 262
                                 <?php } ?>   
263 263
 
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                                 </script>
304 304
 
305 305
                                 <?php 
306
-                                    if($stmt6->rowCount() == 0) { echo "
306
+                                    if ($stmt6->rowCount() == 0) { echo "
307 307
                                         <br>Welcome to your favorite videos page.<br>
308 308
 										You can add videos that you like and the video will be added here!
309 309
                                     "; 
Please login to merge, or discard this patch.