Test Failed
Pull Request — main (#27)
by
unknown
03:18
created
web/public/channel.php 3 patches
Braces   +18 added lines, -13 removed lines patch added patch discarded remove patch
@@ -12,11 +12,13 @@  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']))
16
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
15
+	if(isset($_SESSION['siteusername'])) {
16
+		    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17
+	}
17 18
 
18
-    if(!$__user_h->user_exists($_GET['n']))
19
-        header("Location: /?userdoesntexist");
19
+    if(!$__user_h->user_exists($_GET['n'])) {
20
+            header("Location: /?userdoesntexist");
21
+    }
20 22
 
21 23
     $_user = $__user_h->fetch_user_username($_GET['n']);
22 24
 
@@ -39,10 +41,11 @@  discard block
 block discarded – undo
39 41
     
40 42
         if (
41 43
               ctype_xdigit($colorCode) &&
42
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
43
-                   return true;
44
-    
45
-        else return false;
44
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
45
+                           return true;
46
+        } else {
47
+            return false;
48
+        }
46 49
     }
47 50
 
48 51
     $_user['subscribers'] = $__user_h->fetch_subs_count($_user['username']);
@@ -74,8 +77,9 @@  discard block
 block discarded – undo
74 77
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
75 78
     if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
76 79
 
77
-	if(isset($_SESSION['siteusername']))
78
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
80
+	if(isset($_SESSION['siteusername'])) {
81
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
82
+	}
79 83
 
80 84
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
81 85
         $error = array();
@@ -188,8 +192,9 @@  discard block
 block discarded – undo
188 192
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
189 193
 				<?php } ?>
190 194
 				<?php
191
-					if(empty(trim($_user['bio'])))
192
-						$_user['bio'] = "This user has no description.";
195
+					if(empty(trim($_user['bio']))) {
196
+											$_user['bio'] = "This user has no description.";
197
+					}
193 198
 				?>
194 199
 				<div id="content">
195 200
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
@@ -272,7 +277,7 @@  discard block
 block discarded – undo
272 277
 												<div class="header-stats">
273 278
 													<div class="stat-entry">
274 279
 														<span class="stat-value"><?php echo $_user['subscribers']; ?></span>
275
-														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span>
280
+														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php } else{ ?>subscribers<?php } ?></span>
276 281
 													</div>
277 282
 													<div class="stat-entry">
278 283
 														<span class="stat-value"><?php echo $_user['views']; ?></span>
Please login to merge, or discard this patch.
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  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']))
16
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
15
+    if(isset($_SESSION['siteusername']))
16
+        $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17 17
 
18 18
     if(!$__user_h->user_exists($_GET['n']))
19 19
         header("Location: /?userdoesntexist");
@@ -26,21 +26,21 @@  discard block
 block discarded – undo
26 26
         return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
27 27
     }
28 28
 
29
-	function addhttp($url) {
30
-		if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
31
-			$url = "http://" . $url;
32
-		}
33
-		return $url;
34
-	}
29
+    function addhttp($url) {
30
+        if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
31
+            $url = "http://" . $url;
32
+        }
33
+        return $url;
34
+    }
35 35
 
