Test Failed
Push — main ( cc1148...e7431a )
by chief
08:27
created
web/public/s/mod/2013_guide.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
                     <div class="guide-recommendations-list">
104 104
                         <div class="guide-channels-content">
105 105
                             <ul class="guide-channels-list guide-item-container yt-uix-scroller filter-has-matches">
106
-                            <?php if(!isset($_SESSION['siteusername'])) { ?>
107
-                                    <?php foreach($__server->featured_channels as $channel) { ?>
106
+                            <?php if (!isset($_SESSION['siteusername'])) { ?>
107
+                                    <?php foreach ($__server->featured_channels as $channel) { ?>
108 108
                                         <li class="guide-channel">
109 109
                                             <a class="guide-item yt-uix-sessionlink  narrow-item" href="/feed/UCF1cWZk-kVBrN9AM_ey7qdQ" title="<?php echo htmlspecialchars($channel); ?>" data-channel-id="UCF1cWZk-kVBrN9AM_ey7qdQ" data-featured="1" data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-featured">
110 110
                                             <span class="thumb"><span class="video-thumb ux-thumb yt-thumb-square-18 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb-manual="1" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" data-group-key="guide-channel-thumbs" width="18"><span class="vertical-align"></span></span></span></span></span>
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                                         $stmt = $__db->prepare("SELECT * FROM subscribers WHERE sender = :username ORDER BY id DESC LIMIT 20");
119 119
                                         $stmt->bindParam(":username", $_SESSION['siteusername']);
120 120
                                         $stmt->execute();
121
-                                        while($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
121
+                                        while ($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
122 122
                                         <li class="guide-channel">
123 123
                                             <a class="guide-item yt-uix-sessionlink  narrow-item" href="/feed/UCF1cWZk-kVBrN9AM_ey7qdQ" title="<?php echo htmlspecialchars($channel); ?>" data-channel-id="UCF1cWZk-kVBrN9AM_ey7qdQ" data-featured="1" data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-featured">
124 124
                                             <span class="thumb"><span class="video-thumb ux-thumb yt-thumb-square-18 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb-manual="1" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" data-group-key="guide-channel-thumbs" width="18"><span class="vertical-align"></span></span></span></span></span>
Please login to merge, or discard this patch.
web/public/s/mod/header.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2
-	if(isset($_SESSION['siteusername'])) {
2
+    if(isset($_SESSION['siteusername'])) {
3 3
         $stmt = $__db->prepare("UPDATE users SET ip = :ip WHERE username = :username");
4 4
         $stmt->bindParam(":username", $_SESSION['siteusername']);
5
-		$stmt->bindParam(":ip",       $_SERVER["HTTP_CF_CONNECTING_IP"]);
5
+        $stmt->bindParam(":ip",       $_SERVER["HTTP_CF_CONNECTING_IP"]);
6 6
         $stmt->execute();
7
-	}
7
+    }
8 8
 
9
-	if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
10
-		die("<a href='/logout'>Your user has been deleted. Logout</a>");
11
-	}
9
+    if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
10
+        die("<a href='/logout'>Your user has been deleted. Logout</a>");
11
+    }
12 12
 ?>
13 13
 <!-- begin masthead -->
14 14
 <div id="masthead" class="" dir="ltr">
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	if(isset($_SESSION['siteusername'])) {
2
+	if (isset($_SESSION['siteusername'])) {
3 3
         $stmt = $__db->prepare("UPDATE users SET ip = :ip WHERE username = :username");
4 4
         $stmt->bindParam(":username", $_SESSION['siteusername']);
5
-		$stmt->bindParam(":ip",       $_SERVER["HTTP_CF_CONNECTING_IP"]);
5
+		$stmt->bindParam(":ip", $_SERVER["HTTP_CF_CONNECTING_IP"]);
6 6
         $stmt->execute();
7 7
 	}
8 8
 
9
-	if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
9
+	if (isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
10 10
 		die("<a href='/logout'>Your user has been deleted. Logout</a>");
11 11
 	}
12 12
 ?>
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	<a id="logo-container" href="/" title="SubRocks home">
16 16
 	<img id="logo" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="SubRocks home">
17 17
 	</a>
18
-	<?php if(!isset($_SESSION['siteusername'])) { ?>
18
+	<?php if (!isset($_SESSION['siteusername'])) { ?>
19 19
 	<div id="yt-masthead-signin">
20 20
 		<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">
21 21
 			<span class="clip">
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 			<div id="masthead-user-bar">
34 34
 				<div id="masthead-user">
35 35
 					<span id="masthead-gaia-user-expander" class="masthead-user-menu-expander masthead-expander" onclick="yt.www.masthead.toggleExpandedMasthead()"><span id="masthead-gaia-user-wrapper" class="yt-rounded" tabindex="0"><?php echo htmlspecialchars($_SESSION['siteusername']); ?></span></span>
36
-							<?php if($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?>
36
+							<?php if ($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?>
37 37
 							<button type="button" onclick=";window.location.href=this.getAttribute('href');return false;" href="/inbox/" class="sb-button sb-notif-on yt-uix-button" id="sb-button-notify" role="button"><span class="yt-uix-button-content"><?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?></span></button>
38 38
 					<?php } else { ?>
39 39
 							<button type="button" onclick=";window.location.href=this.getAttribute('href');return false;" href="/inbox/" class="sb-button sb-notif-off yt-uix-button" id="sb-button-notify" role="button"><span class="yt-uix-button-content"><?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?></span></button>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	
57 57
 	</div>
58 58
 	
59
-<?php if(isset($_SESSION['siteusername'])) { ?>
59
+<?php if (isset($_SESSION['siteusername'])) { ?>
60 60
 <div id="masthead-expanded" class="hid" style="display: none;">
61 61
 	<div id="masthead-expanded-container" class="with-sandbar">
62 62
 	<div class="yt-uix-slider yt-rounded" id="watch-channel-discoverbox" data-slider-slide-selected="3" data-slider-slides="4"
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                     $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
78 78
                     $stmt->bindParam(":username", $_SESSION['siteusername']);
79 79
                     $stmt->execute();
80
-                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
80
+                    while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
81 81
                         $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
82 82
                         $video['duration'] = $__time_h->timestamp($video['duration']);
83 83
                         $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 	</div>
221 221
 <?php } ?>
222 222
 <div id="alerts">
223
-	<?php if(isset($error['status'])) { ?>
223
+	<?php if (isset($error['status'])) { ?>
224 224
 		<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error  yt-alert-player">  <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['error'])) { ?>
233
+	<?php if (isset($_GET['error'])) { ?>
234 234
 		<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error ">  <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($_GET['success'])) { ?>
243
+	<?php if (isset($_GET['success'])) { ?>
244 244
 		<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-success ">  <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>
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 			</div>
251 251
 		</div></div></div>
252 252
 	<?php } ?>
253
-	<?php if(isset($_SESSION['error'])) { ?>
253
+	<?php if (isset($_SESSION['error'])) { ?>
254 254
 		<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error">  <div class="yt-alert-icon">
255 255
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
256 256
 		</div>
Please login to merge, or discard this patch.
web/public/d/signup.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     }
37 37
 
38 38
 
39
-    if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
39
+    if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
40 40
         $request = (object) [
41 41
             "username" => $_POST['username'],
42 42
             "password" => $_POST['password'],
@@ -56,30 +56,30 @@  discard block
 block discarded – undo
56 56
         $stmt->bindParam(":ip", $_SERVER["HTTP_CF_CONNECTING_IP"]);
57 57
         $stmt->execute();
58 58
 
59
-        while($ip = $stmt->fetch(PDO::FETCH_ASSOC)) { $request->error->message = "You cannot make alt accounts."; $request->error->status = "";  }
59
+        while ($ip = $stmt->fetch(PDO::FETCH_ASSOC)) { $request->error->message = "You cannot make alt accounts."; $request->error->status = ""; }
60 60
 
61 61
         if (!filter_var($request->email, FILTER_VALIDATE_EMAIL)) 
62
-            { $request->error->message = "Your email is invalid!"; $request->error->status = "";  }
63
-        if(strlen($request->username) > 21) 
62
+            { $request->error->message = "Your email is invalid!"; $request->error->status = ""; }
63
+        if (strlen($request->username) > 21) 
64 64
             { $request->error->message = "Your username must be shorter than 20 characters."; $request->error->status = ""; }
65
-        if(strlen($request->password) < 8) 
65
+        if (strlen($request->password) < 8) 
66 66
             { $request->error->message = "Your password must at least be 8 characters long."; $request->error->status = ""; }
67
-        if(!preg_match('/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/', $request->password)) 
67
+        if (!preg_match('/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/', $request->password)) 
68 68
             { $request->error->message = "Include numbers and letters in your password!"; $request->error->status = ""; }
69
-        if(preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬-]/', $request->username))
69
+        if (preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬-]/', $request->username))
70 70
             { $request->error->message = "Your username cannot contain any special characters!"; $request->error->status = ""; }
71
-        if(!preg_match('/^\S+\w\S{1,}/', $request->username)) 
71
+        if (!preg_match('/^\S+\w\S{1,}/', $request->username)) 
72 72
             { $request->error->message = "Your username cannot contain any special characters!"; $request->error->status = ""; }
73
-        if(empty(trim($request->username))) 
73
+        if (empty(trim($request->username))) 
74 74
             { $request->error->message = "Your username cannot be empty!"; $request->error->status = ""; }
75 75
         
76 76
         $stmt = $__db->prepare("SELECT username FROM users WHERE username = lower(:username)");
77 77
         $stmt->bindParam(":username", $request->username);
78 78
         $stmt->execute();
79
-        if($stmt->rowCount()) 
79
+        if ($stmt->rowCount()) 
80 80
             { $request->error->message = "There's already a user with that same username!"; $request->error->status = ""; }
81 81
         
82
-        if($request->error->status == "OK") {
82
+        if ($request->error->status == "OK") {
83 83
             $stmt = $__db->prepare("INSERT INTO users (username, email, password) VALUES (:username, :email, :password)");
84 84
             $stmt->bindParam(":username", $request->username);
85 85
             $stmt->bindParam(":email", $request->email);
Please login to merge, or discard this patch.