Test Failed
Pull Request — main (#18)
by
unknown
04:17
created
web/public/s/classes/video_helper.php 1 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/channel_feed.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 <?php $__db_h = new db_helper(); ?>
14 14
 <?php $__time_h = new time_helper(); ?>
15 15
 <?php
16
-	if(isset($_SESSION['siteusername']))
16
+	if (isset($_SESSION['siteusername']))
17 17
 	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18 18
 
19
-    if(!$__user_h->user_exists($_GET['n']))
19
+    if (!$__user_h->user_exists($_GET['n']))
20 20
         header("Location: /?userdoesntexist");
21 21
 
22 22
     $_user = $__user_h->fetch_user_username($_GET['n']);
@@ -69,28 +69,28 @@  discard block
 block discarded – undo
69 69
     $_user['genre'] = strtolower($_user['genre']);
70 70
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
71 71
 
72
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
73
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
74
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
75
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
76
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
77
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
72
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
73
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
74
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
75
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
76
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
77
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
78 78
 
79
-	if(isset($_SESSION['siteusername']))
79
+	if (isset($_SESSION['siteusername']))
80 80
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
81 81
 
82
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
82
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
83 83
         $error = array();
84 84
 
85
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
86
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
87
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
85
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
86
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
87
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
88 88
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
89 89
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
90
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
90
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
91 91
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
92 92
 
93
-        if(!isset($error['message'])) {
93
+        if (!isset($error['message'])) {
94 94
 			$text = $_POST['comment'];
95 95
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
96 96
 			$stmt->bindParam(":id", $_user['username']);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
102 102
 
103
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
103
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
104 104
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
105 105
             }
106 106
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
127 127
 		<style>
128 128
 			#content-container {
129
-				background-color: <?php echo $_user['primary_color'];  ?>;
129
+				background-color: <?php echo $_user['primary_color']; ?>;
130 130
 				background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>);
131 131
 				background-repeat: repeat;
132 132
 				background-position: center top;
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
143 143
 			<div id="content-container">
144 144
 				<!-- begin content -->
145
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
145
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
146 146
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
147 147
 				<?php } ?> 
148 148
 				<?php
149
-					if(empty(trim($_user['bio'])))
149
+					if (empty(trim($_user['bio'])))
150 150
 						$_user['bio'] = "This user has no description.";
151 151
 				?>
152 152
 				<div id="content">
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
202 202
 											</div>
203 203
 											<div class="upper-left-section enable-fancy-subscribe-button">
204
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
204
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
205 205
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
206 206
 														<button href="https://accounts.google.com/ServiceLogin?uilel=3&amp;service=youtube&amp;passive=true&amp;continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26feature%3Dsubscribe%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252Fuser%252F<?php echo htmlspecialchars($_user['username']); ?>%253Ffeature%253Dg-logo-xit&amp;hl=en_US&amp;ltmpl=sso" onclick=";window.location.href=this.getAttribute('href');return false;" title="" type="button" class="yt-subscription-button subscription-button-with-recommended-channels   yt-uix-button yt-uix-button-subscription yt-uix-tooltip" data-enable-hovercard="true" data-subscription-value="UCIwFjwMjI0y7PDBVEO9-bkQ" data-force-position="" data-position="" data-subscription-feature="channels3" data-subscription-type="channel" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
207 207
 														<span class="subscribed-label">Subscribed</span>
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 									</div>
268 268
 								</div>
269 269
 							</div>
270
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
270
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
271 271
 							<div id="branded-page-body">
272 272
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
273 273
 									<div class="tab-content-body">
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
                                                                         $stmt->bindParam(":comment_username", $_user['username']);
323 323
 																		$stmt->bindParam(":videos_username", $_user['username']);
324 324
                                                                         $stmt->execute();