36 36
     function check_valid_colorhex($colorCode) {
37 37
         // If user accidentally passed along the # sign, strip it off
38 38
         $colorCode = ltrim($colorCode, '#');
39 39
     
40 40
         if (
41
-              ctype_xdigit($colorCode) &&
41
+                ctype_xdigit($colorCode) &&
42 42
               (strlen($colorCode) == 6 || strlen($colorCode) == 3))
43
-                   return true;
43
+                    return true;
44 44
     
45 45
         else return false;
46 46
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     $_user['2012_bgcolor'] = substr($_user['2012_bgcolor'], 0, 7);
66 66
 
67 67
     $_user['genre'] = strtolower($_user['genre']);
68
-	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
68
+    $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
69 69
 
70 70
     if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
71 71
     if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
75 75
     if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
76 76
 
77
-	if(isset($_SESSION['siteusername']))
78
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
77
+    if(isset($_SESSION['siteusername']))
78
+        $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
79 79
 
80 80
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
81 81
         $error = array();
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
90 90
 
91 91
         if(!isset($error['message'])) {
92
-			$text = $_POST['comment'];
92
+            $text = $_POST['comment'];
93 93
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
94
-			$stmt->bindParam(":id", $_user['username']);
95
-			$stmt->bindParam(":username", $_SESSION['siteusername']);
96
-			$stmt->bindParam(":comment", $text);
94
+            $stmt->bindParam(":id", $_user['username']);
95
+            $stmt->bindParam(":username", $_SESSION['siteusername']);
96
+            $stmt->bindParam(":comment", $text);
97 97
             $stmt->execute();
98 98
 
99 99
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
     }
106 106
 ?>
107 107
 <?php
108
-	$__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
109
-	$__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
110
-	$__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
111
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
108
+    $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
109
+    $__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
110
+    $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
111
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
112 112
 ?>
113 113
 <!DOCTYPE html>
114 114
 <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en">
@@ -140,27 +140,27 @@  discard block
 block discarded – undo
140 140
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
141 141
 				background-repeat: repeat;
142 142
 				<?php
143
-					switch($_user['2012_bgoption']) {
144
-						case "stretch":
145
-						echo "background-size: cover;";
146
-						break;
147
-						case "solid":
148
-						echo "";
149
-						break;
150
-						case "norepeat":
151
-						echo "background-repeat: no-repeat !important;";
152
-						break;
153
-						case "repeatxy":
154
-						echo "background-repeat: repeat;";
155
-						break;
156
-						case "repeaty":
157
-						echo "background-repeat: repeat-y;";
158
-						break;
159
-						case "repeatx":
160
-						echo "background-repeat: repeat-x;";
161
-						break;
162
-					}
163
-				?>
143
+                    switch($_user['2012_bgoption']) {
144
+                        case "stretch":
145
+                        echo "background-size: cover;";
146
+                        break;
147
+                        case "solid":
148
+                        echo "";
149
+                        break;
150
+                        case "norepeat":
151
+                        echo "background-repeat: no-repeat !important;";
152
+                        break;
153
+                        case "repeatxy":
154
+                        echo "background-repeat: repeat;";
155
+                        break;
156
+                        case "repeaty":
157
+                        echo "background-repeat: repeat-y;";
158
+                        break;
159
+                        case "repeatx":
160
+                        echo "background-repeat: repeat-x;";
161
+                        break;
162
+                    }
163
+                ?>
164 164
 			}
165 165
    		</style>
166 166
 		   <script>
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
189 189
 				<?php } ?>
190 190
 				<?php
191
-					if(empty(trim($_user['bio'])))
192
-						$_user['bio'] = "This user has no description.";
193
-				?>
191
+                    if(empty(trim($_user['bio'])))
192
+                        $_user['bio'] = "This user has no description.";
193
+                ?>
194 194
 				<div id="content">
195 195
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
196 196
 						<div class="content" id="recommended-channels-list"></div>
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 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']);
@@ -67,28 +67,28 @@  discard block
 block discarded – undo
67 67
     $_user['genre'] = strtolower($_user['genre']);
68 68
 	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
69 69
 
70
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
71
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
72
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
73
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
74
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
75
-    if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
70
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
71
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
72
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
73
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
74
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
75
+    if (!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
76 76
 
77
-	if(isset($_SESSION['siteusername']))
77
+	if (isset($_SESSION['siteusername']))
78 78
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
79 79
 
80
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
80
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
81 81
         $error = array();
82 82
 
83
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
84
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
85
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
83
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
84
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
85
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
86 86
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
87 87
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
88
-        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
+        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; }
89 89
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
90 90
 
91
-        if(!isset($error['message'])) {
91
+        if (!isset($error['message'])) {
92 92
 			$text = $_POST['comment'];
93 93
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
94 94
 			$stmt->bindParam(":id", $_user['username']);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
100 100
 
101
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
101
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
102 102
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
103 103
             }
104 104
         }
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
137 137
 		<style>
138 138
 			#content-container {
139
-				background-color: <?php echo $_user['primary_color'];  ?>;
139
+				background-color: <?php echo $_user['primary_color']; ?>;
140 140
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
141 141
 				background-repeat: repeat;
142 142
 				<?php
