Test Failed
Pull Request — main (#21)
by
unknown
02:57
created
web/public/logout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php 
2 2
 require($_SERVER['DOCUMENT_ROOT'] . "/s/classes/config.inc.php");
3 3
 
4
-if(isset($_SESSION['siteusername'])) {
4
+if (isset($_SESSION['siteusername'])) {
5 5
     $_SESSION = [];
6 6
     session_destroy();
7 7
 }
Please login to merge, or discard this patch.
web/public/gaming.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-	$__server->page_embeds->page_title = "SubRocks - Gaming";
12
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
11
+    $__server->page_embeds->page_title = "SubRocks - Gaming";
12
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
15 15
 ?>
16 16
 <!DOCTYPE html>
17 17
 <html dir="ltr">
@@ -141,16 +141,16 @@  discard block
 block discarded – undo
141 141
 									</div>
142 142
 									<div class="browse-item-row ytg-box">
143 143
 										<?php
144
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
145
-											$stmt->execute();
146
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
147
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
148
-												$video['duration'] = $__time_h->timestamp($video['duration']);
149
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
150
-												$video['author'] = htmlspecialchars($video['author']);		
151
-												$video['title'] = htmlspecialchars($video['title']);
152
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
153
-										?>
144
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
145
+                                            $stmt->execute();
146
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
147
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
148
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
149
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
150
+                                                $video['author'] = htmlspecialchars($video['author']);		
151
+                                                $video['title'] = htmlspecialchars($video['title']);
152
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
153
+                                        ?>
154 154
 										<div class="browse-item yt-tile-default ">
155 155
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
156 156
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -176,16 +176,16 @@  discard block
 block discarded – undo
176 176
 									</div>
177 177
                                     <div class="browse-item-row ytg-box">
178 178
 										<?php
179
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
180
-											$stmt->execute();
181
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
182
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
183
-												$video['duration'] = $__time_h->timestamp($video['duration']);
184
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
185
-												$video['author'] = htmlspecialchars($video['author']);		
186
-												$video['title'] = htmlspecialchars($video['title']);
187
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
188
-										?>
179
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
180
+                                            $stmt->execute();
181
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
182
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
183
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
184
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
185
+                                                $video['author'] = htmlspecialchars($video['author']);		
186
+                                                $video['title'] = htmlspecialchars($video['title']);
187
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
188
+                                        ?>
189 189
 										<div class="browse-item yt-tile-default ">
190 190
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
191 191
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -211,16 +211,16 @@  discard block
 block discarded – undo
211 211
 									</div>
212 212
                                     <div class="browse-item-row ytg-box">
213 213
 										<?php
214
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
215
-											$stmt->execute();
216
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
217
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
-												$video['duration'] = $__time_h->timestamp($video['duration']);
219
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
220
-												$video['author'] = htmlspecialchars($video['author']);		
221
-												$video['title'] = htmlspecialchars($video['title']);
222
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
223
-										?>
214
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
215
+                                            $stmt->execute();
216
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
217
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
219
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
220
+                                                $video['author'] = htmlspecialchars($video['author']);		
221
+                                                $video['title'] = htmlspecialchars($video['title']);
222
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
223
+                                        ?>
224 224
 										<div class="browse-item yt-tile-default ">
225 225
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
226 226
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -246,16 +246,16 @@  discard block
 block discarded – undo
246 246
 									</div>
247 247
                                     <div class="browse-item-row ytg-box">
248 248
 										<?php
249
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
250
-											$stmt->execute();
251
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
252
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
253
-												$video['duration'] = $__time_h->timestamp($video['duration']);
254
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
255
-												$video['author'] = htmlspecialchars($video['author']);		
256
-												$video['title'] = htmlspecialchars($video['title']);
257
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
258
-										?>
249
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
250
+                                            $stmt->execute();
251
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
252
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
253
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
254
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
255
+                                                $video['author'] = htmlspecialchars($video['author']);		
256
+                                                $video['title'] = htmlspecialchars($video['title']);
257
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
258
+                                        ?>
259 259
 										<div class="browse-item yt-tile-default ">
260 260
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
261 261
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -281,16 +281,16 @@  discard block
 block discarded – undo
281 281
 									</div>
282 282
                                     <div class="browse-item-row ytg-box">
283 283
 										<?php
284
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
285
-											$stmt->execute();
286
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
-												$video['duration'] = $__time_h->timestamp($video['duration']);
289
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
290
-												$video['author'] = htmlspecialchars($video['author']);		
291
-												$video['title'] = htmlspecialchars($video['title']);
292
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
293
-										?>
284
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
285
+                                            $stmt->execute();
286
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
289
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
290
+                                                $video['author'] = htmlspecialchars($video['author']);		
291
+                                                $video['title'] = htmlspecialchars($video['title']);
292
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
293
+                                        ?>
294 294
 										<div class="browse-item yt-tile-default ">
295 295
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
296 296
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
Please login to merge, or discard this patch.
web/public/howto.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-	$__server->page_embeds->page_title = "SubRocks - How To";
12
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
11
+    $__server->page_embeds->page_title = "SubRocks - How To";
12
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
15 15
 ?>
16 16
 <!DOCTYPE html>
17 17
 <html dir="ltr">
@@ -141,16 +141,16 @@  discard block
 block discarded – undo
141 141
 									</div>
142 142
 									<div class="browse-item-row ytg-box">
143 143
 										<?php
144
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
145
-											$stmt->execute();
146
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
147
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
148
-												$video['duration'] = $__time_h->timestamp($video['duration']);
149
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
150
-												$video['author'] = htmlspecialchars($video['author']);		
151
-												$video['title'] = htmlspecialchars($video['title']);
152
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
153
-										?>
144
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
145
+                                            $stmt->execute();
146
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
147
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
148
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
149
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
150
+                                                $video['author'] = htmlspecialchars($video['author']);		
151
+                                                $video['title'] = htmlspecialchars($video['title']);
152
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
153
+                                        ?>
154 154
 										<div class="browse-item yt-tile-default ">
155 155
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
156 156
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -176,16 +176,16 @@  discard block
 block discarded – undo
176 176
 									</div>
177 177
                                     <div class="browse-item-row ytg-box">
178 178
 										<?php
179
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
180
-											$stmt->execute();
181
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
182
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
183
-												$video['duration'] = $__time_h->timestamp($video['duration']);
184
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
185
-												$video['author'] = htmlspecialchars($video['author']);		
186
-												$video['title'] = htmlspecialchars($video['title']);
187
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
188
-										?>
179
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
180
+                                            $stmt->execute();
181
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
182
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
183
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
184
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
185
+                                                $video['author'] = htmlspecialchars($video['author']);		
186
+                                                $video['title'] = htmlspecialchars($video['title']);
187
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
188
+                                        ?>
189 189
 										<div class="browse-item yt-tile-default ">
190 190
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
191 191
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -211,16 +211,16 @@  discard block
 block discarded – undo
211 211
 									</div>
212 212
                                     <div class="browse-item-row ytg-box">
213 213
 										<?php
214
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
215
-											$stmt->execute();
216
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
217
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
-												$video['duration'] = $__time_h->timestamp($video['duration']);
219
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
220
-												$video['author'] = htmlspecialchars($video['author']);		
221
-												$video['title'] = htmlspecialchars($video['title']);
222
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
223
-										?>
214
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
215
+                                            $stmt->execute();
216
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
217
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
219
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
220
+                                                $video['author'] = htmlspecialchars($video['author']);		
221
+                                                $video['title'] = htmlspecialchars($video['title']);
222
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
223
+                                        ?>
224 224
 										<div class="browse-item yt-tile-default ">
225 225
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
226 226
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -246,16 +246,16 @@  discard block
 block discarded – undo
246 246
 									</div>
247 247
                                     <div class="browse-item-row ytg-box">
248 248
 										<?php
249
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
250
-											$stmt->execute();
251
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
252
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
253
-												$video['duration'] = $__time_h->timestamp($video['duration']);
254
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
255
-												$video['author'] = htmlspecialchars($video['author']);		
256
-												$video['title'] = htmlspecialchars($video['title']);
257
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
258
-										?>
249
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
250
+                                            $stmt->execute();
251
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
252
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
253
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
254
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
255
+                                                $video['author'] = htmlspecialchars($video['author']);		
256
+                                                $video['title'] = htmlspecialchars($video['title']);
257
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
258
+                                        ?>
259 259
 										<div class="browse-item yt-tile-default ">
260 260
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
261 261
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -281,16 +281,16 @@  discard block
 block discarded – undo
281 281
 									</div>
282 282
                                     <div class="browse-item-row ytg-box">
283 283
 										<?php
284
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
285
-											$stmt->execute();
286
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
-												$video['duration'] = $__time_h->timestamp($video['duration']);
289
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
290
-												$video['author'] = htmlspecialchars($video['author']);		
291
-												$video['title'] = htmlspecialchars($video['title']);
292
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
293
-										?>
284
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
285
+                                            $stmt->execute();
286
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
289
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
290
+                                                $video['author'] = htmlspecialchars($video['author']);		
291
+                                                $video['title'] = htmlspecialchars($video['title']);
292
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
293
+                                        ?>
294 294
 										<div class="browse-item yt-tile-default ">
295 295
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
296 296
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
Please login to merge, or discard this patch.
web/public/people.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-	$__server->page_embeds->page_title = "SubRocks - People";
12
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
11
+    $__server->page_embeds->page_title = "SubRocks - People";
12
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
15 15
 ?>
16 16
 <!DOCTYPE html>
17 17
 <html dir="ltr">
@@ -141,16 +141,16 @@  discard block
 block discarded – undo
141 141
 									</div>
142 142
 									<div class="browse-item-row ytg-box">
143 143
 										<?php
144
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
145
-											$stmt->execute();
146
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
147
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
148
-												$video['duration'] = $__time_h->timestamp($video['duration']);
149
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
150
-												$video['author'] = htmlspecialchars($video['author']);		
151
-												$video['title'] = htmlspecialchars($video['title']);
152
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
153
-										?>
144
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
145
+                                            $stmt->execute();
146
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
147
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
148
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
149
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
150
+                                                $video['author'] = htmlspecialchars($video['author']);		
151
+                                                $video['title'] = htmlspecialchars($video['title']);
152
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
153
+                                        ?>
154 154
 										<div class="browse-item yt-tile-default ">
155 155
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
156 156
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -176,16 +176,16 @@  discard block
 block discarded – undo
176 176
 									</div>
177 177
                                     <div class="browse-item-row ytg-box">
178 178
 										<?php
179
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
180
-											$stmt->execute();
181
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
182
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
183
-												$video['duration'] = $__time_h->timestamp($video['duration']);
184
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
185
-												$video['author'] = htmlspecialchars($video['author']);		
186
-												$video['title'] = htmlspecialchars($video['title']);
187
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
188
-										?>
179
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
180
+                                            $stmt->execute();
181
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
182
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
183
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
184
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
185
+                                                $video['author'] = htmlspecialchars($video['author']);		
186
+                                                $video['title'] = htmlspecialchars($video['title']);
187
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
188
+                                        ?>
189 189
 										<div class="browse-item yt-tile-default ">
190 190
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
191 191
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -211,16 +211,16 @@  discard block
 block discarded – undo
211 211
 									</div>
212 212
                                     <div class="browse-item-row ytg-box">
213 213
 										<?php
214
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
215
-											$stmt->execute();
216
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
217
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
-												$video['duration'] = $__time_h->timestamp($video['duration']);
219
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
220
-												$video['author'] = htmlspecialchars($video['author']);		
221
-												$video['title'] = htmlspecialchars($video['title']);
222
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
223
-										?>
214
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
215
+                                            $stmt->execute();
216
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
217
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
219
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
220
+                                                $video['author'] = htmlspecialchars($video['author']);		
221
+                                                $video['title'] = htmlspecialchars($video['title']);
222
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
223
+                                        ?>
224 224
 										<div class="browse-item yt-tile-default ">
225 225
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
226 226
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -246,16 +246,16 @@  discard block
 block discarded – undo
246 246
 									</div>
247 247
                                     <div class="browse-item-row ytg-box">
248 248
 										<?php
249
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
250
-											$stmt->execute();
251
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
252
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
253
-												$video['duration'] = $__time_h->timestamp($video['duration']);
254
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
255
-												$video['author'] = htmlspecialchars($video['author']);		
256
-												$video['title'] = htmlspecialchars($video['title']);
257
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
258
-										?>
249
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
250
+                                            $stmt->execute();
251
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
252
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
253
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
254
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
255
+                                                $video['author'] = htmlspecialchars($video['author']);		
256
+                                                $video['title'] = htmlspecialchars($video['title']);
257
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
258
+                                        ?>
259 259
 										<div class="browse-item yt-tile-default ">
260 260
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
261 261
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -281,16 +281,16 @@  discard block
 block discarded – undo
281 281
 									</div>
282 282
                                     <div class="browse-item-row ytg-box">
283 283
 										<?php
284
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
285
-											$stmt->execute();
286
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
-												$video['duration'] = $__time_h->timestamp($video['duration']);
289
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
290
-												$video['author'] = htmlspecialchars($video['author']);		
291
-												$video['title'] = htmlspecialchars($video['title']);
292
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
293
-										?>
284
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
285
+                                            $stmt->execute();
286
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
289
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
290
+                                                $video['author'] = htmlspecialchars($video['author']);		
291
+                                                $video['title'] = htmlspecialchars($video['title']);
292
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
293
+                                        ?>
294 294
 										<div class="browse-item yt-tile-default ">
295 295
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
296 296
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
Please login to merge, or discard this patch.
web/public/comedy.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-	$__server->page_embeds->page_title = "SubRocks - Comedy";
12
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
11
+    $__server->page_embeds->page_title = "SubRocks - Comedy";
12
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
15 15
 ?>
16 16
 <!DOCTYPE html>
17 17
 <html dir="ltr">
@@ -141,16 +141,16 @@  discard block
 block discarded – undo
141 141
 									</div>
142 142
 									<div class="browse-item-row ytg-box">
143 143
 										<?php
144
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
145
-											$stmt->execute();
146
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
147
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
148
-												$video['duration'] = $__time_h->timestamp($video['duration']);
149
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
150
-												$video['author'] = htmlspecialchars($video['author']);		
151
-												$video['title'] = htmlspecialchars($video['title']);
152
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
153
-										?>
144
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
145
+                                            $stmt->execute();
146
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
147
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
148
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
149
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
150
+                                                $video['author'] = htmlspecialchars($video['author']);		
151
+                                                $video['title'] = htmlspecialchars($video['title']);
152
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
153
+                                        ?>
154 154
 										<div class="browse-item yt-tile-default ">
155 155
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
156 156
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -176,16 +176,16 @@  discard block
 block discarded – undo
176 176
 									</div>
177 177
                                     <div class="browse-item-row ytg-box">
178 178
 										<?php
179
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
180
-											$stmt->execute();
181
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
182
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
183
-												$video['duration'] = $__time_h->timestamp($video['duration']);
184
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
185
-												$video['author'] = htmlspecialchars($video['author']);		
186
-												$video['title'] = htmlspecialchars($video['title']);
187
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
188
-										?>
179
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
180
+                                            $stmt->execute();
181
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
182
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
183
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
184
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
185
+                                                $video['author'] = htmlspecialchars($video['author']);		
186
+                                                $video['title'] = htmlspecialchars($video['title']);
187
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
188
+                                        ?>
189 189
 										<div class="browse-item yt-tile-default ">
190 190
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
191 191
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -211,16 +211,16 @@  discard block
 block discarded – undo
211 211
 									</div>
212 212
                                     <div class="browse-item-row ytg-box">
213 213
 										<?php
214
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
215
-											$stmt->execute();
216
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
217
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
-												$video['duration'] = $__time_h->timestamp($video['duration']);
219
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
220
-												$video['author'] = htmlspecialchars($video['author']);		
221
-												$video['title'] = htmlspecialchars($video['title']);
222
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
223
-										?>
214
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
215
+                                            $stmt->execute();
216
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
217
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
219
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
220
+                                                $video['author'] = htmlspecialchars($video['author']);		
221
+                                                $video['title'] = htmlspecialchars($video['title']);
222
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
223
+                                        ?>
224 224
 										<div class="browse-item yt-tile-default ">
225 225
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
226 226
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -246,16 +246,16 @@  discard block
 block discarded – undo
246 246
 									</div>
247 247
                                     <div class="browse-item-row ytg-box">
248 248
 										<?php
249
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
250
-											$stmt->execute();
251
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
252
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
253
-												$video['duration'] = $__time_h->timestamp($video['duration']);
254
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
255
-												$video['author'] = htmlspecialchars($video['author']);		
256
-												$video['title'] = htmlspecialchars($video['title']);
257
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
258
-										?>
249
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
250
+                                            $stmt->execute();
251
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
252
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
253
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
254
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
255
+                                                $video['author'] = htmlspecialchars($video['author']);		
256
+                                                $video['title'] = htmlspecialchars($video['title']);
257
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
258
+                                        ?>
259 259
 										<div class="browse-item yt-tile-default ">
260 260
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
261 261
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -281,16 +281,16 @@  discard block
 block discarded – undo
281 281
 									</div>
282 282
                                     <div class="browse-item-row ytg-box">
283 283
 										<?php
284
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
285
-											$stmt->execute();
286
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
-												$video['duration'] = $__time_h->timestamp($video['duration']);
289
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
290
-												$video['author'] = htmlspecialchars($video['author']);		
291
-												$video['title'] = htmlspecialchars($video['title']);
292
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
293
-										?>
284
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
285
+                                            $stmt->execute();
286
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
289
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
290
+                                                $video['author'] = htmlspecialchars($video['author']);		
291
+                                                $video['title'] = htmlspecialchars($video['title']);
292
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
293
+                                        ?>
294 294
 										<div class="browse-item yt-tile-default ">
295 295
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
296 296
 											<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
Please login to merge, or discard this patch.
web/public/get/accept_friend_request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
 $name = $friend['reciever'];
21 21
 
22
-if($name != $_SESSION['siteusername'] || !isset($_GET['id'])) {
22
+if ($name != $_SESSION['siteusername'] || !isset($_GET['id'])) {
23 23
     die("You are not logged in or you did not put in an argument");
24 24
 }
25 25
 
Please login to merge, or discard this patch.
web/public/d/channel_update.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
         return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
18 18
     }
19 19
 
20
-        if(isset($_POST['layout'])) { 
20
+        if (isset($_POST['layout'])) { 
21 21
             $stmt = $__db->prepare("UPDATE users SET layout = :layout WHERE username = :username");
22 22
             $stmt->bindParam(":layout", $_POST['layout']);
23 23
             $stmt->bindParam(":username", $_SESSION['siteusername']);
24 24
             $stmt->execute();
25 25
         }
26 26
 
27
-        if(isset($_POST['left'])) {
27
+        if (isset($_POST['left'])) {
28 28
             $clean = $_POST['left'];
29 29
             $stmt = $__db->prepare("UPDATE users SET 2009_user_left = :clean WHERE username = :username");
30 30
             $stmt->bindParam(":clean", $clean);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             $stmt->execute();
33 33
         }
34 34
 
35
-        if(isset($_POST['right'])) {
35
+        if (isset($_POST['right'])) {
36 36
             $clean = $_POST['right'];
37 37
             $stmt = $__db->prepare("UPDATE users SET 2009_user_right = :clean WHERE username = :username");
38 38
             $stmt->bindParam(":clean", $clean);
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         }
42 42
 
43 43
 
44
-        if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['pfpset']) {
45
-            if(!empty($_FILES["pfpset"]["name"])) {
44
+        if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['pfpset']) {
45
+            if (!empty($_FILES["pfpset"]["name"])) {
46 46
                 $target_dir = "dynamic/pfp/";
47 47
                 $imageFileType = strtolower(pathinfo($_FILES["pfpset"]["name"], PATHINFO_EXTENSION));
48 48
                 $target_name = md5_file($_FILES["pfpset"]["tmp_name"]) . "." . $imageFileType;
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
                 $uploadOk = true;
53 53
                 $movedFile = false;
54 54
         
55
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
56
-                    && $imageFileType != "gif" ) {
55
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
56
+                    && $imageFileType != "gif") {
57 57
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
58 58
                     $uploadOk = false;
59 59
                     goto skip;
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
                     }
77 77
                 }
78 78
             }
79
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
80
-            if(!empty($_FILES["backgroundbgset"]["name"])) {
79
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
80
+            if (!empty($_FILES["backgroundbgset"]["name"])) {
81 81
                 $target_dir = "dynamic/banners/";
82 82
                 $imageFileType = strtolower(pathinfo($_FILES["backgroundbgset"]["name"], PATHINFO_EXTENSION));
83 83
                 $target_name = md5_file($_FILES["backgroundbgset"]["tmp_name"]) . "." . $imageFileType;
@@ -87,14 +87,14 @@  discard block
 block discarded – undo
87 87
                 $uploadOk = true;
88 88
                 $movedFile = false;
89 89
     
90
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
91
-                    && $imageFileType != "gif" ) {
90
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
91
+                    && $imageFileType != "gif") {
92 92
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
93 93
                     $uploadOk = false;
94 94
                     goto skip;
95 95
                 }
96 96
     
97
-                if($uploadOk) { 
97
+                if ($uploadOk) { 
98 98
                     if (file_exists($target_file)) {
99 99
                         $movedFile = true;
100 100
                     } else {
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
                     }
111 111
                 }
112 112
             }
113
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
114
-            if(!empty($_FILES["file"]["name"])) {
113
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
114
+            if (!empty($_FILES["file"]["name"])) {
115 115
                 $target_dir = "dynamic/banners/";
116 116
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
117 117
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -121,14 +121,14 @@  discard block
 block discarded – undo
121 121
                 $uploadOk = true;
122 122
                 $movedFile = false;
123 123
     
124
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
125
-                    && $imageFileType != "gif" ) {
124
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
125
+                    && $imageFileType != "gif") {
126 126
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
127 127
                     $uploadOk = false;
128 128
                     goto skip;
129 129
                 }
130 130
     
131
-                if($uploadOk) { 
131
+                if ($uploadOk) { 
132 132
                     if (file_exists($target_file)) {
133 133
                         $movedFile = true;
134 134
                     } else {
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
                     }
145 145
                 } 
146 146
             }
147
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
148
-            if(!empty($_FILES["videopagebanner"]["name"])) {
147
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
148
+            if (!empty($_FILES["videopagebanner"]["name"])) {
149 149
                 $target_dir = "dynamic/subscribe/";
150 150
                 $imageFileType = strtolower(pathinfo($_FILES["videopagebanner"]["name"], PATHINFO_EXTENSION));
151 151
                 $target_name = md5_file($_FILES["videopagebanner"]["tmp_name"]) . "." . $imageFileType;
@@ -155,14 +155,14 @@  discard block
 block discarded – undo
155 155
                 $uploadOk = true;
156 156
                 $movedFile = false;
157 157
     
158
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
159
-                    && $imageFileType != "gif" ) {
158
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
159
+                    && $imageFileType != "gif") {
160 160
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
161 161
                     $uploadOk = false;
162 162
                     goto skip;
163 163
                 }
164 164
     
165
-                if($uploadOk) { 
165
+                if ($uploadOk) { 
166 166
                     if (file_exists($target_file)) {
167 167
                         $movedFile = true;
168 168
                     } else {
@@ -180,71 +180,71 @@  discard block
 block discarded – undo
180 180
             }
181 181
         }
182 182
 
183
-        if(!empty($_POST['bio'])) { 
183
+        if (!empty($_POST['bio'])) { 
184 184
             $__user_u->update_row($_SESSION['siteusername'], "bio", $_POST['bio']);
185 185
         }
186 186
 
187
-        if(!empty($_POST['featuredchannels'])) { 
187
+        if (!empty($_POST['featuredchannels'])) { 
188 188
             $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['featuredchannels']);
189 189
         }
190 190
     
191
-        if(!empty($_POST['css'])) {
191
+        if (!empty($_POST['css'])) {
192 192
             $__user_u->update_row($_SESSION['siteusername'], "css", $_POST['css']);
193 193
         }
194 194
 
195
-        if(!empty($_POST['videoid'])) {
195
+        if (!empty($_POST['videoid'])) {
196 196
             $__user_u->update_row($_SESSION['siteusername'], "featured", $_POST['videoid']);
197 197
         }
198 198
 
199
-        if(!empty($_POST['solidcolor'])) {
199
+        if (!empty($_POST['solidcolor'])) {
200 200
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
201 201
         }
202 202
 
203
-        if(!empty($_POST['transparency'])) {
203
+        if (!empty($_POST['transparency'])) {
204 204
             $__user_u->update_row($_SESSION['siteusername'], "transparency", $_POST['transparency']);
205 205
         }
206 206
 
207
-        if(!empty($_POST['genre'])) {
207
+        if (!empty($_POST['genre'])) {
208 208
             $__user_u->update_row($_SESSION['siteusername'], "genre", $_POST['genre']);
209 209
         }
210 210
 
211
-        if(!empty($_POST['bordercolor'])) {
211
+        if (!empty($_POST['bordercolor'])) {
212 212
             $__user_u->update_row($_SESSION['siteusername'], "border_color", $_POST['bordercolor']);
213 213
         }
214 214
 
215
-        if(!empty($_POST['country'])) {
215
+        if (!empty($_POST['country'])) {
216 216
             $__user_u->update_row($_SESSION['siteusername'], "country", $_POST['country']);
217 217
         } // duplicate?
218 218
 
219
-        if(!empty($_POST['header'])) {
219
+        if (!empty($_POST['header'])) {
220 220
             $__user_u->update_row($_SESSION['siteusername'], "custom_header", $_POST['header']);
221 221
         }
222 222
 
223
-        if(!empty($_POST['customtext'])) {
223
+        if (!empty($_POST['customtext'])) {
224 224
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['customtext']);
225 225
         }
226 226
 
227
-        if(!empty($_POST['country'])) {
227
+        if (!empty($_POST['country'])) {
228 228
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['country']);
229 229
         } // duplicate?
230 230
 
231
-        if(!empty($_POST['website'])) {
231
+        if (!empty($_POST['website'])) {
232 232
             $__user_u->update_row($_SESSION['siteusername'], "website", $_POST['website']);
233 233
         }
234 234
     
235
-        if(!empty($_POST['channelboxcolor'])) {
235
+        if (!empty($_POST['channelboxcolor'])) {
236 236
             $__user_u->update_row($_SESSION['siteusername'], "secondary_color", $_POST['channelboxcolor']);
237 237
         }
238 238
 
239
-        if(!empty($_POST['backgroundcolor'])) {
239
+        if (!empty($_POST['backgroundcolor'])) {
240 240
             $__user_u->update_row($_SESSION['siteusername'], "third_color", $_POST['backgroundcolor']);
241 241
         }
242 242
 
243
-        if(!empty($_POST['textmaincolor'])) {
243
+        if (!empty($_POST['textmaincolor'])) {
244 244
             $__user_u->update_row($_SESSION['siteusername'], "primary_color_text", $_POST['textmaincolor']);
245 245
         }
246 246
 
247
-    if(!empty($_POST['bgoptionset'])) {
247
+    if (!empty($_POST['bgoptionset'])) {
248 248
         $bgoption = $_POST['bgoption'];
249 249
         $bgcolor = $_POST['solidcolor'];
250 250
         $default = "default.png";
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         
254 254
         $__user_u->update_row($_SESSION['siteusername'], "2009_bgcolor", $bgcolor);
255 255
 
256
-        if($bgoption == "solid") {
256
+        if ($bgoption == "solid") {
257 257
             $__user_u->update_row($_SESSION['siteusername'], "2009_bg", $default);
258 258
         }
259 259
     }
Please login to merge, or discard this patch.
web/public/s/classes/video_helper.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
         return true;
44 44
     }
45 45
 
46
-	public function __construct($conn){
46
+    public function __construct($conn){
47 47
         $this->__db = $conn;
48
-	}
48
+    }
49 49
 
50 50
     function fetch_video_views(string $id) {
51 51
         $stmt = $this->__db->prepare("SELECT * FROM views WHERE videoid = :id");
Please login to merge, or discard this patch.
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,14 +12,22 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function sh_exec(string $cmd, string $outputfile = "", string $pidfile = "", bool $mergestderror = true, bool $bg = false) {
14 14
         $fullcmd = $cmd;
15
-        if(strlen($outputfile) > 0) $fullcmd .= " >> " . $outputfile;
16
-        if($mergestderror) $fullcmd .= " 2>&1";
15
+        if(strlen($outputfile) > 0) {
16
+            $fullcmd .= " >> " . $outputfile;
17
+        }
18
+        if($mergestderror) {
19
+            $fullcmd .= " 2>&1";
20
+        }
17 21
         
18 22
         if($bg) {
19 23
             $fullcmd = "nohup " . $fullcmd . " &";
20
-            if(strlen($pidfile)) $fullcmd .= " echo $! > " . $pidfile;
24
+            if(strlen($pidfile)) {
25
+                $fullcmd .= " echo $! > " . $pidfile;
26
+            }
21 27
         } else {
22
-            if(strlen($pidfile) > 0) $fullcmd .= "; echo $$ > " . $pidfile;
28
+            if(strlen($pidfile) > 0) {
29
+                $fullcmd .= "; echo $$ > " . $pidfile;
30
+            }
23 31
         }
24 32
         shell_exec($fullcmd);
25 33
     }
@@ -34,8 +42,7 @@  discard block
 block discarded – undo
34 42
             }
35 43
     
36 44
             fclose($handle);
37
-        }
38
-        catch(Exception $e) {
45
+        } catch(Exception $e) {
39 46
             trigger_error("file_get_contents_chunked::" . $e->getMessage(),E_USER_NOTICE);
40 47
             return false;
41 48
         }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function sh_exec(string $cmd, string $outputfile = "", string $pidfile = "", bool $mergestderror = true, bool $bg = false) {
14 14
         $fullcmd = $cmd;
15
-        if(strlen($outputfile) > 0) $fullcmd .= " >> " . $outputfile;
16
-        if($mergestderror) $fullcmd .= " 2>&1";
15
+        if (strlen($outputfile) > 0) $fullcmd .= " >> " . $outputfile;
16
+        if ($mergestderror) $fullcmd .= " 2>&1";
17 17
         
18
-        if($bg) {
18
+        if ($bg) {
19 19
             $fullcmd = "nohup " . $fullcmd . " &";
20
-            if(strlen($pidfile)) $fullcmd .= " echo $! > " . $pidfile;
20
+            if (strlen($pidfile)) $fullcmd .= " echo $! > " . $pidfile;
21 21
         } else {
22
-            if(strlen($pidfile) > 0) $fullcmd .= "; echo $$ > " . $pidfile;
22
+            if (strlen($pidfile) > 0) $fullcmd .= "; echo $$ > " . $pidfile;
23 23
         }
24 24
         shell_exec($fullcmd);
25 25
     }
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
             $handle = fopen($file, "r");
30 30
             $i = 0;
31 31
             while (!feof($handle)) {
32
-                call_user_func_array($callback,array(fread($handle,$chunk_size),&$handle,$i));
32
+                call_user_func_array($callback, array(fread($handle, $chunk_size), &$handle, $i));
33 33
                 $i++;
34 34
             }
35 35
     
36 36
             fclose($handle);
37 37
         }
38
-        catch(Exception $e) {
39
-            trigger_error("file_get_contents_chunked::" . $e->getMessage(),E_USER_NOTICE);
38
+        catch (Exception $e) {
39
+            trigger_error("file_get_contents_chunked::" . $e->getMessage(), E_USER_NOTICE);
40 40
             return false;
41 41
         }
42 42
 
43 43
         return true;
44 44
     }
45 45
 
46
-	public function __construct($conn){
46
+	public function __construct($conn) {
47 47
         $this->__db = $conn;
48 48
 	}
49 49
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $stmt->execute();
62 62
         
63 63
         $views = 0;
64
-        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
64
+        while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
65 65
             $views = $views + $this->fetch_video_views($video['rid']);
66 66
         }
67 67
         return $views;
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
 
79 79
     function shorten_description(string $description, int $limit, bool $newlines = false) {
80 80
         $description = trim($description);
81
-        if(strlen($description) >= $limit) {
81
+        if (strlen($description) >= $limit) {
82 82
             $description = substr($description, 0, $limit) . "...";
83 83
         } 
84 84
 
85 85
         $description = htmlspecialchars($description);
86
-        if($newlines) { $description = str_replace(PHP_EOL, "<br>", $description); }
86
+        if ($newlines) { $description = str_replace(PHP_EOL, "<br>", $description); }
87 87
         return $description;
88 88
     }
89 89
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     }
97 97
 
98 98
     function get_video_likes($reciever, $liked) {
99
-        if($liked) {
99
+        if ($liked) {
100 100
             $stmt = $this->__db->prepare("SELECT `sender` FROM likes WHERE reciever = :reciever AND type = 'l'");
101 101
             $stmt->bindParam(":reciever", $reciever);
102 102
             $stmt->execute();
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     }
113 113
 
114 114
     function if_liked($user, $reciever, $liked) {
115
-        if($liked) {
115
+        if ($liked) {
116 116
             $stmt = $this->__db->prepare("SELECT `sender` FROM likes WHERE sender = :sender AND reciever = :reciever AND type = 'l'");
117 117
             $stmt->bindParam(":sender", $user);
118 118
             $stmt->bindParam(":reciever", $reciever);
Please login to merge, or discard this patch.
web/public/get/like_video.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
21 21
     $stmt = $__db->prepare("DELETE FROM likes WHERE sender = :username AND reciever = :reciever");
22 22
     $stmt->execute(array(
23
-      ':username' => $_SESSION['siteusername'],
24
-      ':reciever' => $name,
23
+        ':username' => $_SESSION['siteusername'],
24
+        ':reciever' => $name,
25 25
     ));
26 26
     header('Location: ' . $_SERVER['HTTP_REFERER']);
27 27
 }
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
34 34
     $stmt = $__db->prepare("DELETE FROM likes WHERE sender = :username AND reciever = :reciever");
35 35
     $stmt->execute(array(
36
-      ':username' => $_SESSION['siteusername'],
37
-      ':reciever' => $name,
36
+        ':username' => $_SESSION['siteusername'],
37
+        ':reciever' => $name,
38 38
     ));
39 39
     header('Location: ' . $_SERVER['HTTP_REFERER']);
40 40
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 $stmt->bindParam(":username", $_SESSION['siteusername']);
18 18
 $stmt->bindParam(":reciever", $name);
19 19
 $stmt->execute();
20
-while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
20
+while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
21 21
     $stmt = $__db->prepare("DELETE FROM likes WHERE sender = :username AND reciever = :reciever");
22 22
     $stmt->execute(array(
23 23
       ':username' => $_SESSION['siteusername'],
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 $stmt->bindParam(":username", $_SESSION['siteusername']);
31 31
 $stmt->bindParam(":reciever", $name);
32 32
 $stmt->execute();
33
-while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
33
+while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
34 34
     $stmt = $__db->prepare("DELETE FROM likes WHERE sender = :username AND reciever = :reciever");
35 35
     $stmt->execute(array(
36 36
       ':username' => $_SESSION['siteusername'],
Please login to merge, or discard this patch.