Test Failed
Push — main ( d41f84...e8e3a0 )
by chief
03:50 queued 13s
created
web/public/d/channel_update.php 2 patches
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
     }
17 17
 
18 18
 
19
-        if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
20
-            if(!empty($_GET["n"]) && $_GET['n'] == "pfp") {
19
+        if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
20
+            if (!empty($_GET["n"]) && $_GET['n'] == "pfp") {
21 21
                 $target_dir = "../dynamic/pfp/";
22 22
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
23 23
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
                 $uploadOk = true;
28 28
                 $movedFile = false;
29 29
         
30
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
31
-                    && $imageFileType != "gif" ) {
30
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
31
+                    && $imageFileType != "gif") {
32 32
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
33 33
                     $uploadOk = false;
34 34
                     goto skip;
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
                     }
52 52
                 }
53 53
             }
54
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
55
-            if(!empty($_FILES["backgroundbgset"]["name"])) {
54
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
55
+            if (!empty($_FILES["backgroundbgset"]["name"])) {
56 56
                 $target_dir = "../dynamic/banners/";
57 57
                 $imageFileType = strtolower(pathinfo($_FILES["backgroundbgset"]["name"], PATHINFO_EXTENSION));
58 58
                 $target_name = md5_file($_FILES["backgroundbgset"]["tmp_name"]) . "." . $imageFileType;
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
                 $uploadOk = true;
63 63
                 $movedFile = false;
64 64
     
65
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
66
-                    && $imageFileType != "gif" ) {
65
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
66
+                    && $imageFileType != "gif") {
67 67
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
68 68
                     $uploadOk = false;
69 69
                     goto skip;
70 70
                 }
71 71
     
72
-                if($uploadOk) { 
72
+                if ($uploadOk) { 
73 73
                     if (file_exists($target_file)) {
74 74
                         $movedFile = true;
75 75
                     } else {
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
                     }
86 86
                 }
87 87
             }
88
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['watchsubset']) {
88
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['watchsubset']) {
89 89
             echo "asdas";
90
-            if(!empty($_FILES["watchsubset"]["name"])) {
90
+            if (!empty($_FILES["watchsubset"]["name"])) {
91 91
                 echo "asdas";
92 92
 
93 93
                 $target_dir = "../dynamic/banners/";
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
                 $uploadOk = true;
100 100
                 $movedFile = false;
101 101
     
102
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
103
-                    && $imageFileType != "gif" ) {
102
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
103
+                    && $imageFileType != "gif") {
104 104
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
105 105
                     $uploadOk = false;
106 106
                     goto skip;
107 107
                 }
108 108
     
109
-                if($uploadOk) { 
109
+                if ($uploadOk) { 
110 110
                     if (file_exists($target_file)) {
111 111
                         $movedFile = true;
112 112
                     } else {
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
                     }
123 123
                 }
124 124
             }
125
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
126
-            if(!empty($_FILES["file"]["name"])) {
125
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
126
+            if (!empty($_FILES["file"]["name"])) {
127 127
                 $target_dir = "../dynamic/banners/";
128 128
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
129 129
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
                 $uploadOk = true;
134 134
                 $movedFile = false;
135 135
     
136
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
137
-                    && $imageFileType != "gif" ) {
136
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
137
+                    && $imageFileType != "gif") {
138 138
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
139 139
                     $uploadOk = false;
140 140
                     goto skip;
141 141
                 }
142 142
     
143
-                if($uploadOk) { 
143
+                if ($uploadOk) { 
144 144
                     if (file_exists($target_file)) {
145 145
                         $movedFile = true;
146 146
                     } else {
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
                     }
157 157
                 } 
158 158
             }
159
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
160
-            if(!empty($_FILES["videopagebanner"]["name"])) {
159
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
160
+            if (!empty($_FILES["videopagebanner"]["name"])) {
161 161
                 $target_dir = "/dynamic/subscribe/";
162 162
                 $imageFileType = strtolower(pathinfo($_FILES["videopagebanner"]["name"], PATHINFO_EXTENSION));
163 163
                 $target_name = md5_file($_FILES["videopagebanner"]["tmp_name"]) . "." . $imageFileType;
@@ -167,14 +167,14 @@  discard block
 block discarded – undo
167 167
                 $uploadOk = true;
168 168
                 $movedFile = false;
169 169
     
170
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
171
-                    && $imageFileType != "gif" ) {
170
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
171
+                    && $imageFileType != "gif") {
172 172
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
173 173
                     $uploadOk = false;
174 174
                     goto skip;
175 175
                 }
176 176
     
177
-                if($uploadOk) { 
177
+                if ($uploadOk) { 
178 178
                     if (file_exists($target_file)) {
179 179
                         $movedFile = true;
180 180
                     } else {
@@ -192,86 +192,86 @@  discard block
 block discarded – undo
192 192
             }
193 193
         }
194 194
 
195
-        if(!empty($_POST['bio'])) { 
195
+        if (!empty($_POST['bio'])) { 
196 196
             $__user_u->update_row($_SESSION['siteusername'], "bio", $_POST['bio']);
197 197
         }
198 198
 
199
-        if(!empty($_POST['featuredchannels'])) { 
199
+        if (!empty($_POST['featuredchannels'])) { 
200 200
             $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['featuredchannels']);
201 201
         }
202 202
     
203
-        if(!empty($_POST['css'])) {
203
+        if (!empty($_POST['css'])) {
204 204
             $__user_u->update_row($_SESSION['siteusername'], "css", $_POST['css']);
205 205
         }
206 206
 
207
-        if(!empty($_POST['videoid'])) {
207
+        if (!empty($_POST['videoid'])) {
208 208
             $__user_u->update_row($_SESSION['siteusername'], "featured", $_POST['videoid']);
209 209
         }
210 210
 
211
-        if(!empty($_POST['solidcolor'])) {
211
+        if (!empty($_POST['solidcolor'])) {
212 212
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
213 213
 
214
-            if($_POST['bgoption'] == "solid")
214
+            if ($_POST['bgoption'] == "solid")
215 215
                 $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
216 216
 
217 217
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
218 218
         }
219 219
 
220
-        if(!empty($_POST['transparency'])) {
220
+        if (!empty($_POST['transparency'])) {
221 221
             $__user_u->update_row($_SESSION['siteusername'], "transparency", $_POST['transparency']);
222 222
         }
223 223
 
224
-        if(!empty($_POST['genre'])) {
224
+        if (!empty($_POST['genre'])) {
225 225
             $__user_u->update_row($_SESSION['siteusername'], "genre", $_POST['genre']);
226 226
         }
227 227
 
228
-        if(!empty($_POST['bordercolor'])) {
228
+        if (!empty($_POST['bordercolor'])) {
229 229
             $__user_u->update_row($_SESSION['siteusername'], "border_color", $_POST['bordercolor']);
230 230
         }
231 231
 
232
-        if(!empty($_POST['country'])) {
232
+        if (!empty($_POST['country'])) {
233 233
             $__user_u->update_row($_SESSION['siteusername'], "country", $_POST['country']);
234 234
         } // duplicate?
235 235
 
236
-        if(!empty($_POST['header'])) {
236
+        if (!empty($_POST['header'])) {
237 237
             $__user_u->update_row($_SESSION['siteusername'], "custom_header", $_POST['header']);
238 238
         }
239 239
 
240
-        if(!empty($_POST['customtext'])) {
240
+        if (!empty($_POST['customtext'])) {
241 241
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['customtext']);
242 242
         }
243 243
 
244
-        if(!empty($_POST['country'])) {
244
+        if (!empty($_POST['country'])) {
245 245
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['country']);
246 246
         } // duplicate?
247 247
 
248
-        if(!empty($_POST['website'])) {
248
+        if (!empty($_POST['website'])) {
249 249
             $__user_u->update_row($_SESSION['siteusername'], "website", $_POST['website']);
250 250
         }
251 251
     
252
-        if(!empty($_POST['channelboxcolor'])) {
252
+        if (!empty($_POST['channelboxcolor'])) {
253 253
             $__user_u->update_row($_SESSION['siteusername'], "secondary_color", $_POST['channelboxcolor']);
254 254
         }
255 255
 
256
-        if(!empty($_POST['backgroundcolor'])) {
256
+        if (!empty($_POST['backgroundcolor'])) {
257 257
             $__user_u->update_row($_SESSION['siteusername'], "third_color", $_POST['backgroundcolor']);
258 258
         }
259 259
 
260
-        if(!empty($_POST['textmaincolor'])) {
260
+        if (!empty($_POST['textmaincolor'])) {
261 261
             $__user_u->update_row($_SESSION['siteusername'], "primary_color_text", $_POST['textmaincolor']);
262 262
         }
263 263
 
264
-        if(!empty($_POST['layout_channel'])) {
265
-            if(
266
-                $_POST['layout_channel'] == "feed"      || 
267
-                $_POST['layout_channel'] == "featured"  || 
264
+        if (!empty($_POST['layout_channel'])) {
265
+            if (
266
+                $_POST['layout_channel'] == "feed" || 
267
+                $_POST['layout_channel'] == "featured" || 
268 268
                 $_POST['layout_channel'] == "playlists" || 
269 269
                 $_POST['layout_channel'] == "everything"
270 270
             )
271 271
                 $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
272 272
         }
273 273
 
274
-    if(!empty($_POST['bgoptionset'])) {
274
+    if (!empty($_POST['bgoptionset'])) {
275 275
         $bgoption = $_POST['bgoption'];
276 276
         $bgcolor = $_POST['solidcolor'];
277 277
         $default = "default.png";
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         
281 281
         $__user_u->update_row($_SESSION['siteusername'], "2012_bgcolor", $bgcolor);
282 282
 
283
-        if($bgoption == "solid") {
283
+        if ($bgoption == "solid") {
284 284
             $__user_u->update_row($_SESSION['siteusername'], "2012_bg ", $default);
285 285
         }
286 286
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -211,8 +211,9 @@  discard block
 block discarded – undo
211 211
         if(!empty($_POST['solidcolor'])) {
212 212
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
213 213
 
214
-            if($_POST['bgoption'] == "solid")
215
-                $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
214
+            if($_POST['bgoption'] == "solid") {
215
+                            $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
216
+            }
216 217
 
217 218
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
218 219
         }
@@ -267,8 +268,9 @@  discard block
 block discarded – undo
267 268
                 $_POST['layout_channel'] == "featured"  || 
268 269
                 $_POST['layout_channel'] == "playlists" || 
269 270
                 $_POST['layout_channel'] == "everything"
270
-            )
271
-                $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
271
+            ) {
272
+                            $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
273
+            }
272 274
         }
273 275
 
274 276
     if(!empty($_POST['bgoptionset'])) {
Please login to merge, or discard this patch.
web/public/s/mod/header.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  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'])) {
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">
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
 <div id="masthead-expanded" class="hid" style="display: none;height: 165px;">
106 106
 	<div id="masthead-expanded-container" style="height: 142px;" class="with-sandbar">
107 107
 	<?php
108
-		$stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
109
-		$stmt->bindParam(":username", $_SESSION['siteusername']);
110
-		$stmt->execute();
111
-	?>
108
+        $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
109
+        $stmt->bindParam(":username", $_SESSION['siteusername']);
110
+        $stmt->execute();
111
+    ?>
112 112
 	<div class="yt-uix-slider yt-rounded" id="watch-channel-discoverbox" data-slider-slide-selected="3" data-slider-slides="<?php echo $stmt->rowCount(); ?>"
113 113
 		style="
114 114
 		width: 580px;
@@ -123,14 +123,14 @@  discard block
 block discarded – undo
123 123
 	<div class="yt-uix-slider-body" style="width: 525px;">
124 124
 		<div class="yt-uix-slider-slides">
125 125
 			<?php 
126
-				while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
127
-					$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
128
-					$video['duration'] = $__time_h->timestamp($video['duration']);
129
-					$video['views'] = $__video_h->fetch_video_views($video['rid']);
130
-					$video['author'] = htmlspecialchars($video['author']);		
131
-					$video['title'] = htmlspecialchars($video['title']);
132
-					$video['description'] = $__video_h->shorten_description($video['description'], 50);
133
-			?>
126
+                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
127
+                    $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
128
+                    $video['duration'] = $__time_h->timestamp($video['duration']);
129
+                    $video['views'] = $__video_h->fetch_video_views($video['rid']);
130
+                    $video['author'] = htmlspecialchars($video['author']);		
131
+                    $video['title'] = htmlspecialchars($video['title']);
132
+                    $video['description'] = $__video_h->shorten_description($video['description'], 50);
133
+            ?>
134 134
 			<ul class="yt-uix-slider-slide ">
135 135
 				<li class="yt-uix-slider-slide-item ">
136 136
 					<div class="video-list-item  yt-tile-default ">
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>
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	<div class="alerts-2012">
56 56
 	
57 57
 	</div>
58
-	<?php if(isset($error['status'])) { ?>
58
+	<?php if (isset($error['status'])) { ?>
59 59
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-error  yt-alert-player">  <div class="yt-alert-icon">
60 60
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
61 61
 		</div>
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			</div>
66 66
 		</div></div></div>
67 67
 	<?php } ?>
68
-	<?php if(isset($_GET['error'])) { ?>
68
+	<?php if (isset($_GET['error'])) { ?>
69 69
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-error ">  <div class="yt-alert-icon">
70 70
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
71 71
 		</div>
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 			</div>
76 76
 		</div></div></div>
77 77
 	<?php } ?>
78
-	<?php if(isset($_GET['success'])) { ?>
78
+	<?php if (isset($_GET['success'])) { ?>
79 79
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-success ">  <div class="yt-alert-icon">
80 80
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
81 81
 		</div>
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			</div>
86 86
 		</div></div></div>
87 87
 	<?php } ?>
88
-	<?php if(isset($_SESSION['error'])) { ?>
88
+	<?php if (isset($_SESSION['error'])) { ?>
89 89
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-error">  <div class="yt-alert-icon">
90 90
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
91 91
 		</div>
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		<b>New minor update: <pre style="display:inline-block;">1fe1fa4</pre></b> <pre style="display:inline-block;font-size:10px;margin-left:35px;">This is a part of the Communications update. The inbox has been updated with a cleaner look.</pre>
102 102
 	</div></div></div></div><br>
103 103
 	-->
104
-<?php if(isset($_SESSION['siteusername'])) { ?>
104
+<?php if (isset($_SESSION['siteusername'])) { ?>
105 105
 <div id="masthead-expanded" class="hid" style="display: none;height: 165px;">
106 106
 	<div id="masthead-expanded-container" style="height: 142px;" class="with-sandbar">
107 107
 	<?php
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	<div class="yt-uix-slider-body" style="width: 525px;">
124 124
 		<div class="yt-uix-slider-slides">
125 125
 			<?php 
126
-				while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
126
+				while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
127 127
 					$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
128 128
 					$video['duration'] = $__time_h->timestamp($video['duration']);
129 129
 					$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
web/public/s/mod/channel_everything.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
                                                         ?>
57 57
                                                         <div class="playlist-info">
58 58
                                                             <h2><?php echo htmlspecialchars($_user['username']); ?>'s playlists</h2>
59
-                                                            <?php if($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
59
+                                                            <?php if ($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
60 60
                                                             <div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
61 61
                                                         </div>
62 62
                                                         <?php 
63
-                                                            if($stmt->rowCount() != 0) {
64
-                                                                while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
63
+                                                            if ($stmt->rowCount() != 0) {
64
+                                                                while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
65 65
                                                                     $playlist['videos'] = json_decode($playlist['videos']);
66 66
                                                         ?>
67 67
                                                         <div class="playlist yt-tile-visible yt-uix-tile">
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 													<div class="playlist-info">
100 100
 														<h2>Uploaded videos</h2>
101 101
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
102
-														<?php if($_user['videos'] == 0) { ?>
102
+														<?php if ($_user['videos'] == 0) { ?>
103 103
 															<h4>This user has not uploaded a video yet.</h4>
104 104
 														<?php } ?>
105 105
 													</div>
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                                                             $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
109 109
                                                             $stmt->bindParam(":username", $_user['username']);
110 110
                                                             $stmt->execute();
111
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
111
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
112 112
                                                         ?>
113 113
 														<li class="blogger-video">
114 114
 															<div class="video yt-tile-visible">
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 														</div>
191 191
 														<hr class="yt-horizontal-rule ">
192 192
 													</div>
193
-													<?php if(!empty($_user['website'])) { ?>
193
+													<?php if (!empty($_user['website'])) { ?>
194 194
 														<div class="user-profile-item">
195 195
 															<div class="yt-c3-profile-custom-url field-container ">
196 196
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 															<h5>Country</h5>
240 240
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
241 241
 														</div>
242
-														<?php if($_user['genre'] != "none") { ?>
242
+														<?php if ($_user['genre'] != "none") { ?>
243 243
 															<div class="user-profile-item ">
244 244
 																<h5>Channel Genre</h5>
245 245
 																<span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -251,16 +251,16 @@  discard block
 block discarded – undo
251 251
 											</div>
252 252
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
253 253
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
254
-												<?php if(count($_user['featured_channels']) != 0) { ?>
254
+												<?php if (count($_user['featured_channels']) != 0) { ?>
255 255
 												<div class="module-view other-channels-view">
256
-													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
257
-													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
256
+													<h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
257
+													<?php if (@$_SESSION['siteusername'] == $_user['username']) { 
258 258
 														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
259 259
 													} ?>
260 260
 													<ul class="channel-summary-list ">
261 261
 														<?php 
262
-															foreach($_user['featured_channels'] as $user) {
263
-																if($__user_h->user_exists($user)) {
262
+															foreach ($_user['featured_channels'] as $user) {
263
+																if ($__user_h->user_exists($user)) {
264 264
 														?>
265 265
 															<li class="yt-tile-visible yt-uix-tile">
266 266
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -289,13 +289,13 @@  discard block
 block discarded – undo
289 289
 												$stmt->bindParam(":search", $_user['username']);
290 290
 												$stmt->execute();
291 291
 
292
-												if($stmt->rowCount() != 0) {
292
+												if ($stmt->rowCount() != 0) {
293 293
 											?>
294 294
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
295 295
 													<div class="module-view gh-featured">
296 296
 														<h2>Featured Playlists</h2>     
297 297
 														<?php
298
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
298
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
299 299
 															$playlist['videos'] = json_decode($playlist['videos']);
300 300
 														?> 
301 301
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/s/mod/channel_playlists.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                                                         $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
53 53
                                                         $stmt->bindParam(":search", $_user['username']);
54 54
                                                         $stmt->execute();
55
-													?>
55
+                                                    ?>
56 56
 													<div class="playlist-info">
57 57
 														<h2><?php echo htmlspecialchars($_user['username']); ?>'s playlists</h2>
58 58
 														<?php if($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
 												<div class="module-view other-channels-view">
197 197
 													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
198 198
 													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
199
-														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
200
-													} ?>
199
+                                                        echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
200
+                                                    } ?>
201 201
 													<ul class="channel-summary-list ">
202 202
 														<?php 
203
-															foreach($_user['featured_channels'] as $user) {
204
-																if($__user_h->user_exists($user)) {
205
-														?>
203
+                                                            foreach($_user['featured_channels'] as $user) {
204
+                                                                if($__user_h->user_exists($user)) {
205
+                                                        ?>
206 206
 															<li class="yt-tile-visible yt-uix-tile">
207 207
 																<div class="channel-summary clearfix channel-summary-compact">
208 208
 																	<div class="channel-summary-thumb">
@@ -226,19 +226,19 @@  discard block
 block discarded – undo
226 226
 											</div>
227 227
 
228 228
 											<?php 
229
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
230
-												$stmt->bindParam(":search", $_user['username']);
231
-												$stmt->execute();
229
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
230
+                                                $stmt->bindParam(":search", $_user['username']);
231
+                                                $stmt->execute();
232 232
 
233
-												if($stmt->rowCount() != 0) {
234
-											?>
233
+                                                if($stmt->rowCount() != 0) {
234
+                                            ?>
235 235
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
236 236
 													<div class="module-view gh-featured">
237 237
 														<h2>Featured Playlists</h2>     
238 238
 														<?php
239
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
240
-															$playlist['videos'] = json_decode($playlist['videos']);
241
-														?> 
239
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
240
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
241
+                                                        ?> 
242 242
 															<div class="playlist yt-tile-visible yt-uix-tile">
243 243
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
244 244
 																<span class="playlist-thumb-strip playlist-thumb-strip-252"><span class="videos videos-4 horizontal-cutoff"><span class="clip"><span class="centering-offset"><span class="centering">
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 													?>
56 56
 													<div class="playlist-info">
57 57
 														<h2><?php echo htmlspecialchars($_user['username']); ?>'s playlists</h2>
58
-														<?php if($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
58
+														<?php if ($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
59 59
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
60 60
 													</div>
61 61
                                                     <?php 
62
-                                                        if($stmt->rowCount() != 0) {
63
-                                                            while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
62
+                                                        if ($stmt->rowCount() != 0) {
63
+                                                            while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
64 64
                                                                 $playlist['videos'] = json_decode($playlist['videos']);
65 65
                                                     ?>
66 66
                                                     <div class="playlist yt-tile-visible yt-uix-tile">
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 														</div>
132 132
 														<hr class="yt-horizontal-rule ">
133 133
 													</div>
134
-													<?php if(!empty($_user['website'])) { ?>
134
+													<?php if (!empty($_user['website'])) { ?>
135 135
 														<div class="user-profile-item">
136 136
 															<div class="yt-c3-profile-custom-url field-container ">
137 137
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 															<h5>Country</h5>
181 181
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
182 182
 														</div>
183
-														<?php if($_user['genre'] != "none") { ?>
183
+														<?php if ($_user['genre'] != "none") { ?>
184 184
 															<div class="user-profile-item ">
185 185
 																<h5>Channel Genre</h5>
186 186
 																<span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -192,16 +192,16 @@  discard block
 block discarded – undo
192 192
 											</div>
193 193
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
194 194
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
195
-												<?php if(count($_user['featured_channels']) != 0) { ?>
195
+												<?php if (count($_user['featured_channels']) != 0) { ?>
196 196
 												<div class="module-view other-channels-view">
197
-													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
198
-													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
197
+													<h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
198
+													<?php if (@$_SESSION['siteusername'] == $_user['username']) { 
199 199
 														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
200 200
 													} ?>
201 201
 													<ul class="channel-summary-list ">
202 202
 														<?php 
203
-															foreach($_user['featured_channels'] as $user) {
204
-																if($__user_h->user_exists($user)) {
203
+															foreach ($_user['featured_channels'] as $user) {
204
+																if ($__user_h->user_exists($user)) {
205 205
 														?>
206 206
 															<li class="yt-tile-visible yt-uix-tile">
207 207
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -230,13 +230,13 @@  discard block
 block discarded – undo
230 230
 												$stmt->bindParam(":search", $_user['username']);
231 231
 												$stmt->execute();
232 232
 
233
-												if($stmt->rowCount() != 0) {
233
+												if ($stmt->rowCount() != 0) {
234 234
 											?>
235 235
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
236 236
 													<div class="module-view gh-featured">
237 237
 														<h2>Featured Playlists</h2>     
238 238
 														<?php
239
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
239
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
240 240
 															$playlist['videos'] = json_decode($playlist['videos']);
241 241
 														?> 
242 242
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.