325
-                                                                        while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
326
-																			if((int)$content['id']) {
325
+                                                                        while ($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
326
+																			if ((int) $content['id']) {
327 327
 																				$content = $__video_h->fetch_comment_id($content['id']);
328 328
 																				$content['video'] = $__video_h->fetch_video_rid($content['toid']);
329 329
 																				$content['type'] = "comment";
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 																				$content['type'] = "video";
333 333
 																			}
334 334
 
335
-																			if($content['type'] == "video") {
335
+																			if ($content['type'] == "video") {
336 336
                                                                     ?>
337 337
                                                                     <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg">
338 338
                                                                         <a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
                                                                         </div>
405 405
                                                                     </div>
406 406
                                                                     <?php } else { 
407
-																		if($__video_h->video_exists($content['video']['rid'])) { ?>
407
+																		if ($__video_h->video_exists($content['video']['rid'])) { ?>
408 408
 																	<div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw">
409 409
 																		<a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
410 410
 																		<span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo htmlspecialchars($content['author']); ?>" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($content['author']); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 														</div>
511 511
 														<hr class="yt-horizontal-rule ">
512 512
 													</div>
513
-													<?php if(!empty($_user['website'])) { ?>
513
+													<?php if (!empty($_user['website'])) { ?>
514 514
 														<div class="user-profile-item">
515 515
 															<div class="yt-c3-profile-custom-url field-container ">
516 516
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 															<h5>Country</h5>
560 560
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
561 561
 														</div>
562
-														<?php if($_user['genre'] != "none") { ?>
562
+														<?php if ($_user['genre'] != "none") { ?>
563 563
 															<div class="user-profile-item ">
564 564
 																<h5>Channel Genre</h5>
565 565
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
@@ -571,13 +571,13 @@  discard block
 block discarded – undo
571 571
 											</div>
572 572
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
573 573
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
574
-												<?php if(count($_user['featured_channels']) != 0) { ?>
574
+												<?php if (count($_user['featured_channels']) != 0) { ?>
575 575
 												<div class="module-view other-channels-view">
576 576
 													<h2>Featured Channels</h2>
577 577
 													<ul class="channel-summary-list ">
578 578
 														<?php 
579
-															foreach($_user['featured_channels'] as $user) {
580
-																if($__user_h->user_exists($user)) {
579
+															foreach ($_user['featured_channels'] as $user) {
580
+																if ($__user_h->user_exists($user)) {
581 581
 														?>
582 582
 															<li class="yt-tile-visible yt-uix-tile">
583 583
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -606,13 +606,13 @@  discard block
 block discarded – undo
606 606
 												$stmt->bindParam(":search", $_user['username']);
607 607
 												$stmt->execute();
608 608
 
609
-												if($stmt->rowCount() != 0) {
609
+												if ($stmt->rowCount() != 0) {
610 610
 											?>
611 611
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
612 612
 													<div class="module-view gh-featured">
613 613
 														<h2>Featured Playlists</h2>     
614 614
 														<?php
615
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
615
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
616 616
 															$playlist['videos'] = json_decode($playlist['videos']);
617 617
 														?> 
618 618
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/homepage.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 				<div id="content">
38 38
 					<div class="guide-layout-container enable-fancy-subscribe-button">
39 39
 						<div class="guide-container">
40
-						<?php if(!isset($_SESSION['siteusername'])) { ?>
40
+						<?php if (!isset($_SESSION['siteusername'])) { ?>
41 41
 									<div id="guide-builder-promo">
42 42
 								<h2>
43 43
 							Sign in to add channels to your homepage
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 							</div>
57 57
 							<div class="guide">
58 58
 							<?php 
59
-								if(isset($_SESSION['siteusername'])) {
59
+								if (isset($_SESSION['siteusername'])) {
60 60
 								?>
61 61
 								<div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata">
62 62
 								<a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 											</span>
168 168
 											</a>
169 169
 										</li>
170
-										<?php foreach($__server->featured_channels as $channel) { ?>
170
+										<?php foreach ($__server->featured_channels as $channel) { ?>
171 171
 											<li class="guide-item-container ">
172 172
 												<a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user">
173 173
 												<span class="thumb">  <span class="video-thumb ux-thumb yt-thumb-square-28 "><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/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 								<?php
206 206
 									$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
207 207
 									$stmt->execute();
208
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
208
+									while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
209 209
 										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
210 210
 										$video['duration'] = $__time_h->timestamp($video['duration']);
211 211
 										$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 								<?php
229 229
 									$stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4");
230 230
 									$stmt->execute();
231
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
231
+									while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
232 232
 										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
233 233
 										$video['duration'] = $__time_h->timestamp($video['duration']);
234 234
 										$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 											<?php
262 262
 												$stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20");
263 263
 												$stmt->execute();
264
-												while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
264
+												while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
265 265
 													$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
266 266
 													$video['duration'] = $__time_h->timestamp($video['duration']);
267 267
 													$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
web/public/results.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 
20 20
    $results_per_page = 12;
21 21
    $number_of_result = $request->search_amount;
22
-   $number_of_page = ceil ($number_of_result / $results_per_page);  
22
+   $number_of_page = ceil($number_of_result/$results_per_page);  
23 23
 
24
-   if (!isset ($_GET['page']) ) {  
24
+   if (!isset ($_GET['page'])) {  
25 25
        $page = 1;  
26 26
    } else {  
27
-       $page = (int)$_GET['page'];  
27
+       $page = (int) $_GET['page'];  
28 28
    }  
29 29
 
30
-   $page_first_result = ($page - 1) * $results_per_page;  
30
+   $page_first_result = ($page - 1)*$results_per_page;  
31 31
 
32 32
    $stmt6 = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper");
33 33
    $stmt6->bindParam(":search", $request->like_search_term);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                   <div id="results-main-content">
214 214
                      <ol id="search-results">
215 215
                         <?php
216
-                           while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
216
+                           while ($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
217 217
                               $video['video_responses'] = $__video_h->get_video_responses($video['rid']);
218 218
                               $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
219 219
                               $video['duration'] = $__time_h->timestamp($video['duration']);
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
             </div>
259 259
             <div id="search-footer-box" class="searchFooterBox">
260 260
                <div class="yt-uix-pager" role="navigation">
261
-                  <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
261
+                  <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
262 262
                      <a href="/results?search_query=<?php echo $request->search_term; ?>&page=<?php echo $page; ?>">
263 263
                         <button class="yt-uix-button yt-uix-button-default"><?php echo $page; ?></button>
264 264
                      </a>
Please login to merge, or discard this patch.
web/public/view_playlist.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 <?php
15 15
     $_playlist = $__video_h->fetch_playlist_rid($_GET['v']);
16 16
 
17
-    if(!$__user_h->user_exists($_playlist['author']))
17
+    if (!$__user_h->user_exists($_playlist['author']))
18 18
         header("Location: /?userdoesntexist");    
19 19
 
20 20
     $_user = $__user_h->fetch_user_username($_playlist['author']);
@@ -66,28 +66,28 @@  discard block
 block discarded – undo
66 66
     $_user['genre'] = strtolower($_user['genre']);
67 67
 	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
68 68
 
69
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
70
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
71
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
72
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
73
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
74
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
69
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
70
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
71
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
72
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
73
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
74
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
75 75
 
76
-	if(isset($_SESSION['siteusername']))
76
+	if (isset($_SESSION['siteusername']))
77 77
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
78 78
 
79
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
79
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
80 80
         $error = array();
81 81
 
82
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
83
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
84
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
82
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
83
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
84
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
85 85
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
86 86
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
87
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
87
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
88 88
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
89 89
 
90
-        if(!isset($error['message'])) {
90
+        if (!isset($error['message'])) {
91 91
 			$text = $_POST['comment'];
92 92
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
93 93
 			$stmt->bindParam(":id", $_user['username']);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
99 99
 
100
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
100
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
101 101
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
102 102
             }
103 103
         }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
126 126
 		<style>
127 127
 			#content-container {
128
-				background-color: <?php echo $_user['primary_color'];  ?>;
128
+				background-color: <?php echo $_user['primary_color']; ?>;
129 129
 				background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>);
130 130
 				background-repeat: repeat;
131 131
 				background-position: center top;
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
142 142
 			<div id="content-container">
143 143
 				<!-- begin content -->
144
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
144
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
145 145
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
146 146
 				<?php } ?>
147 147
 				<?php
148
-					if(empty(trim($_user['bio'])))
148
+					if (empty(trim($_user['bio'])))
149 149
 						$_user['bio'] = "This user has no description.";
150 150
 				?>
151 151
 				<div id="content">
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 												</div>
206 206
 											</div>
207 207
 											<div class="upper-left-section enable-fancy-subscribe-button">
208
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
208
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
209 209
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
210 210
 														<button 
211 211
 															href="#" 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 															title="" 
214 214
 															id="subscribe-button"
215 215
 															type="button" 
216
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
216
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
217 217
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
218 218
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
219 219
 														<span class="subscribed-label">Subscribed</span>
@@ -247,12 +247,12 @@  discard block
 block discarded – undo
247 247
 									</div>
248 248
 								</div>
249 249
 							</div>
250
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
250
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
251 251
 							<div id="branded-page-body">
252 252
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
253 253
 									<div class="tab-content-body">
254 254
 										<div class="primary-pane">
255
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
255
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
256 256
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
257 257
 												<div class="module-view featured-video-view-module">
258 258
 													<div class="channels-video-player " data-swf-config="{&quot;assets&quot;: {&quot;html&quot;: &quot;\/html5_player_template&quot;, &quot;css&quot;: &quot;http:\/\/s.ytimg.com\/yt\/cssbin\/www-player-vfllhw7HB.css&quot;, &quot;js&quot;: &quot;http:\/\/s.ytimg.com\/yt\/jsbin\/html5player-vflzTrRqK.js&quot;}, &quot;url&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/watch_as3-vflbPspVE.swf&quot;, &quot;min_version&quot;: &quot;8.0.0&quot;, &quot;args&quot;: {&quot;ttsurl&quot;: &quot;http:\/\/www.youtube.com\/api\/timedtext?sparams=asr_langs%2Ccaps%2Cv%2Cexpire\u0026asr_langs=en%2Cko%2Cja%2Ces\u0026v=/watch?v=<?php echo $video['rid']; ?>\u0026caps=asr\u0026expire=1339746882\u0026key=yttt1\u0026signature=A1B858FF427B45672676C7403417ED1F4091A806.C347A6021C0F843E46F2056AEBA38FC93A0A47B8\u0026hl=en_US&quot;, &quot;el&quot;: &quot;profilepage&quot;, &quot;fexp&quot;: &quot;904001,907342,904824,910206,908620,907217,907335,921602,919306,922600,919316,920704,912804,913542,919324,912706&quot;, &quot;url_encoded_fmt_stream_map&quot;: &quot;url=http%3A%2F%2Fo-o.preferred.nuq04s10.v1.lscache4.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D44%26ip%3D207.0.0.0%26signature%3D9B9B5ECF02F2F66BDCCB0ACED26D3406F9F83241.1B2CC833461E3D2C4D081B7DFBC65B0948C61FB9%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=large\u0026fallback_host=tc.v1.cache4.c.youtube.com\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026itag=44,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v14.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D35%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3DB702D7CA72653169BDC2C945B5A35F4A23A3FEBF.ACC660CDAB11901FF8D3DA8D384D61F0AB0F0125%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=large\u0026fallback_host=tc.v14.cache1.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=35,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v24.lscache3.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D43%26ip%3D207.0.0.0%26signature%3D9FABDD8C013AA137B87DF2D154D1B90E6827A2A3.880FECDEC066236D85FCF223CF472B62B8F9B3A4%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v24.cache3.c.youtube.com\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026itag=43,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v3.lscache7.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D34%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D1BA326B784DAA9F62FD789CBB5C2FABFCD5D351C.C4618E3AB2AB08C61C6A982A36F405DA886B5D5A%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v3.cache7.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=34,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v14.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D18%26ip%3D207.0.0.0%26signature%3D8806EA8FAE16557A2F9732068442133EA0A0760F.D91694A47E6B0BF627965CDA46010F36105A28FE%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v14.cache1.c.youtube.com\u0026type=video%2Fmp4%3B+codecs%3D%22avc1.42001E%2C+mp4a.40.2%22\u0026itag=18,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v4.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D5%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D011CB6739AB60ED79D032DE2F62EB016D8A8E462.C2C0ABE42F26DBA18F2BC6E0D074EB99A95C0DF0%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=small\u0026fallback_host=tc.v4.cache1.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=5,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v12.lscache3.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D36%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D988FDD37CBA8DB74C1148EE17921D8549434297C.A2C1796F2BA0427C9FE370BFB6B3B09BA1D81B07%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=small\u0026fallback_host=tc.v12.cache3.c.youtube.com\u0026type=video%2F3gpp\u0026itag=36&quot;, &quot;allow_embed&quot;: 1, &quot;vq&quot;: &quot;auto&quot;, &quot;account_playback_token&quot;: &quot;&quot;, &quot;allow_ratings&quot;: 1, &quot;keywords&quot;: &quot;Rehearsal,Dance,justin,bieber,believe,as,long,you,love,me,rodney,jerkins,pattie,mallette,jeremy,dad,mom,scooter,braun,island,def,jam,usher,rbmg,making,of,the,album,webisode,june,19th,19,new,amazing,song,big,sean,hit,record,<?php echo htmlspecialchars($_user['username']); ?>,always,still,studio,singing,kuk,harrell,producer,sing,boy,guy,man,smash,single,nick,demoura,dancers,sweat,beliebers,hard,work,tour,band&quot;, &quot;cc3_module&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/subtitles3_module-vflu_Qeod.swf&quot;, &quot;track_embed&quot;: 0, &quot;is_purchased&quot;: false, &quot;ps&quot;: &quot;default&quot;, &quot;fmt_list&quot;: &quot;44\/854x480\/99\/0\/0,35\/854x480\/9\/0\/115,43\/640x360\/99\/0\/0,34\/640x360\/9\/0\/115,18\/640x360\/9\/0\/115,5\/320x240\/7\/0\/0,36\/320x240\/99\/0\/0&quot;, &quot;author&quot;: &quot;<?php echo htmlspecialchars($_user['username']); ?>&quot;, &quot;muted&quot;: &quot;0&quot;, &quot;cc_module&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/subtitle_module-vflq8KnSi.swf&quot;, &quot;length_seconds&quot;: 82, &quot;feature&quot;: &quot;g-logo-xit&quot;, &quot;enablejsapi&quot;: 1, &quot;rel&quot;: 0, &quot;plid&quot;: &quot;AATCeEL9eg3Ls9t-&quot;, &quot;cc_font&quot;: &quot;Arial Unicode MS, arial, verdana, _sans&quot;, &quot;ftoken&quot;: &quot;&quot;, &quot;sdetail&quot;: &quot;f:g-logo-xit,p:\/&quot;, &quot;status&quot;: &quot;ok&quot;, &quot;cc_asr&quot;: 1, &quot;watermark&quot;: &quot;,http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_watermark-vflHX6b6E.png,http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_hd_watermark-vflAzLcD6.png&quot;, &quot;sourceid&quot;: &quot;y&quot;, &quot;timestamp&quot;: 1339721682, &quot;has_cc&quot;: true, &quot;view_count&quot;: 2600, &quot;quality_cap&quot;: &quot;highres&quot;, &quot;hl&quot;: &quot;en_US&quot;, &quot;tmi&quot;: &quot;1&quot;, &quot;no_get_video_log&quot;: &quot;1&quot;, &quot;eurl&quot;: &quot;http:\/\/www.youtube.com\/user\/<?php echo htmlspecialchars($_user['username']); ?>&quot;, &quot;iurl&quot;: &quot;http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/hqdefault.jpg&quot;, &quot;endscreen_module&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/endscreen-vflJBKwqC.swf&quot;, &quot;referrer&quot;: &quot;http:\/\/www.youtube.com\/&quot;, &quot;avg_rating&quot;: 4.97805486284, &quot;video_id&quot;: &quot;/watch?v=<?php echo $video['rid']; ?>&quot;, &quot;sendtmp&quot;: &quot;1&quot;, &quot;sk&quot;: &quot;bwv_lGOGF4u1g0p7puy7ERICN8NZ5cVFC&quot;, &quot;is_video_preview&quot;: false, &quot;token&quot;: &quot;vjVQa1PpcFMSYb-unvOiIgSL8pW9tObJUMfrEc1mxfE=&quot;, &quot;thumbnail_url&quot;: &quot;http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/default.jpg&quot;, &quot;iurlsd&quot;: &quot;http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/sddefault.jpg&quot;, &quot;autoplay&quot;: &quot;1&quot;}, &quot;url_v9as2&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/cps-vflhvG6F4.swf&quot;, &quot;params&quot;: {&quot;allowscriptaccess&quot;: &quot;always&quot;, &quot;allowfullscreen&quot;: &quot;true&quot;, &quot;bgcolor&quot;: &quot;#000000&quot;}, &quot;attrs&quot;: {&quot;width&quot;: &quot;640&quot;, &quot;id&quot;: &quot;movie_player&quot;, &quot;height&quot;: &quot;390&quot;}, &quot;url_v8&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/cps-vflhvG6F4.swf&quot;, &quot;html5&quot;: false}" data-video-id="/watch?v=<?php echo $video['rid']; ?>">
@@ -308,8 +308,8 @@  discard block
 block discarded – undo
308 308
 															<?php
309 309
 																$_playlist['videos'] = json_decode($_playlist['videos']);
310 310
 																$_playlist['count'] = 1;
311
-																foreach($_playlist['videos'] as $video) {
312
-																	if($__video_h->video_exists($video)) {
311
+																foreach ($_playlist['videos'] as $video) {
312
+																	if ($__video_h->video_exists($video)) {
313 313
 																		$_video = $__video_h->fetch_video_rid($video);
314 314
 																		$_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
315 315
 																		$_video['age'] = $__time_h->time_elapsed_string($_video['publish']);		
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 														</div>
409 409
 														<hr class="yt-horizontal-rule ">
410 410
 													</div>
411
-													<?php if(!empty($_user['website'])) { ?>
411
+													<?php if (!empty($_user['website'])) { ?>
412 412
 														<div class="user-profile-item">
413 413
 															<div class="yt-c3-profile-custom-url field-container ">
414 414
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 															<h5>Country</h5>
458 458
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
459 459
 														</div>
460
-														<?php if($_user['genre'] != "none") { ?>
460
+														<?php if ($_user['genre'] != "none") { ?>
461 461
 															<div class="user-profile-item ">
462 462
 																<h5>Channel Genre</h5>
463 463
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
@@ -469,13 +469,13 @@  discard block
 block discarded – undo
469 469
 											</div>
470 470
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
471 471
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
472
-												<?php if(count($_user['featured_channels']) != 0) { ?>
472
+												<?php if (count($_user['featured_channels']) != 0) { ?>
473 473
 												<div class="module-view other-channels-view">
474 474
 													<h2>Featured Channels</h2>
475 475
 													<ul class="channel-summary-list ">
476 476
 														<?php 
477
-															foreach($_user['featured_channels'] as $user) {
478
-																if($__user_h->user_exists($user)) {
477
+															foreach ($_user['featured_channels'] as $user) {
478
+																if ($__user_h->user_exists($user)) {
479 479
 														?>
480 480
 															<li class="yt-tile-visible yt-uix-tile">
481 481
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -504,13 +504,13 @@  discard block
 block discarded – undo
504 504
 												$stmt->bindParam(":search", $_user['username']);
505 505
 												$stmt->execute();
506 506
 
507
-												if($stmt->rowCount() != 0) {
507
+												if ($stmt->rowCount() != 0) {
508 508
 											?>
509 509
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
510 510
 													<div class="module-view gh-featured">
511 511
 														<h2>Featured Playlists</h2>     
512 512
 														<?php
513
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
513
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
514 514
 															$playlist['videos'] = json_decode($playlist['videos']);
515 515
 														?> 
516 516
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/subscriptions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php $__user_h = new user_helper($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <!DOCTYPE html>
15 15
 <html dir="ltr">
16 16
 	<head>
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                                 ?>                    
161 161
                                 
162 162
                                 <div class="my_videos_ajax">                                  
163
-                                    <?php while($user = $stmt->fetch(PDO::FETCH_ASSOC)) {  ?> 
163
+                                    <?php while ($user = $stmt->fetch(PDO::FETCH_ASSOC)) {  ?> 
164 164
                                         <div style="width: 33%;display: inline-block;">
165 165
                                             <img style="width: 50px;height:50px;" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($user['reciever']); ?>">
166 166
                                             <span style="display: inline-block; vertical-align:top;width: 100px;font-size: 11px;">
Please login to merge, or discard this patch.
web/public/uploaded_video.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  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
-	if(!$__video_h->video_exists($_GET['v']))
11
+	if (!$__video_h->video_exists($_GET['v']))
12 12
 		header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag.");
13 13
 
14 14
 	$video = $__video_h->fetch_video_rid($_GET['v']);
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	$video['title'] = htmlspecialchars($video['title']);
21 21
 	$video['description'] = $__video_h->shorten_description($video['description'], 50);
22 22
 
23
-    if($_SESSION['siteusername'] != $video['author'])
23
+    if ($_SESSION['siteusername'] != $video['author'])
24 24
         header("Location: /");
25 25
 ?>
26 26
 <!DOCTYPE html>
Please login to merge, or discard this patch.
web/public/get/add_to_playlist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 <?php
12 12
 $playlist = $__video_h->fetch_playlist_rid($_GET['playlist']);
13 13
 
14
-if($playlist['author'] == $_SESSION['siteusername']) {
14
+if ($playlist['author'] == $_SESSION['siteusername']) {
15 15
     $b = json_decode($playlist['videos']);
16 16
     array_push($b, $_GET['id']);
17 17
     $b = json_encode($b);
Please login to merge, or discard this patch.
web/public/index.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 				<div id="content">
38 38
 					<div class="guide-layout-container enable-fancy-subscribe-button">
39 39
 						<div class="guide-container">
40
-						<?php if(!isset($_SESSION['siteusername'])) { ?>
40
+						<?php if (!isset($_SESSION['siteusername'])) { ?>
41 41
 									<div id="guide-builder-promo">
42 42
 								<h2>
43 43
 							Sign in to add channels to your homepage
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 							</div>
57 57
 							<div class="guide">
58 58
 							<?php 
59
-								if(isset($_SESSION['siteusername'])) {
59
+								if (isset($_SESSION['siteusername'])) {
60 60
 								?>
61 61
 								<div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata">
62 62
 								<a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 											</span>
168 168
 											</a>
169 169
 										</li>
170
-                                        <?php if(!isset($_SESSION['siteusername'])) { ?>
171
-                                            <?php foreach($__server->featured_channels as $channel) { ?>
170
+                                        <?php if (!isset($_SESSION['siteusername'])) { ?>
171
+                                            <?php foreach ($__server->featured_channels as $channel) { ?>
172 172
                                                 <li class="guide-item-container ">
173 173
                                                     <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user">
174 174
                                                     <span class="thumb">  <span class="video-thumb ux-thumb yt-thumb-square-28 "><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/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                                                 $stmt = $__db->prepare("SELECT * FROM subscribers WHERE sender = :username ORDER BY id DESC LIMIT 20");
184 184
                                                 $stmt->bindParam(":username", $_SESSION['siteusername']);
185 185
                                                 $stmt->execute();
186
-                                                while($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
186
+                                                while ($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
187 187
                                                 <li class="guide-item-container ">
188 188
                                                     <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user">
189 189
                                                     <span class="thumb">  <span class="video-thumb ux-thumb yt-thumb-square-28 "><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/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 								<?php
223 223
 									$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
224 224
 									$stmt->execute();
225
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
225
+									while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
226 226
 										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
227 227
 										$video['duration'] = $__time_h->timestamp($video['duration']);
228 228
 										$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 featured = 'v' ORDER BY id DESC 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']);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 											<?php
279 279
 												$stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20");
280 280
 												$stmt->execute();
281
-												while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
281
+												while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
282 282
 													$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
283 283
 													$video['duration'] = $__time_h->timestamp($video['duration']);
284 284
 													$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.