143
-					switch($_user['2012_bgoption']) {
143
+					switch ($_user['2012_bgoption']) {
144 144
 						case "stretch":
145 145
 						echo "background-size: cover;";
146 146
 						break;
@@ -184,11 +184,11 @@  discard block
 block discarded – undo
184 184
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
185 185
 			<div id="content-container">
186 186
 				<!-- begin content -->
187
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
187
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
188 188
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
189 189
 				<?php } ?>
190 190
 				<?php
191
-					if(empty(trim($_user['bio'])))
191
+					if (empty(trim($_user['bio'])))
192 192
 						$_user['bio'] = "This user has no description.";
193 193
 				?>
194 194
 				<div id="content">
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
244 244
 											</div>
245 245
 											<div class="upper-left-section enable-fancy-subscribe-button">
246
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
246
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
247 247
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
248 248
 														<button 
249 249
 															href="#" 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 															title="" 
252 252
 															id="subscribe-button"
253 253
 															type="button" 
254
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
254
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
255 255
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
256 256
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
257 257
 														<span class="subscribed-label">Subscribed</span>
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 												<div class="header-stats">
273 273
 													<div class="stat-entry">
274 274
 														<span class="stat-value"><?php echo $_user['subscribers']; ?></span>
275
-														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span>
275
+														<span class="stat-name"><?php if ($_user['subscribers'] == 1) { ?>subscriber<?php } else { ?>subscribers<?php } ?></span>
276 276
 													</div>
277 277
 													<div class="stat-entry">
278 278
 														<span class="stat-value"><?php echo $_user['views']; ?></span>
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 									</div>
318 318
 								</div>
319 319
 							</div>
320
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
320
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
321 321
 							<div id="branded-page-body">
322 322
 								<?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_" . $_user['layout'] . ".php"); ?>
323 323
 							</div>
Please login to merge, or discard this patch.
web/public/s/mod/sidebar_admin.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
 ?>
40 40
 <div id="browse-side-column" class="ytg-2col ytg-last">
41 41
     <ol class="navigation-menu">
42
-        <?php foreach($__tabs as $_tab) { 
43
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
42
+        <?php foreach ($__tabs as $_tab) { 
43
+            if ($_SERVER['REQUEST_URI'] != $_tab->url)
44 44
                 $_tab->selected = true;
45 45
             ?>
46 46
             <li class="menu-item">
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
 <div id="browse-side-column" class="ytg-2col ytg-last">
41 41
     <ol class="navigation-menu">
42 42
         <?php foreach($__tabs as $_tab) { 
43
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
44
-                $_tab->selected = true;
43
+            if($_SERVER['REQUEST_URI'] != $_tab->url) {
44
+                            $_tab->selected = true;
45
+            }
45 46
             ?>
46 47
             <li class="menu-item">
47 48
                 <a class="<?php echo $_tab->selected ? true : "selected"; ?>" href="<?php echo $_tab->url; ?>">
Please login to merge, or discard this patch.
web/public/d/channel_update.php 2 patches
Spacing   +40 added lines, -40 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,8 +85,8 @@  discard block
 block discarded – undo
85 85
                     }
86 86
                 }
87 87
             }
88
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
89
-            if(!empty($_FILES["file"]["name"])) {
88
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
89
+            if (!empty($_FILES["file"]["name"])) {
90 90
                 $target_dir = "../dynamic/banners/";
91 91
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
92 92
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
                 $uploadOk = true;
97 97
                 $movedFile = false;
98 98
     
99
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
100
-                    && $imageFileType != "gif" ) {
99
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
100
+                    && $imageFileType != "gif") {
101 101
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
102 102
                     $uploadOk = false;
103 103
                     goto skip;
104 104
                 }
105 105
     
106
-                if($uploadOk) { 
106
+                if ($uploadOk) { 
107 107
                     if (file_exists($target_file)) {
108 108
                         $movedFile = true;
109 109
                     } else {
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
                     }
120 120
                 } 
121 121
             }
122
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
123
-            if(!empty($_FILES["videopagebanner"]["name"])) {
122
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
123
+            if (!empty($_FILES["videopagebanner"]["name"])) {
124 124
                 $target_dir = "/dynamic/subscribe/";
125 125
                 $imageFileType = strtolower(pathinfo($_FILES["videopagebanner"]["name"], PATHINFO_EXTENSION));
126 126
                 $target_name = md5_file($_FILES["videopagebanner"]["tmp_name"]) . "." . $imageFileType;
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
                 $uploadOk = true;
131 131
                 $movedFile = false;
132 132
     
133
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
134
-                    && $imageFileType != "gif" ) {
133
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
134
+                    && $imageFileType != "gif") {
135 135
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
136 136
                     $uploadOk = false;
137 137
                     goto skip;
138 138
                 }
139 139
     
140
-                if($uploadOk) { 
140
+                if ($uploadOk) { 
141 141
                     if (file_exists($target_file)) {
142 142
                         $movedFile = true;
143 143
                     } else {
@@ -155,81 +155,81 @@  discard block
 block discarded – undo
155 155
             }
156 156
         }
157 157
 
158
-        if(!empty($_POST['bio'])) { 
158
+        if (!empty($_POST['bio'])) { 
159 159
             $__user_u->update_row($_SESSION['siteusername'], "bio", $_POST['bio']);
160 160
         }
161 161
 
162
-        if(!empty($_POST['featuredchannels'])) { 
162
+        if (!empty($_POST['featuredchannels'])) { 
163 163
             $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['featuredchannels']);
164 164
         }
165 165
     
166
-        if(!empty($_POST['css'])) {
166
+        if (!empty($_POST['css'])) {
167 167
             $__user_u->update_row($_SESSION['siteusername'], "css", $_POST['css']);
168 168
         }
169 169
 
170
-        if(!empty($_POST['videoid'])) {
170
+        if (!empty($_POST['videoid'])) {
171 171
             $__user_u->update_row($_SESSION['siteusername'], "featured", $_POST['videoid']);
172 172
         }
173 173
 
174
-        if(!empty($_POST['solidcolor'])) {
174
+        if (!empty($_POST['solidcolor'])) {
175 175
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
176 176
 
177
-            if($_POST['bgoption'] == "solid")
177
+            if ($_POST['bgoption'] == "solid")
178 178
                 $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
179 179
 
180 180
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
181 181
         }
182 182
 
183
-        if(!empty($_POST['transparency'])) {
183
+        if (!empty($_POST['transparency'])) {
184 184
             $__user_u->update_row($_SESSION['siteusername'], "transparency", $_POST['transparency']);
185 185
         }
186 186
 
187
-        if(!empty($_POST['genre'])) {
187
+        if (!empty($_POST['genre'])) {
188 188
             $__user_u->update_row($_SESSION['siteusername'], "genre", $_POST['genre']);
189 189
         }
190 190
 
191
-        if(!empty($_POST['bordercolor'])) {
191
+        if (!empty($_POST['bordercolor'])) {
192 192
             $__user_u->update_row($_SESSION['siteusername'], "border_color", $_POST['bordercolor']);
193 193
         }
194 194
 
195
-        if(!empty($_POST['country'])) {
195
+        if (!empty($_POST['country'])) {
196 196
             $__user_u->update_row($_SESSION['siteusername'], "country", $_POST['country']);
197 197
         } // duplicate?
198 198
 
199
-        if(!empty($_POST['header'])) {
199
+        if (!empty($_POST['header'])) {
200 200
             $__user_u->update_row($_SESSION['siteusername'], "custom_header", $_POST['header']);
201 201
         }
202 202
 
203
-        if(!empty($_POST['customtext'])) {
203
+        if (!empty($_POST['customtext'])) {
204 204
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['customtext']);
205 205
         }
206 206
 
207
-        if(!empty($_POST['country'])) {
207
+        if (!empty($_POST['country'])) {
208 208
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['country']);
209 209
         } // duplicate?
210 210
 
211
-        if(!empty($_POST['website'])) {
211
+        if (!empty($_POST['website'])) {
212 212
             $__user_u->update_row($_SESSION['siteusername'], "website", $_POST['website']);
213 213
         }
214 214
     
215
-        if(!empty($_POST['channelboxcolor'])) {
215
+        if (!empty($_POST['channelboxcolor'])) {
216 216
             $__user_u->update_row($_SESSION['siteusername'], "secondary_color", $_POST['channelboxcolor']);
217 217
         }
218 218
 
219
-        if(!empty($_POST['backgroundcolor'])) {
219
+        if (!empty($_POST['backgroundcolor'])) {
220 220
             $__user_u->update_row($_SESSION['siteusername'], "third_color", $_POST['backgroundcolor']);
221 221
         }
222 222
 
223
-        if(!empty($_POST['textmaincolor'])) {
223
+        if (!empty($_POST['textmaincolor'])) {
224 224
             $__user_u->update_row($_SESSION['siteusername'], "primary_color_text", $_POST['textmaincolor']);
225 225
         }
226 226
 
227
-        if(!empty($_POST['layout_channel'])) {
228
-            if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists")
227
+        if (!empty($_POST['layout_channel'])) {
228
+            if ($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists")
229 229
                 $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
230 230
         }
231 231
 
232
-    if(!empty($_POST['bgoptionset'])) {
232
+    if (!empty($_POST['bgoptionset'])) {
233 233
         $bgoption = $_POST['bgoption'];
234 234
         $bgcolor = $_POST['solidcolor'];
235 235
         $default = "default.png";
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         
239 239
         $__user_u->update_row($_SESSION['siteusername'], "2012_bgcolor", $bgcolor);
240 240
 
241
-        if($bgoption == "solid") {
241
+        if ($bgoption == "solid") {
242 242
             $__user_u->update_row($_SESSION['siteusername'], "2012_bg ", $default);
243 243
         }
244 244
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -174,8 +174,9 @@  discard block
 block discarded – undo
174 174
         if(!empty($_POST['solidcolor'])) {
175 175
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
176 176
 
177
-            if($_POST['bgoption'] == "solid")
178
-                $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
177
+            if($_POST['bgoption'] == "solid") {
178
+                            $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
179
+            }
179 180
 
180 181
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
181 182
         }
@@ -225,8 +226,9 @@  discard block
 block discarded – undo
225 226
         }
226 227
 
227 228
         if(!empty($_POST['layout_channel'])) {
228
-            if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists")
229
-                $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
229
+            if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists") {
230
+                            $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
231
+            }
230 232
         }
231 233
 
232 234
     if(!empty($_POST['bgoptionset'])) {
Please login to merge, or discard this patch.
web/public/s/mod/channel_featured.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -215,13 +215,13 @@  discard block
 block discarded – undo
215 215
 												<div class="module-view other-channels-view">
216 216
 													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217 217
 													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
218
-														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219
-													} ?>
218
+                                                        echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219
+                                                    } ?>
220 220
 													<ul class="channel-summary-list ">
221 221
 														<?php 
222
-															foreach($_user['featured_channels'] as $user) {
223
-																if($__user_h->user_exists($user)) {
224
-														?>
222
+                                                            foreach($_user['featured_channels'] as $user) {
223
+                                                                if($__user_h->user_exists($user)) {
224
+                                                        ?>
225 225
 															<li class="yt-tile-visible yt-uix-tile">
226 226
 																<div class="channel-summary clearfix channel-summary-compact">
227 227
 																	<div class="channel-summary-thumb">
@@ -245,19 +245,19 @@  discard block
 block discarded – undo
245 245
 											</div>
246 246
 
247 247
 											<?php 
248
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
249
-												$stmt->bindParam(":search", $_user['username']);
250
-												$stmt->execute();
248
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
249
+                                                $stmt->bindParam(":search", $_user['username']);
250
+                                                $stmt->execute();
251 251
 
252
-												if($stmt->rowCount() != 0) {
253
-											?>
252
+                                                if($stmt->rowCount() != 0) {
253
+                                            ?>
254 254
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
255 255
 													<div class="module-view gh-featured">
256 256
 														<h2>Featured Playlists</h2>     
257 257
 														<?php
258
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259
-															$playlist['videos'] = json_decode($playlist['videos']);
260
-														?> 
258
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
260
+                                                        ?> 
261 261
 															<div class="playlist yt-tile-visible yt-uix-tile">
262 262
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
263 263
 																<span class="playlist-thumb-strip playlist-thumb-strip-252"><span class="videos videos-4 horizontal-cutoff"><span class="clip"><span class="centering-offset"><span class="centering">
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 													<div class="playlist-info">
60 60
 														<h2>Uploaded videos</h2>
61 61
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
62
-														<?php if($_user['videos'] == 0) { ?>
62
+														<?php if ($_user['videos'] == 0) { ?>
63 63
 															<h4>This user has not uploaded a video yet.</h4>
64 64
 														<?php } ?>
65 65
 													</div>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                                                             $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
69 69
                                                             $stmt->bindParam(":username", $_user['username']);
70 70
                                                             $stmt->execute();
71
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
71
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
72 72
                                                         ?>
73 73
 														<li class="blogger-video">
74 74
 															<div class="video yt-tile-visible">
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 														</div>
151 151
 														<hr class="yt-horizontal-rule ">
152 152
 													</div>
153
-													<?php if(!empty($_user['website'])) { ?>
153
+													<?php if (!empty($_user['website'])) { ?>
154 154
 														<div class="user-profile-item">
155 155
 															<div class="yt-c3-profile-custom-url field-container ">
156 156
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 															<h5>Country</h5>
200 200
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
201 201
 														</div>
202
-														<?php if($_user['genre'] != "none") { ?>
202
+														<?php if ($_user['genre'] != "none") { ?>
203 203
 															<div class="user-profile-item ">
204 204
 																<h5>Channel Genre</h5>
205 205
 																<span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -211,16 +211,16 @@  discard block
 block discarded – undo
211 211
 											</div>
212 212
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
213 213
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
214
-												<?php if(count($_user['featured_channels']) != 0) { ?>
214
+												<?php if (count($_user['featured_channels']) != 0) { ?>
215 215
 												<div class="module-view other-channels-view">
216
-													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217
-													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
216
+													<h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217
+													<?php if (@$_SESSION['siteusername'] == $_user['username']) { 
218 218
 														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219 219
 													} ?>
220 220
 													<ul class="channel-summary-list ">
221 221
 														<?php 
222
-															foreach($_user['featured_channels'] as $user) {
223
-																if($__user_h->user_exists($user)) {
222
+															foreach ($_user['featured_channels'] as $user) {
223
+																if ($__user_h->user_exists($user)) {
224 224
 														?>
225 225
 															<li class="yt-tile-visible yt-uix-tile">
226 226
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -249,13 +249,13 @@  discard block
 block discarded – undo
249 249
 												$stmt->bindParam(":search", $_user['username']);
250 250
 												$stmt->execute();
251 251
 
252
-												if($stmt->rowCount() != 0) {
252
+												if ($stmt->rowCount() != 0) {
253 253
 											?>
254 254
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
255 255
 													<div class="module-view gh-featured">
256 256
 														<h2>Featured Playlists</h2>     
257 257
 														<?php
258
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
258
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259 259
 															$playlist['videos'] = json_decode($playlist['videos']);
260 260
 														?> 
261 261
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/s/mod/channel_feed.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -50,19 +50,19 @@  discard block
 block discarded – undo
50 50
 																	  ORDER BY 
51 51
 																		`date` DESC;");
52 52
                                                                         $stmt->bindParam(":comment_username", $_user['username']);
53
-																		$stmt->bindParam(":videos_username", $_user['username']);
53
+                                                                        $stmt->bindParam(":videos_username", $_user['username']);
54 54
                                                                         $stmt->execute();
55 55
                                                                         while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
56
-																			if((int)$content['id']) {
57
-																				$content = $__video_h->fetch_comment_id($content['id']);
58
-																				$content['video'] = $__video_h->fetch_video_rid($content['toid']);
59
-																				$content['type'] = "comment";
60
-																			} else {
61
-																				$content = $__video_h->fetch_video_rid($content['id']);
62
-																				$content['type'] = "video";
63
-																			}
56
+                                                                            if((int)$content['id']) {
57
+                                                                                $content = $__video_h->fetch_comment_id($content['id']);
58
+                                                                                $content['video'] = $__video_h->fetch_video_rid($content['toid']);
59
+                                                                                $content['type'] = "comment";
60
+                                                                            } else {
61
+                                                                                $content = $__video_h->fetch_video_rid($content['id']);
62
+                                                                                $content['type'] = "video";
63
+                                                                            }
64 64
 
65
-																			if($content['type'] == "video") {
65
+                                                                            if($content['type'] == "video") {
66 66
                                                                     ?>
67 67
                                                                     <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg">
68 68
                                                                         <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">
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                                                                         </div>
135 135
                                                                     </div>
136 136
                                                                     <?php } else { 
137
-																		if($__video_h->video_exists($content['video']['rid'])) { ?>
137
+                                                                        if($__video_h->video_exists($content['video']['rid'])) { ?>
138 138
 																	<div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw">
139 139
 																		<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">
140 140
 																		<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>
@@ -305,13 +305,13 @@  discard block
 block discarded – undo
305 305
 												<div class="module-view other-channels-view">
306 306
 													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
307 307
 													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
308
-														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
309
-													} ?>
308
+                                                        echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
309
+                                                    } ?>
310 310
 													<ul class="channel-summary-list ">
311 311
 														<?php 
312
-															foreach($_user['featured_channels'] as $user) {
313
-																if($__user_h->user_exists($user)) {
314
-														?>
312
+                                                            foreach($_user['featured_channels'] as $user) {
313
+                                                                if($__user_h->user_exists($user)) {
314
+                                                        ?>
315 315
 															<li class="yt-tile-visible yt-uix-tile">
316 316
 																<div class="channel-summary clearfix channel-summary-compact">
317 317
 																	<div class="channel-summary-thumb">
@@ -335,19 +335,19 @@  discard block
 block discarded – undo
335 335
 											</div>
336 336
 
337 337
 											<?php 
338
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
339
-												$stmt->bindParam(":search", $_user['username']);
340
-												$stmt->execute();
338
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
339
+                                                $stmt->bindParam(":search", $_user['username']);
340
+                                                $stmt->execute();
341 341
 
342
-												if($stmt->rowCount() != 0) {
343
-											?>
342
+                                                if($stmt->rowCount() != 0) {
343
+                                            ?>
344 344
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
345 345
 													<div class="module-view gh-featured">
346 346
 														<h2>Featured Playlists</h2>     
347 347
 														<?php
348
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
349
-															$playlist['videos'] = json_decode($playlist['videos']);
350
-														?> 
348
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
349
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
350
+                                                        ?> 
351 351
 															<div class="playlist yt-tile-visible yt-uix-tile">
352 352
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
353 353
 																<span class="playlist-thumb-strip playlist-thumb-strip-252"><span class="videos videos-4 horizontal-cutoff"><span class="clip"><span class="centering-offset"><span class="centering">
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
                                                                         $stmt->bindParam(":comment_username", $_user['username']);
53 53
 																		$stmt->bindParam(":videos_username", $_user['username']);
54 54
                                                                         $stmt->execute();
55
-                                                                        while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
56
-																			if((int)$content['id']) {
55
+                                                                        while ($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
56
+																			if ((int) $content['id']) {
57 57
 																				$content = $__video_h->fetch_comment_id($content['id']);
58 58
 																				$content['video'] = $__video_h->fetch_video_rid($content['toid']);
59 59
 																				$content['type'] = "comment";
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 																				$content['type'] = "video";
63 63
 																			}
64 64
 
65
-																			if($content['type'] == "video") {
65
+																			if ($content['type'] == "video") {
66 66
                                                                     ?>
67 67
                                                                     <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg">
68 68
                                                                         <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">
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                                                                         </div>
135 135
                                                                     </div>
136 136
                                                                     <?php } else { 
137
-																		if($__video_h->video_exists($content['video']['rid'])) { ?>
137
+																		if ($__video_h->video_exists($content['video']['rid'])) { ?>
138 138
 																	<div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw">
139 139
 																		<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">
140 140
 																		<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>
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 														</div>
241 241
 														<hr class="yt-horizontal-rule ">
242 242
 													</div>
243
-													<?php if(!empty($_user['website'])) { ?>
243
+													<?php if (!empty($_user['website'])) { ?>
244 244
 														<div class="user-profile-item">
245 245
 															<div class="yt-c3-profile-custom-url field-container ">
246 246
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 															<h5>Country</h5>
290 290
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
291 291
 														</div>
292
-														<?php if($_user['genre'] != "none") { ?>
292
+														<?php if ($_user['genre'] != "none") { ?>
293 293
 															<div class="user-profile-item ">
294 294
 																<h5>Channel Genre</h5>
295 295
 																<span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -301,16 +301,16 @@  discard block
 block discarded – undo
301 301
 											</div>
302 302
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
303 303
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
304
-												<?php if(count($_user['featured_channels']) != 0) { ?>
304
+												<?php if (count($_user['featured_channels']) != 0) { ?>
305 305
 												<div class="module-view other-channels-view">
306
-													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
307
-													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
306
+													<h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
307
+													<?php if (@$_SESSION['siteusername'] == $_user['username']) { 
308 308
 														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
309 309
 													} ?>
310 310
 													<ul class="channel-summary-list ">
311 311
 														<?php 
312
-															foreach($_user['featured_channels'] as $user) {
313
-																if($__user_h->user_exists($user)) {
312
+															foreach ($_user['featured_channels'] as $user) {
313
+																if ($__user_h->user_exists($user)) {
314 314
 														?>
315 315
 															<li class="yt-tile-visible yt-uix-tile">
316 316
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
 												$stmt->bindParam(":search", $_user['username']);
340 340
 												$stmt->execute();
341 341
 
342
-												if($stmt->rowCount() != 0) {
342
+												if ($stmt->rowCount() != 0) {
343 343
 											?>
344 344
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
345 345
 													<div class="module-view gh-featured">
346 346
 														<h2>Featured Playlists</h2>     
347 347
 														<?php
348
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
348
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
349 349
 															$playlist['videos'] = json_decode($playlist['videos']);
350 350
 														?> 
351 351
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/s/mod/channel_playlists.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
                                                         $stmt->bindParam(":search", $_user['username']);
55 55
                                                         $stmt->execute();
56 56
 
57
-                                                        if($stmt->rowCount() != 0) {
58
-                                                            while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
57
+                                                        if ($stmt->rowCount() != 0) {
58
+                                                            while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
59 59
                                                                 $playlist['videos'] = json_decode($playlist['videos']);
60 60
                                                     ?>
61 61
                                                     <div class="playlist yt-tile-visible yt-uix-tile">
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 														</div>
127 127
 														<hr class="yt-horizontal-rule ">
128 128
 													</div>
129
-													<?php if(!empty($_user['website'])) { ?>
129
+													<?php if (!empty($_user['website'])) { ?>
130 130
 														<div class="user-profile-item">
131 131
 															<div class="yt-c3-profile-custom-url field-container ">
132 132
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 															<h5>Country</h5>
176 176
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
177 177
 														</div>
178
-														<?php if($_user['genre'] != "none") { ?>
178
+														<?php if ($_user['genre'] != "none") { ?>
179 179
 															<div class="user-profile-item ">
180 180
 																<h5>Channel Genre</h5>
181 181
 																<span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -187,16 +187,16 @@  discard block
 block discarded – undo
187 187
 											</div>
188 188
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
189 189
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
190
-												<?php if(count($_user['featured_channels']) != 0) { ?>
190
+												<?php if (count($_user['featured_channels']) != 0) { ?>
191 191
 												<div class="module-view other-channels-view">
192
-													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
193
-													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
192
+													<h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
193
+													<?php if (@$_SESSION['siteusername'] == $_user['username']) { 
194 194
 														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
195 195
 													} ?>
196 196
 													<ul class="channel-summary-list ">
197 197
 														<?php 
198
-															foreach($_user['featured_channels'] as $user) {
199
-																if($__user_h->user_exists($user)) {
198
+															foreach ($_user['featured_channels'] as $user) {
199
+																if ($__user_h->user_exists($user)) {
200 200
 														?>
201 201
 															<li class="yt-tile-visible yt-uix-tile">
202 202
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -225,13 +225,13 @@  discard block
 block discarded – undo
225 225
 												$stmt->bindParam(":search", $_user['username']);
226 226
 												$stmt->execute();
227 227
 
228
-												if($stmt->rowCount() != 0) {
228
+												if ($stmt->rowCount() != 0) {
229 229
 											?>
230 230
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
231 231
 													<div class="module-view gh-featured">
232 232
 														<h2>Featured Playlists</h2>     
233 233
 														<?php
234
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
234
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
235 235
 															$playlist['videos'] = json_decode($playlist['videos']);
236 236
 														?> 
237 237
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -215,13 +215,13 @@  discard block
 block discarded – undo
215 215
 												<div class="module-view other-channels-view">
216 216
 													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217 217
 													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
218
-														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219
-													} ?>
218
+                                                        echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219
+                                                    } ?>
220 220
 													<ul class="channel-summary-list ">
221 221
 														<?php 
222
-															foreach($_user['featured_channels'] as $user) {
223
-																if($__user_h->user_exists($user)) {
224
-														?>
222
+                                                            foreach($_user['featured_channels'] as $user) {
223
+                                                                if($__user_h->user_exists($user)) {
224
+                                                        ?>
225 225
 															<li class="yt-tile-visible yt-uix-tile">
226 226
 																<div class="channel-summary clearfix channel-summary-compact">
227 227
 																	<div class="channel-summary-thumb">
@@ -245,19 +245,19 @@  discard block
 block discarded – undo
245 245
 											</div>
246 246
 
247 247
 											<?php 
248
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
249
-												$stmt->bindParam(":search", $_user['username']);
250
-												$stmt->execute();
248
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
249
+                                                $stmt->bindParam(":search", $_user['username']);
250
+                                                $stmt->execute();
251 251
 
252
-												if($stmt->rowCount() != 0) {
253
-											?>
252
+                                                if($stmt->rowCount() != 0) {
253
+                                            ?>
254 254
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
255 255
 													<div class="module-view gh-featured">
256 256
 														<h2>Featured Playlists</h2>     
257 257
 														<?php
258
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259
-															$playlist['videos'] = json_decode($playlist['videos']);
260
-														?> 
258
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
260
+                                                        ?> 
261 261
 															<div class="playlist yt-tile-visible yt-uix-tile">
262 262
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
263 263
 																<span class="playlist-thumb-strip playlist-thumb-strip-252"><span class="videos videos-4 horizontal-cutoff"><span class="clip"><span class="centering-offset"><span class="centering">
Please login to merge, or discard this patch.
web/public/admin/index.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@
 block discarded – undo
12 12
 <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13 13
 <?php if(!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?>
14 14
 <?php
15
-	$__server->page_embeds->page_title = "SubRocks - Inbox";
16
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
17
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
18
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
15
+    $__server->page_embeds->page_title = "SubRocks - Inbox";
16
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
17
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
18
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
19 19
 ?>
20 20
 <!DOCTYPE html>
21 21
 <html dir="ltr">
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 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 - Inbox";
16 16
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
Please login to merge, or discard this patch.
web/public/das_captcha.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 if (isset($_POST['submit']))
19 19
 {
20
-    header("Location: " . $_SERVER['DOCUMENT_ROOT']. $next);
20
+    header("Location: " . $_SERVER['DOCUMENT_ROOT'] . $next);
21 21
 }
22 22
 ?>
23 23
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         <div id="page" class="">
47 47
         <!-- begin pagetop -->
48 48
   
49
-        <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php");?> </div>
49
+        <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?> </div>
50 50
   <!-- end pagetop -->
51 51
   <!-- begin pagemiddle -->
52 52
   <div id="content-container">
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
       
63 63
   <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>
64 64
 
65
-<form method="post" action="/das_captcha?next=<?php echo $next;?>">
65
+<form method="post" action="/das_captcha?next=<?php echo $next; ?>">
66 66
 <script type="text/javascript" src="/s/captcha.js"></script>
67 67
 <noscript>
68 68
 You need JavaScript to pass the captcha!
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
 if (isset($_GET['next']))
10 10
 {
11 11
     $next = $_GET['next'];
12
-}
13
-else
12
+} else
14 13
 {
15 14
     $next = "/";
16 15
 }
Please login to merge, or discard this patch.