Test Failed
Push — main ( 594560...d41f84 )
by chief
05:05 queued 02:09
created
web/public/api/get_user_info.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
     "status" => 201,
15 15
 ];
16 16
 
17
-if(!isset($_GET['u']))                  { $response->status = 400; die(json_encode($response)); } 
18
-if(!$__user_h->user_exists($_GET['u'])) { $response->status = 400; die(json_encode($response)); }
17
+if (!isset($_GET['u'])) { $response->status = 400; die(json_encode($response)); } 
18
+if (!$__user_h->user_exists($_GET['u'])) { $response->status = 400; die(json_encode($response)); }
19 19
 
20 20
 $_user = $__user_h->fetch_user_username($_GET['u']);
21 21
 $response = (object) [
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 $_user['featured_channels'] = explode($_user['featured_channels'], ",");
41 41
 $_user['featured_channels_object'] = (object) [];
42 42
 $i = 0;
43
-foreach($_user['featured_channels'] as $channel) {
43
+foreach ($_user['featured_channels'] as $channel) {
44 44
     $_user['featured_channels_object']->$i = $channel;
45 45
 }
46 46
 
Please login to merge, or discard this patch.
web/public/d/admin.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13 13
 <?php
14
-    if(!isset($_SESSION['siteusername'])) { die(); }
15
-    if(!$__user_h->if_admin($_SESSION['siteusername'])) { die(); }
14
+    if (!isset($_SESSION['siteusername'])) { die(); }
15
+    if (!$__user_h->if_admin($_SESSION['siteusername'])) { die(); }
16 16
 
17 17
     $request = (object) [
18 18
         "action" => $_GET['action'],
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
     );
50 50
     $request->tables_increment = 0;
51 51
 
52
-    if($request->action == "ban_users") {        
53
-        foreach($request->users as $username) {
52
+    if ($request->action == "ban_users") {        
53
+        foreach ($request->users as $username) {
54 54
             $stmt = $__db->prepare("DELETE FROM users WHERE username=:username");
55 55
             $stmt->execute(array(
56 56
                 ':username' => $username,
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 
134 134
             header("Location: /admin/bans");
135 135
         }
136
-    } else if($request->action == "delete_videos") {
137
-        foreach($request->videos as $video) {
136
+    } else if ($request->action == "delete_videos") {
137
+        foreach ($request->videos as $video) {
138 138
             $stmt = $__db->prepare("DELETE FROM videos WHERE rid=:video");
139 139
             $stmt->execute(array(
140 140
                 ':video' => $video,
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
             header("Location: /admin/bans");
144 144
         }
145
-    } else if($request->action == "actually_just_ban") {
145
+    } else if ($request->action == "actually_just_ban") {
146 146
         $stmt = $__db->prepare("INSERT INTO bans (username, reason, expire, moderator) VALUES (:username, :reason, now(), :moderator)");
147 147
         $stmt->execute(array(
148 148
             ':username'  => $_POST['users'],
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         ));
152 152
 
153 153
         header("Location: /admin/bans");
154
-    } else if($request->action == "actually_just_ban_ip") {
154
+    } else if ($request->action == "actually_just_ban_ip") {
155 155
         $_user = $__user_h->fetch_user_username($_POST['users']);
156 156
 
157 157
         $stmt = $__db->prepare("INSERT INTO bans (username, reason, expire, moderator) VALUES (:username, :reason, now(), :moderator)");
Please login to merge, or discard this patch.
web/public/das_captcha.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         <div id="page" class="">
50 50
         <!-- begin pagetop -->
51 51
   
52
-        <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php");?> </div>
52
+        <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?> </div>
53 53
   <!-- end pagetop -->
54 54
   <!-- begin pagemiddle -->
55 55
   <div id="content-container">
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
       
59 59
   <p class="largeText">Sorry for the interruption. We have been receiving a large volume of requests from your network. To continue with your SubRocks experience, please enter the verification code below.</p>
60 60
 
61
-<form method="post" action="/das_captcha?next=<?php echo $next;?>">
61
+<form method="post" action="/das_captcha?next=<?php echo $next; ?>">
62 62
 <script type="text/javascript" src="/s/js/captcha.js"></script>
63 63
 <noscript>
64 64
 You need JavaScript to pass the captcha!
Please login to merge, or discard this patch.
web/public/s/mod/sidebar_about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
 
35 35
 <div id="browse-side-column" class="ytg-2col ytg-last">
36 36
     <ol class="navigation-menu">
37
-        <?php foreach($__tabs as $_tab) { 
38
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
37
+        <?php foreach ($__tabs as $_tab) { 
38
+            if ($_SERVER['REQUEST_URI'] != $_tab->url)
39 39
                 $_tab->selected = true;
40 40
             ?>
41 41
             <li class="menu-item">
Please login to merge, or discard this patch.
web/public/channel_feed.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14 14
 <?php
15
-	if(isset($_SESSION['siteusername']))
15
+	if (isset($_SESSION['siteusername']))
16 16
 	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17 17
 
18
-    if(!$__user_h->user_exists($_GET['n']))
18
+    if (!$__user_h->user_exists($_GET['n']))
19 19
         header("Location: /?userdoesntexist");
20 20
 
21 21
     $_user = $__user_h->fetch_user_username($_GET['n']);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	$stmt->bindParam(":username", $_user['username']);
25 25
 	$stmt->execute();
26 26
 
27
-	while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
27
+	while ($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
28 28
 		header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines.");
29 29
 	}
30 30
 
@@ -76,28 +76,28 @@  discard block
 block discarded – undo
76 76
     $_user['genre'] = strtolower($_user['genre']);
77 77
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
78 78
 
79
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
80
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
81
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
82
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
83
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
84
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
79
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
80
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
81
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
82
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
83
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
84
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
85 85
 
86
-	if(isset($_SESSION['siteusername']))
86
+	if (isset($_SESSION['siteusername']))
87 87
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
88 88
 
89
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
89
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
90 90
         $error = array();
91 91
 
92
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
93
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
94
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
92
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
93
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
94
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
95 95
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
96 96
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
97
-        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; }
97
+        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; }
98 98
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
99 99
 
100
-        if(!isset($error['message'])) {
100
+        if (!isset($error['message'])) {
101 101
 			$text = $_POST['comment'];
102 102
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
103 103
 			$stmt->bindParam(":id", $_user['username']);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
109 109
 
110
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
110
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
111 111
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
112 112
             }
113 113
         }
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
142 142
 		<style>
143 143
 			#content-container {
144
-				background-color: <?php echo $_user['primary_color'];  ?>;
144
+				background-color: <?php echo $_user['primary_color']; ?>;
145 145
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
146 146
 				background-repeat: repeat;
147 147
 				<?php
148
-					switch($_user['2012_bgoption']) {
148
+					switch ($_user['2012_bgoption']) {
149 149
 						case "stretch":
150 150
 						echo "background-size: cover;";
151 151
 						break;
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
179 179
 			<div id="content-container">
180 180
 				<!-- begin content -->
181
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
181
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
182 182
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
183 183
 				<?php } ?> 
184 184
 				<?php
185
-					if(empty(trim($_user['bio'])))
185
+					if (empty(trim($_user['bio'])))
186 186
 						$_user['bio'] = "This user has no description.";
187 187
 				?>
188 188
 				<div id="content">
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
238 238
 											</div>
239 239
 											<div class="upper-left-section enable-fancy-subscribe-button">
240
-											<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
240
+											<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
241 241
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
242 242
 														<button 
243 243
 															href="#" 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 															title="" 
246 246
 															id="subscribe-button"
247 247
 															type="button" 
248
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
248
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
249 249
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
250 250
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
251 251
 														<span class="subscribed-label">Subscribed</span>
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 												<?php } else { ?>
262 262
 
263 263
 												<?php } ?>
264
-												<?php if($__user_h->if_partner($_user['username'])) { ?>
264
+												<?php if ($__user_h->if_partner($_user['username'])) { ?>
265 265
 													<img style="width: 29px;vertical-align: middle;margin-left: 10px;" title="This user is a SubRocks partner" src="/yt/imgbin/RenderedImage.png">
266 266
 												<?php } ?>
267 267
 											</div>
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 									</div>
315 315
 								</div>
316 316
 							</div>
317
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
317
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
318 318
 							<div id="branded-page-body">
319 319
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_feed.php"); ?></div>
320 320
 							</div>
Please login to merge, or discard this patch.
web/public/channel_videos.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14 14
 <?php
15
-	if(isset($_SESSION['siteusername']))
15
+	if (isset($_SESSION['siteusername']))
16 16
 	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17 17
 
18
-    if(!$__user_h->user_exists($_GET['n']))
18
+    if (!$__user_h->user_exists($_GET['n']))
19 19
         header("Location: /?userdoesntexist");
20 20
 
21 21
     $_user = $__user_h->fetch_user_username($_GET['n']);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	$stmt->bindParam(":username", $_user['username']);
25 25
 	$stmt->execute();
26 26
 
27
-	while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
27
+	while ($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
28 28
 		header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines.");
29 29
 	}
30 30
 
@@ -76,28 +76,28 @@  discard block
 block discarded – undo
76 76
     $_user['genre'] = strtolower($_user['genre']);
77 77
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
78 78
 
79
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
80
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
81
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
82
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
83
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
84
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
79
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
80
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
81
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
82
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
83
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
84
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
85 85
 
86
-	if(isset($_SESSION['siteusername']))
86
+	if (isset($_SESSION['siteusername']))
87 87
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
88 88
 
89
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
89
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
90 90
         $error = array();
91 91
 
92
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
93
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
94
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
92
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
93
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
94
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
95 95
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
96 96
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
97
-        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; }
97
+        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; }
98 98
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
99 99
 
100
-        if(!isset($error['message'])) {
100
+        if (!isset($error['message'])) {
101 101
 			$text = $_POST['comment'];
102 102
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
103 103
 			$stmt->bindParam(":id", $_user['username']);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
109 109
 
110
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
110
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
111 111
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
112 112
             }
113 113
         }
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
142 142
 		<style>
143 143
 			#content-container {
144
-				background-color: <?php echo $_user['primary_color'];  ?>;
144
+				background-color: <?php echo $_user['primary_color']; ?>;
145 145
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
146 146
 				background-repeat: repeat;
147 147
 				<?php
148
-					switch($_user['2012_bgoption']) {
148
+					switch ($_user['2012_bgoption']) {
149 149
 						case "stretch":
150 150
 						echo "background-size: cover;";
151 151
 						break;
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
179 179
 			<div id="content-container">
180 180
 				<!-- begin content -->
181
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
181
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
182 182
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
183 183
 				<?php } ?> 
184 184
 				<div id="content">
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
234 234
 											</div>
235 235
 											<div class="upper-left-section enable-fancy-subscribe-button">
236
-											<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
236
+											<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
237 237
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
238 238
 														<button 
239 239
 															href="#" 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 															title="" 
242 242
 															id="subscribe-button"
243 243
 															type="button" 
244
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
244
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
245 245
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
246 246
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
247 247
 														<span class="subscribed-label">Subscribed</span>
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 												<?php } else { ?>
258 258
 
259 259
 												<?php } ?>
260
-												<?php if($__user_h->if_partner($_user['username'])) { ?>
260
+												<?php if ($__user_h->if_partner($_user['username'])) { ?>
261 261
 													<img style="width: 29px;vertical-align: middle;margin-left: 10px;" title="This user is a SubRocks partner" src="/yt/imgbin/RenderedImage.png">
262 262
 												<?php } ?>
263 263
 											</div>
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 									</div>
311 311
 								</div>
312 312
 							</div>
313
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
313
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
314 314
 							<div id="branded-page-body">
315 315
                                 <div class="channel-tab-content channel-layout-full-width">
316 316
                                     <div class="tab-content-body">
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 														$stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC");
345 345
 														$stmt->bindParam(":username", $_user['username']);
346 346
 														$stmt->execute();
347
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
347
+														while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
348 348
 															$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
349 349
 															$video['duration'] = $__time_h->timestamp($video['duration']);
350 350
 															$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
web/public/d/channel_update.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
     }
17 17
 
18 18
 
19
-        if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
20
-            if(!empty($_GET["n"]) && $_GET['n'] == "pfp") {
19
+        if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
20
+            if (!empty($_GET["n"]) && $_GET['n'] == "pfp") {
21 21
                 $target_dir = "../dynamic/pfp/";
22 22
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
23 23
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
                 $uploadOk = true;
28 28
                 $movedFile = false;
29 29
         
30
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
31
-                    && $imageFileType != "gif" ) {
30
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
31
+                    && $imageFileType != "gif") {
32 32
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
33 33
                     $uploadOk = false;
34 34
                     goto skip;
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
                     }
52 52
                 }
53 53
             }
54
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
55
-            if(!empty($_FILES["backgroundbgset"]["name"])) {
54
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
55
+            if (!empty($_FILES["backgroundbgset"]["name"])) {
56 56
                 $target_dir = "../dynamic/banners/";
57 57
                 $imageFileType = strtolower(pathinfo($_FILES["backgroundbgset"]["name"], PATHINFO_EXTENSION));
58 58
                 $target_name = md5_file($_FILES["backgroundbgset"]["tmp_name"]) . "." . $imageFileType;
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
                 $uploadOk = true;
63 63
                 $movedFile = false;
64 64
     
65
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
66
-                    && $imageFileType != "gif" ) {
65
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
66
+                    && $imageFileType != "gif") {
67 67
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
68 68
                     $uploadOk = false;
69 69
                     goto skip;
70 70
                 }
71 71
     
72
-                if($uploadOk) { 
72
+                if ($uploadOk) { 
73 73
                     if (file_exists($target_file)) {
74 74
                         $movedFile = true;
75 75
                     } else {
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
                     }
86 86
                 }
87 87
             }
88
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['watchsubset']) {
88
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['watchsubset']) {
89 89
             echo "asdas";
90
-            if(!empty($_FILES["watchsubset"]["name"])) {
90
+            if (!empty($_FILES["watchsubset"]["name"])) {
91 91
                 echo "asdas";
92 92
 
93 93
                 $target_dir = "../dynamic/banners/";
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
                 $uploadOk = true;
100 100
                 $movedFile = false;
101 101
     
102
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
103
-                    && $imageFileType != "gif" ) {
102
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
103
+                    && $imageFileType != "gif") {
104 104
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
105 105
                     $uploadOk = false;
106 106
                     goto skip;
107 107
                 }
108 108
     
109
-                if($uploadOk) { 
109
+                if ($uploadOk) { 
110 110
                     if (file_exists($target_file)) {
111 111
                         $movedFile = true;
112 112
                     } else {
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
                     }
123 123
                 }
124 124
             }
125
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
126
-            if(!empty($_FILES["file"]["name"])) {
125
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
126
+            if (!empty($_FILES["file"]["name"])) {
127 127
                 $target_dir = "../dynamic/banners/";
128 128
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
129 129
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
                 $uploadOk = true;
134 134
                 $movedFile = false;
135 135
     
136
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
137
-                    && $imageFileType != "gif" ) {
136
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
137
+                    && $imageFileType != "gif") {
138 138
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
139 139
                     $uploadOk = false;
140 140
                     goto skip;
141 141
                 }
142 142
     
143
-                if($uploadOk) { 
143
+                if ($uploadOk) { 
144 144
                     if (file_exists($target_file)) {
145 145
                         $movedFile = true;
146 146
                     } else {
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
                     }
157 157
                 } 
158 158
             }
159
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
160
-            if(!empty($_FILES["videopagebanner"]["name"])) {
159
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
160
+            if (!empty($_FILES["videopagebanner"]["name"])) {
161 161
                 $target_dir = "/dynamic/subscribe/";
162 162
                 $imageFileType = strtolower(pathinfo($_FILES["videopagebanner"]["name"], PATHINFO_EXTENSION));
163 163
                 $target_name = md5_file($_FILES["videopagebanner"]["tmp_name"]) . "." . $imageFileType;
@@ -167,14 +167,14 @@  discard block
 block discarded – undo
167 167
                 $uploadOk = true;
168 168
                 $movedFile = false;
169 169
     
170
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
171
-                    && $imageFileType != "gif" ) {
170
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
171
+                    && $imageFileType != "gif") {
172 172
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
173 173
                     $uploadOk = false;
174 174
                     goto skip;
175 175
                 }
176 176
     
177
-                if($uploadOk) { 
177
+                if ($uploadOk) { 
178 178
                     if (file_exists($target_file)) {
179 179
                         $movedFile = true;
180 180
                     } else {
@@ -192,81 +192,81 @@  discard block
 block discarded – undo
192 192
             }
193 193
         }
194 194
 
195
-        if(!empty($_POST['bio'])) { 
195
+        if (!empty($_POST['bio'])) { 
196 196
             $__user_u->update_row($_SESSION['siteusername'], "bio", $_POST['bio']);
197 197
         }
198 198
 
199
-        if(!empty($_POST['featuredchannels'])) { 
199
+        if (!empty($_POST['featuredchannels'])) { 
200 200
             $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['featuredchannels']);
201 201
         }
202 202
     
203
-        if(!empty($_POST['css'])) {
203
+        if (!empty($_POST['css'])) {
204 204
             $__user_u->update_row($_SESSION['siteusername'], "css", $_POST['css']);
205 205
         }
206 206
 
207
-        if(!empty($_POST['videoid'])) {
207
+        if (!empty($_POST['videoid'])) {
208 208
             $__user_u->update_row($_SESSION['siteusername'], "featured", $_POST['videoid']);
209 209
         }
210 210
 
211
-        if(!empty($_POST['solidcolor'])) {
211
+        if (!empty($_POST['solidcolor'])) {
212 212
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
213 213
 
214
-            if($_POST['bgoption'] == "solid")
214
+            if ($_POST['bgoption'] == "solid")
215 215
                 $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
216 216
 
217 217
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
218 218
         }
219 219
 
220
-        if(!empty($_POST['transparency'])) {
220
+        if (!empty($_POST['transparency'])) {
221 221
             $__user_u->update_row($_SESSION['siteusername'], "transparency", $_POST['transparency']);
222 222
         }
223 223
 
224
-        if(!empty($_POST['genre'])) {
224
+        if (!empty($_POST['genre'])) {
225 225
             $__user_u->update_row($_SESSION['siteusername'], "genre", $_POST['genre']);
226 226
         }
227 227
 
228
-        if(!empty($_POST['bordercolor'])) {
228
+        if (!empty($_POST['bordercolor'])) {
229 229
             $__user_u->update_row($_SESSION['siteusername'], "border_color", $_POST['bordercolor']);
230 230
         }
231 231
 
232
-        if(!empty($_POST['country'])) {
232
+        if (!empty($_POST['country'])) {
233 233
             $__user_u->update_row($_SESSION['siteusername'], "country", $_POST['country']);
234 234
         } // duplicate?
235 235
 
236
-        if(!empty($_POST['header'])) {
236
+        if (!empty($_POST['header'])) {
237 237
             $__user_u->update_row($_SESSION['siteusername'], "custom_header", $_POST['header']);
238 238
         }
239 239
 
240
-        if(!empty($_POST['customtext'])) {
240
+        if (!empty($_POST['customtext'])) {
241 241
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['customtext']);
242 242
         }
243 243
 
244
-        if(!empty($_POST['country'])) {
244
+        if (!empty($_POST['country'])) {
245 245
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['country']);
246 246
         } // duplicate?
247 247
 
248
-        if(!empty($_POST['website'])) {
248
+        if (!empty($_POST['website'])) {
249 249
             $__user_u->update_row($_SESSION['siteusername'], "website", $_POST['website']);
250 250
         }
251 251
     
252
-        if(!empty($_POST['channelboxcolor'])) {
252
+        if (!empty($_POST['channelboxcolor'])) {
253 253
             $__user_u->update_row($_SESSION['siteusername'], "secondary_color", $_POST['channelboxcolor']);
254 254
         }
255 255
 
256
-        if(!empty($_POST['backgroundcolor'])) {
256
+        if (!empty($_POST['backgroundcolor'])) {
257 257
             $__user_u->update_row($_SESSION['siteusername'], "third_color", $_POST['backgroundcolor']);
258 258
         }
259 259
 
260
-        if(!empty($_POST['textmaincolor'])) {
260
+        if (!empty($_POST['textmaincolor'])) {
261 261
             $__user_u->update_row($_SESSION['siteusername'], "primary_color_text", $_POST['textmaincolor']);
262 262
         }
263 263
 
264
-        if(!empty($_POST['layout_channel'])) {
265
-            if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists")
264
+        if (!empty($_POST['layout_channel'])) {
265
+            if ($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists")
266 266
                 $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
267 267
         }
268 268
 
269
-    if(!empty($_POST['bgoptionset'])) {
269
+    if (!empty($_POST['bgoptionset'])) {
270 270
         $bgoption = $_POST['bgoption'];
271 271
         $bgcolor = $_POST['solidcolor'];
272 272
         $default = "default.png";
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         
276 276
         $__user_u->update_row($_SESSION['siteusername'], "2012_bgcolor", $bgcolor);
277 277
 
278
-        if($bgoption == "solid") {
278
+        if ($bgoption == "solid") {
279 279
             $__user_u->update_row($_SESSION['siteusername'], "2012_bg ", $default);
280 280
         }
281 281
     }
Please login to merge, or discard this patch.
web/public/d/edit_video.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 <?php $__time_h = new time_helper(); ?>
13 13
 <?php
14 14
     $_video = $__video_h->fetch_video_rid($_GET['v']);
15
-    if($_video['author'] != @$_SESSION['siteusername']) {
15
+    if ($_video['author'] != @$_SESSION['siteusername']) {
16 16
         die();
17 17
     }
18 18
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
     // $__video_u->update_row($_GET['v'], "thumbnail", $request->thumbnail);
45 45
     $__video_u->update_row($_GET['v'], "category", $request->category);
46 46
 
47
-    if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['thumbnail']) {
48
-        if(!empty($_FILES["thumbnail"]["name"])) {
47
+    if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['thumbnail']) {
48
+        if (!empty($_FILES["thumbnail"]["name"])) {
49 49
             $target_dir = "../dynamic/thumbs/";
50 50
             $imageFileType = strtolower(pathinfo($_FILES["thumbnail"]["name"], PATHINFO_EXTENSION));
51 51
             $target_name = md5_file($_FILES["thumbnail"]["tmp_name"]) . "." . $imageFileType;
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
             $uploadOk = true;
56 56
             $movedFile = false;
57 57
     
58
-            if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
59
-                && $imageFileType != "gif" ) {
58
+            if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
59
+                && $imageFileType != "gif") {
60 60
                 $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
61 61
                 $uploadOk = false;
62 62
                 goto skip;
Please login to merge, or discard this patch.
web/public/channel.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14 14
 <?php
15
-	if(isset($_SESSION['siteusername']))
15
+	if (isset($_SESSION['siteusername']))
16 16
 	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17 17
 
18
-    if(!$__user_h->user_exists($_GET['n']))
18
+    if (!$__user_h->user_exists($_GET['n']))
19 19
         header("Location: /?userdoesntexist");
20 20
 
21 21
     $_user = $__user_h->fetch_user_username($_GET['n']);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	$stmt->bindParam(":username", $_user['username']);
25 25
 	$stmt->execute();
26 26
 
27
-	while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
27
+	while ($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
28 28
 		header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines.");
29 29
 	}
30 30
 
@@ -75,28 +75,28 @@  discard block
 block discarded – undo
75 75
     $_user['genre'] = strtolower($_user['genre']);
76 76
 	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
77 77
 
78
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
79
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
80
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
81
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
82
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
83
-    if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
78
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
79
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
80
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
81
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
82
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
83
+    if (!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
84 84
 
85
-	if(isset($_SESSION['siteusername']))
85
+	if (isset($_SESSION['siteusername']))
86 86
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
87 87
 
88
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
88
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
89 89
         $error = array();
90 90
 
91
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
92
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
93
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
91
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
92
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
93
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
94 94
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
95 95
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
96
-        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; }
96
+        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; }
97 97
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
98 98
 
99
-        if(!isset($error['message'])) {
99
+        if (!isset($error['message'])) {
100 100
 			$text = $_POST['comment'];
101 101
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
102 102
 			$stmt->bindParam(":id", $_user['username']);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
108 108
 
109
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
109
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
110 110
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
111 111
             }
112 112
         }
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
145 145
 		<style>
146 146
 			#content-container {
147
-				background-color: <?php echo $_user['primary_color'];  ?>;
147
+				background-color: <?php echo $_user['primary_color']; ?>;
148 148
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
149 149
 				background-repeat: repeat;
150 150
 				<?php
151
-					switch($_user['2012_bgoption']) {
151
+					switch ($_user['2012_bgoption']) {
152 152
 						case "stretch":
153 153
 						echo "background-size: cover;";
154 154
 						break;
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
193 193
 			<div id="content-container">
194 194
 				<!-- begin content -->
195
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
195
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
196 196
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
197 197
 				<?php } ?>
198 198
 				<?php
199
-					if(empty(trim($_user['bio'])))
199
+					if (empty(trim($_user['bio'])))
200 200
 						$_user['bio'] = "This user has no description.";
201 201
 				?>
202 202
 				<div id="content">
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
252 252
 											</div>
253 253
 											<div class="upper-left-section enable-fancy-subscribe-button">
254
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
254
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
255 255
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
256 256
 														<button 
257 257
 															href="#" 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 															title="" 
260 260
 															id="subscribe-button"
261 261
 															type="button" 
262
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
262
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
263 263
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
264 264
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
265 265
 														<span class="subscribed-label">Subscribed</span>
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 												<?php } else { ?>
276 276
 
277 277
 												<?php } ?>
278
-												<?php if($__user_h->if_partner($_user['username'])) { ?>
278
+												<?php if ($__user_h->if_partner($_user['username'])) { ?>
279 279
 													<img style="width: 29px;vertical-align: middle;margin-left: 10px;" title="This user is a SubRocks partner" src="/yt/imgbin/RenderedImage.png">
280 280
 												<?php } ?>
281 281
 											</div>
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 												<div class="header-stats">
284 284
 													<div class="stat-entry">
285 285
 														<span class="stat-value"><?php echo $_user['subscribers']; ?></span>
286
-														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span>
286
+														<span class="stat-name"><?php if ($_user['subscribers'] == 1) { ?>subscriber<?php } else { ?>subscribers<?php } ?></span>
287 287
 													</div>
288 288
 													<div class="stat-entry">
289 289
 														<span class="stat-value"><?php echo $_user['views']; ?></span>
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 									</div>
329 329
 								</div>
330 330
 							</div>
331
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
331
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
332 332
 							<div id="branded-page-body">
333 333
 								<?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_" . $_user['layout'] . ".php"); ?>
334 334
 							</div>
Please login to merge, or discard this patch.