Test Failed
Push — main ( 00747d...5f665f )
by chief
03:00
created
web/public/s/mod/sidebar_inbox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
     </a>
36 36
 </div>
37 37
     <ol class="navigation-menu">
38
-        <?php foreach($__tabs as $_tab) { 
39
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
38
+        <?php foreach ($__tabs as $_tab) { 
39
+            if ($_SERVER['REQUEST_URI'] != $_tab->url)
40 40
                 $_tab->selected = true;
41 41
             ?>
42 42
             <li class="menu-item">
Please login to merge, or discard this patch.
web/public/admin/index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 <?php $__user_u = new user_update($__db); ?>
10 10
 <?php $__db_h = new db_helper(); ?>
11 11
 <?php $__time_h = new time_helper(); ?>
12
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
-<?php if(!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?>
12
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?>
14 14
 <?php
15 15
 	$__server->page_embeds->page_title = "SubRocks - Admin Panel";
16 16
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		$dif['idle'] = $info2[3] - $info1[3]; 
31 31
 		$total = array_sum($dif); 
32 32
 		$cpu = array(); 
33
-		foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
33
+		foreach ($dif as $x=>$y) $cpu[$x] = round($y/$total*100, 1);
34 34
 
35 35
 		return $cpu;
36 36
 	}
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 		foreach ($hexCode as & $color) {
48 48
 			$adjustableLimit = $adjustPercent < 0 ? $color : 255 - $color;
49
-			$adjustAmount = ceil($adjustableLimit * $adjustPercent);
49
+			$adjustAmount = ceil($adjustableLimit*$adjustPercent);
50 50
 
51 51
 			$color = str_pad(dechex($color + $adjustAmount), 2, '0', STR_PAD_LEFT);
52 52
 		}
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 	function get_server_memory_usage() {
58 58
 		$free = shell_exec('free');
59
-		$free = (string)trim($free);
59
+		$free = (string) trim($free);
60 60
 		$free_arr = explode("\n", $free);
61 61
 		$mem = explode(" ", $free_arr[1]);
62 62
 		$mem = array_filter($mem);
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 											CPU Idle Usage: 
275 275
 												<b style="float:right;color:<?php echo adjustBrightness("#FF0000", $server['idle']); ?>">
276 276
 													<?php echo $server['idle']; ?>%</b><br>
277
-											RAM Usage: <b style="float:right;"><?php echo round(get_server_memory_usage(), 3)	; ?> megabytes</b>
277
+											RAM Usage: <b style="float:right;"><?php echo round(get_server_memory_usage(), 3); ?> megabytes</b>
278 278
 										</div>
279 279
 										<div style="width: 200px;display:inline-block;margin-right:20px;vertical-align: top;margin-left: 22px;">
280 280
 											<?php $server = get_server_array_stats(); ?>
Please login to merge, or discard this patch.
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/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.