Test Failed
Push — main ( 0c12e7...ee73bc )
by chief
04:22
created
web/public/inbox/index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php $__user_u = new user_update($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <!DOCTYPE html>
15 15
 <html dir="ltr">
16 16
 	<head>
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
                                     $stmt->execute();
166 166
 
167 167
                                     $number_of_result = $stmt->rowCount();
168
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
168
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
169 169
 
170
-                                    if (!isset ($_GET['page']) ) {  
170
+                                    if (!isset ($_GET['page'])) {  
171 171
                                         $page = 1;  
172 172
                                     } else {  
173
-                                        $page = (int)$_GET['page'];  
173
+                                        $page = (int) $_GET['page'];  
174 174
                                     }  
175 175
 
176
-                                    $page_first_result = ($page - 1) * $results_per_page;  
176
+                                    $page_first_result = ($page - 1)*$results_per_page;  
177 177
 
178 178
                                     $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search ORDER BY id DESC LIMIT :pfirst, :pper");
179 179
                                     $stmt6->bindParam(":search", $search);
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
                                     </tr>
199 199
                                     
200 200
                                     <?php
201
-                                        while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
-                                            if($__video_h->video_exists($inbox['video_attribute'])) {
201
+                                        while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
+                                            if ($__video_h->video_exists($inbox['video_attribute'])) {
203 203
                                                 $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']);
204 204
                                                 $inbox['video_attr_exists'] = true;
205 205
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                                     ?> 
214 214
                                     <tr style="margin-top: 5px;" id="videoslist">
215 215
                                             <!--
216
-                                            <?php if($inbox['readed'] == "n") { ?>
216
+                                            <?php if ($inbox['readed'] == "n") { ?>
217 217
                                                 <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
218 218
                                                 NEW
219 219
                                                 </a>
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                                         <td class="video-manager-stats" style="background: none;padding-left: 8px;">
237 237
                                             <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3>
238 238
                                             <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?>
239
-                                            <?php if($inbox['video_attr_exists']) { ?>
239
+                                            <?php if ($inbox['video_attr_exists']) { ?>
240 240
                                                 <hr>
241 241
                                                 <ul>
242 242
                                                     <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&amp;feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><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 $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span>
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                                     </div>
264 264
                                 </center><br>
265 265
 
266
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
266
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
267 267
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button>
268 268
                                 <?php } ?>   
269 269
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                                 </script>
288 288
 
289 289
                                 <?php 
290
-                                    if($stmt6->rowCount() == 0) { echo "
290
+                                    if ($stmt6->rowCount() == 0) { echo "
291 291
                                         You currently have no messages in your inbox.
292 292
                                     "; 
293 293
                                 } ?>
Please login to merge, or discard this patch.
web/public/inbox/sent.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php $__user_u = new user_update($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <!DOCTYPE html>
15 15
 <html dir="ltr">
16 16
 	<head>
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
                                     $stmt->execute();
166 166
 
167 167
                                     $number_of_result = $stmt->rowCount();
168
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
168
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
169 169
 
170
-                                    if (!isset ($_GET['page']) ) {  
170
+                                    if (!isset ($_GET['page'])) {  
171 171
                                         $page = 1;  
172 172
                                     } else {  
173
-                                        $page = (int)$_GET['page'];  
173
+                                        $page = (int) $_GET['page'];  
174 174
                                     }  
175 175
 
176
-                                    $page_first_result = ($page - 1) * $results_per_page;  
176
+                                    $page_first_result = ($page - 1)*$results_per_page;  
177 177
 
178 178
                                     $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search ORDER BY id DESC LIMIT :pfirst, :pper");
179 179
                                     $stmt6->bindParam(":search", $search);
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
                                     </tr>
199 199
                                     
200 200
                                     <?php
201
-                                        while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
-                                            if($__video_h->video_exists($inbox['video_attribute'])) {
201
+                                        while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
+                                            if ($__video_h->video_exists($inbox['video_attribute'])) {
203 203
                                                 $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']);
204 204
                                                 $inbox['video_attr_exists'] = true;
205 205
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                                     ?> 
214 214
                                     <tr style="margin-top: 5px;" id="videoslist">
215 215
                                             <!--
216
-                                            <?php if($inbox['readed'] == "n") { ?>
216
+                                            <?php if ($inbox['readed'] == "n") { ?>
217 217
                                                 <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
218 218
                                                 NEW
219 219
                                                 </a>
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                                         <td class="video-manager-stats" style="background: none;padding-left: 8px;">
237 237
                                             <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3>
238 238
                                             <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?>
239
-                                            <?php if($inbox['video_attr_exists']) { ?>
239
+                                            <?php if ($inbox['video_attr_exists']) { ?>
240 240
                                                 <hr>
241 241
                                                 <ul>
242 242
                                                     <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&amp;feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><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 $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span>
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                                     </div>
264 264
                                 </center><br>
265 265
 
266
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
266
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
267 267
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button>
268 268
                                 <?php } ?>   
269 269
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                                 </script>
288 288
 
289 289
                                 <?php 
290
-                                    if($stmt6->rowCount() == 0) { echo "
290
+                                    if ($stmt6->rowCount() == 0) { echo "
291 291
                                         You currently have no sent messages in your inbox.
292 292
                                     "; 
293 293
                                 } ?>
Please login to merge, or discard this patch.
web/public/inbox/pm.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php $__user_u = new user_update($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <!DOCTYPE html>
15 15
 <html dir="ltr">
16 16
 	<head>
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
                                     $stmt->execute();
166 166
 
167 167
                                     $number_of_result = $stmt->rowCount();
168
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
168
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
169 169
 
170
-                                    if (!isset ($_GET['page']) ) {  
170
+                                    if (!isset ($_GET['page'])) {  
171 171
                                         $page = 1;  
172 172
                                     } else {  
173
-                                        $page = (int)$_GET['page'];  
173
+                                        $page = (int) $_GET['page'];  
174 174
                                     }  
175 175
 
176
-                                    $page_first_result = ($page - 1) * $results_per_page;  
176
+                                    $page_first_result = ($page - 1)*$results_per_page;  
177 177
 
178 178
                                     $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nm' ORDER BY id DESC LIMIT :pfirst, :pper");
179 179
                                     $stmt6->bindParam(":search", $search);
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
                                     </tr>
199 199
                                     
200 200
                                     <?php
201
-                                        while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
-                                            if($__video_h->video_exists($inbox['video_attribute'])) {
201
+                                        while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
+                                            if ($__video_h->video_exists($inbox['video_attribute'])) {
203 203
                                                 $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']);
204 204
                                                 $inbox['video_attr_exists'] = true;
205 205
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                                     ?> 
214 214
                                     <tr style="margin-top: 5px;" id="videoslist">
215 215
                                             <!--
216
-                                            <?php if($inbox['readed'] == "n") { ?>
216
+                                            <?php if ($inbox['readed'] == "n") { ?>
217 217
                                                 <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
218 218
                                                 NEW
219 219
                                                 </a>
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                                         <td class="video-manager-stats" style="background: none;padding-left: 8px;">
237 237
                                             <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3>
238 238
                                             <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?>
239
-                                            <?php if($inbox['video_attr_exists']) { ?>
239
+                                            <?php if ($inbox['video_attr_exists']) { ?>
240 240
                                                 <hr>
241 241
                                                 <ul>
242 242
                                                     <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&amp;feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><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 $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span>
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                                     </div>
264 264
                                 </center><br>
265 265
 
266
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
266
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
267 267
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button>
268 268
                                 <?php } ?>   
269 269
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                                 </script>
288 288
 
289 289
                                 <?php 
290
-                                    if($stmt6->rowCount() == 0) { echo "
290
+                                    if ($stmt6->rowCount() == 0) { echo "
291 291
                                         You currently have no personal messages in your inbox.
292 292
                                     "; 
293 293
                                 } ?>
Please login to merge, or discard this patch.
web/public/get/unfavorite.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
 
27 27
 $stmt = $__db->prepare("DELETE FROM favorite_video WHERE sender = :sender AND reciever = :reciever");
28 28
 $stmt->execute(array(
29
-  ':sender' => $_SESSION['siteusername'],
30
-  ':reciever' => $name,
29
+    ':sender' => $_SESSION['siteusername'],
30
+    ':reciever' => $name,
31 31
 ));
32 32
 
33 33
 header('Location: ' . $_SERVER['HTTP_REFERER']);
Please login to merge, or discard this patch.
web/public/get/favorite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 $stmt->bindParam(":reciever", $name);
20 20
 $stmt->execute();
21 21
 
22
-if($stmt->rowCount() == 1) { 
22
+if ($stmt->rowCount() == 1) { 
23 23
     $_SESSION['error']->message = "You have already favorited this video.";
24 24
     header('Location: ' . $_SERVER['HTTP_REFERER']);
25 25
     die();
Please login to merge, or discard this patch.
web/public/d/signup.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 <?php $__db_h = new db_helper(); ?>
10 10
 <?php $__time_h = new time_helper(); ?>
11 11
 <?php
12
-    if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
12
+    if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
13 13
         $request = (object) [
14 14
             "username" => $_POST['username'],
15 15
             "password" => $_POST['password'],
@@ -23,25 +23,25 @@  discard block
 block discarded – undo
23 23
         ]; 
24 24
 
25 25
         if (!filter_var($request->email, FILTER_VALIDATE_EMAIL)) 
26
-            { $request->error->message = "Your email is invalid!"; $request->error->status = "";  }
27
-        if(strlen($request->username) > 21) 
26
+            { $request->error->message = "Your email is invalid!"; $request->error->status = ""; }
27
+        if (strlen($request->username) > 21) 
28 28
             { $request->error->message = "Your username must be shorter than 21 characters."; $request->error->status = ""; }
29
-        if(strlen($request->password) < 8) 
29
+        if (strlen($request->password) < 8) 
30 30
             { $request->error->message = "Your password must at least be 8 characters long."; $request->error->status = ""; }
31
-        if(!preg_match('/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/', $request->password)) 
31
+        if (!preg_match('/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/', $request->password)) 
32 32
             { $request->error->message = "Include numbers and letters in your password!"; $request->error->status = ""; }
33
-        if(!preg_match('/^\S+\w\S{1,}/', $request->username)) 
33
+        if (!preg_match('/^\S+\w\S{1,}/', $request->username)) 
34 34
             { $request->error->message = "Your username cannot contain any special characters!"; $request->error->status = ""; }
35
-        if(empty(trim($request->username))) 
35
+        if (empty(trim($request->username))) 
36 36
             { $request->error->message = "Your username cannot be empty!"; $request->error->status = ""; }
37 37
         
38 38
         $stmt = $__db->prepare("SELECT username FROM users WHERE username = :username");
39 39
         $stmt->bindParam(":username", $request->username);
40 40
         $stmt->execute();
41
-        if($stmt->rowCount()) 
41
+        if ($stmt->rowCount()) 
42 42
             { $request->error->message = "There's already a user with that same username!"; $request->error->status = ""; }
43 43
         
44
-        if($request->error->status == "OK") {
44
+        if ($request->error->status == "OK") {
45 45
             $stmt = $__db->prepare("INSERT INTO users (username, email, password) VALUES (:username, :email, :password)");
46 46
             $stmt->bindParam(":username", $request->username);
47 47
             $stmt->bindParam(":email", $request->email);
Please login to merge, or discard this patch.
web/public/channel_feed.php 3 patches
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 <?php $__db_h = new db_helper(); ?>
14 14
 <?php $__time_h = new time_helper(); ?>
15 15
 <?php
16
-	if(isset($_SESSION['siteusername']))
16
+	if (isset($_SESSION['siteusername']))
17 17
 	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18 18
 
19
-    if(!$__user_h->user_exists($_GET['n']))
19
+    if (!$__user_h->user_exists($_GET['n']))
20 20
         header("Location: /?userdoesntexist");
21 21
 
22 22
     $_user = $__user_h->fetch_user_username($_GET['n']);
@@ -69,28 +69,28 @@  discard block
 block discarded – undo
69 69
     $_user['genre'] = strtolower($_user['genre']);
70 70
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
71 71
 
72
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
73
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
74
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
75
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
76
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
77
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
72
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
73
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
74
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
75
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
76
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
77
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
78 78
 
79
-	if(isset($_SESSION['siteusername']))
79
+	if (isset($_SESSION['siteusername']))
80 80
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
81 81
 
82
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
82
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
83 83
         $error = array();
84 84
 
85
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
86
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
87
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
85
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
86
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
87
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
88 88
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
89 89
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
90
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
90
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
91 91
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
92 92
 
93
-        if(!isset($error['message'])) {
93
+        if (!isset($error['message'])) {
94 94
 			$text = $_POST['comment'];
95 95
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
96 96
 			$stmt->bindParam(":id", $_user['username']);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
102 102
 
103
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
103
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
104 104
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
105 105
             }
106 106
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
127 127
 		<style>
128 128
 			#content-container {
129
-				background-color: <?php echo $_user['primary_color'];  ?>;
129
+				background-color: <?php echo $_user['primary_color']; ?>;
130 130
 				background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>);
131 131
 				background-repeat: repeat;
132 132
 				background-position: center top;
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
143 143
 			<div id="content-container">
144 144
 				<!-- begin content -->
145
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
145
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
146 146
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
147 147
 				<?php } ?> 
148 148
 				<?php
149
-					if(empty(trim($_user['bio'])))
149
+					if (empty(trim($_user['bio'])))
150 150
 						$_user['bio'] = "This user has no description.";
151 151
 				?>
152 152
 				<div id="content">
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
202 202
 											</div>
203 203
 											<div class="upper-left-section enable-fancy-subscribe-button">
204
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
204
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
205 205
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
206 206
 														<button href="https://accounts.google.com/ServiceLogin?uilel=3&amp;service=youtube&amp;passive=true&amp;continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26feature%3Dsubscribe%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252Fuser%252F<?php echo htmlspecialchars($_user['username']); ?>%253Ffeature%253Dg-logo-xit&amp;hl=en_US&amp;ltmpl=sso" onclick=";window.location.href=this.getAttribute('href');return false;" title="" type="button" class="yt-subscription-button subscription-button-with-recommended-channels   yt-uix-button yt-uix-button-subscription yt-uix-tooltip" data-enable-hovercard="true" data-subscription-value="UCIwFjwMjI0y7PDBVEO9-bkQ" data-force-position="" data-position="" data-subscription-feature="channels3" data-subscription-type="channel" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
207 207
 														<span class="subscribed-label">Subscribed</span>
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 									</div>
268 268
 								</div>
269 269
 							</div>
270
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
270
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
271 271
 							<div id="branded-page-body">
272 272
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
273 273
 									<div class="tab-content-body">
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
                                                                         $stmt->bindParam(":comment_username", $_user['username']);
323 323
 																		$stmt->bindParam(":videos_username", $_user['username']);
324 324
                                                                         $stmt->execute();
325
-                                                                        while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
326
-																			if((int)$content['id']) {
325
+                                                                        while ($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
326
+																			if ((int) $content['id']) {
327 327
 																				$content = $__video_h->fetch_comment_id($content['id']);
328 328
 																				$content['video'] = $__video_h->fetch_video_rid($content['toid']);
329 329
 																				$content['type'] = "comment";
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 																				$content['type'] = "video";
333 333
 																			}
334 334
 
335
-																			if($content['type'] == "video") {
335
+																			if ($content['type'] == "video") {
336 336
                                                                     ?>
337 337
                                                                     <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg">
338 338
                                                                         <a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
                                                                         </div>
405 405
                                                                     </div>
406 406
                                                                     <?php } else { 
407
-																		if($__video_h->video_exists($content['video']['rid'])) { ?>
407
+																		if ($__video_h->video_exists($content['video']['rid'])) { ?>
408 408
 																	<div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw">
409 409
 																		<a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
410 410
 																		<span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo htmlspecialchars($content['author']); ?>" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($content['author']); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 														</div>
511 511
 														<hr class="yt-horizontal-rule ">
512 512
 													</div>
513
-													<?php if(!empty($_user['website'])) { ?>
513
+													<?php if (!empty($_user['website'])) { ?>
514 514
 														<div class="user-profile-item">
515 515
 															<div class="yt-c3-profile-custom-url field-container ">
516 516
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 															<h5>Country</h5>
560 560
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
561 561
 														</div>
562
-														<?php if($_user['genre'] != "none") { ?>
562
+														<?php if ($_user['genre'] != "none") { ?>
563 563
 															<div class="user-profile-item ">
564 564
 																<h5>Channel Genre</h5>
565 565
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
@@ -571,13 +571,13 @@  discard block
 block discarded – undo
571 571
 											</div>
572 572
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
573 573
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
574
-												<?php if(count($_user['featured_channels']) != 0) { ?>
574
+												<?php if (count($_user['featured_channels']) != 0) { ?>
575 575
 												<div class="module-view other-channels-view">
576 576
 													<h2>Featured Channels</h2>
577 577
 													<ul class="channel-summary-list ">
578 578
 														<?php 
579
-															foreach($_user['featured_channels'] as $user) {
580
-																if($__user_h->user_exists($user)) {
579
+															foreach ($_user['featured_channels'] as $user) {
580
+																if ($__user_h->user_exists($user)) {
581 581
 														?>
582 582
 															<li class="yt-tile-visible yt-uix-tile">
583 583
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -606,13 +606,13 @@  discard block
 block discarded – undo
606 606
 												$stmt->bindParam(":search", $_user['username']);
607 607
 												$stmt->execute();
608 608
 
609
-												if($stmt->rowCount() != 0) {
609
+												if ($stmt->rowCount() != 0) {
610 610
 											?>
611 611
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
612 612
 													<div class="module-view gh-featured">
613 613
 														<h2>Featured Playlists</h2>     
614 614
 														<?php
615
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
615
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
616 616
 															$playlist['videos'] = json_decode($playlist['videos']);
617 617
 														?> 
618 618
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,11 +13,13 @@  discard block
 block discarded – undo
13 13
 <?php $__db_h = new db_helper(); ?>
14 14
 <?php $__time_h = new time_helper(); ?>
15 15
 <?php
16
-	if(isset($_SESSION['siteusername']))
17
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
16
+	if(isset($_SESSION['siteusername'])) {
17
+		    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18
+	}
18 19
 
19
-    if(!$__user_h->user_exists($_GET['n']))
20
-        header("Location: /?userdoesntexist");
20
+    if(!$__user_h->user_exists($_GET['n'])) {
21
+            header("Location: /?userdoesntexist");
22
+    }
21 23
 
22 24
     $_user = $__user_h->fetch_user_username($_GET['n']);
23 25
 
@@ -40,10 +42,11 @@  discard block
 block discarded – undo
40 42
     
41 43
         if (
42 44
               ctype_xdigit($colorCode) &&
43
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
44
-                   return true;
45
-    
46
-        else return false;
45
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
46
+                           return true;
47
+        } else {
48
+            return false;
49
+        }
47 50
     }
48 51
 
49 52
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
@@ -76,8 +79,9 @@  discard block
 block discarded – undo
76 79
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
77 80
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
78 81
 
79
-	if(isset($_SESSION['siteusername']))
80
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
82
+	if(isset($_SESSION['siteusername'])) {
83
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
84
+	}
81 85
 
82 86
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
83 87
         $error = array();
@@ -146,8 +150,9 @@  discard block
 block discarded – undo
146 150
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
147 151
 				<?php } ?> 
148 152
 				<?php
149
-					if(empty(trim($_user['bio'])))
150
-						$_user['bio'] = "This user has no description.";
153
+					if(empty(trim($_user['bio']))) {
154
+											$_user['bio'] = "This user has no description.";
155
+					}
151 156
 				?>
152 157
 				<div id="content">
153 158
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
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
     }
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
76 76
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
77 77
 
78
-	if(isset($_SESSION['siteusername']))
79
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
78
+    if(isset($_SESSION['siteusername']))
79
+        $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
80 80
 
81 81
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
82 82
         $error = array();
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
91 91
 
92 92
         if(!isset($error['message'])) {
93
-			$text = $_POST['comment'];
93
+            $text = $_POST['comment'];
94 94
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
95
-			$stmt->bindParam(":id", $_user['username']);
96
-			$stmt->bindParam(":username", $_SESSION['siteusername']);
97
-			$stmt->bindParam(":comment", $text);
95
+            $stmt->bindParam(":id", $_user['username']);
96
+            $stmt->bindParam(":username", $_SESSION['siteusername']);
97
+            $stmt->bindParam(":comment", $text);
98 98
             $stmt->execute();
99 99
 
100 100
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
     }
107 107
 ?>
108 108
 <?php
109
-	$__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
110
-	$__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
111
-	$__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
112
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
109
+    $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
110
+    $__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
111
+    $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
112
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
113 113
 ?>
114 114
 <!DOCTYPE html>
115 115
 <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en">
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
152 152
 				<?php } ?> 
153 153
 				<?php
154
-					if(empty(trim($_user['bio'])))
155
-						$_user['bio'] = "This user has no description.";
156
-				?>
154
+                    if(empty(trim($_user['bio'])))
155
+                        $_user['bio'] = "This user has no description.";
156
+                ?>
157 157
 				<div id="content">
158 158
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
159 159
 						<div class="content" id="recommended-channels-list"></div>
@@ -325,19 +325,19 @@  discard block
 block discarded – undo
325 325
 																	  ORDER BY 
326 326
 																		`date` DESC;");
327 327
                                                                         $stmt->bindParam(":comment_username", $_user['username']);
328
-																		$stmt->bindParam(":videos_username", $_user['username']);
328
+                                                                        $stmt->bindParam(":videos_username", $_user['username']);
329 329
                                                                         $stmt->execute();
330 330
                                                                         while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
331
-																			if((int)$content['id']) {
332
-																				$content = $__video_h->fetch_comment_id($content['id']);
333
-																				$content['video'] = $__video_h->fetch_video_rid($content['toid']);
334
-																				$content['type'] = "comment";
335
-																			} else {
336
-																				$content = $__video_h->fetch_video_rid($content['id']);
337
-																				$content['type'] = "video";
338
-																			}
331
+                                                                            if((int)$content['id']) {
332
+                                                                                $content = $__video_h->fetch_comment_id($content['id']);
333
+                                                                                $content['video'] = $__video_h->fetch_video_rid($content['toid']);
334
+                                                                                $content['type'] = "comment";
335
+                                                                            } else {
336
+                                                                                $content = $__video_h->fetch_video_rid($content['id']);
337
+                                                                                $content['type'] = "video";
338
+                                                                            }
339 339
 
340
-																			if($content['type'] == "video") {
340
+                                                                            if($content['type'] == "video") {
341 341
                                                                     ?>
342 342
                                                                     <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg">
343 343
                                                                         <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">
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
                                                                         </div>
410 410
                                                                     </div>
411 411
                                                                     <?php } else { 
412
-																		if($__video_h->video_exists($content['video']['rid'])) { ?>
412
+                                                                        if($__video_h->video_exists($content['video']['rid'])) { ?>
413 413
 																	<div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw">
414 414
 																		<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">
415 415
 																		<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>
@@ -581,9 +581,9 @@  discard block
 block discarded – undo
581 581
 													<h2>Featured Channels</h2>
582 582
 													<ul class="channel-summary-list ">
583 583
 														<?php 
584
-															foreach($_user['featured_channels'] as $user) {
585
-																if($__user_h->user_exists($user)) {
586
-														?>
584
+                                                            foreach($_user['featured_channels'] as $user) {
585
+                                                                if($__user_h->user_exists($user)) {
586
+                                                        ?>
587 587
 															<li class="yt-tile-visible yt-uix-tile">
588 588
 																<div class="channel-summary clearfix channel-summary-compact">
589 589
 																	<div class="channel-summary-thumb">
@@ -607,19 +607,19 @@  discard block
 block discarded – undo
607 607
 											</div>
608 608
 
609 609
 											<?php 
610
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
611
-												$stmt->bindParam(":search", $_user['username']);
612
-												$stmt->execute();
610
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
611
+                                                $stmt->bindParam(":search", $_user['username']);
612
+                                                $stmt->execute();
613 613
 
614
-												if($stmt->rowCount() != 0) {
615
-											?>
614
+                                                if($stmt->rowCount() != 0) {
615
+                                            ?>
616 616
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
617 617
 													<div class="module-view gh-featured">
618 618
 														<h2>Featured Playlists</h2>     
619 619
 														<?php
620
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
621
-															$playlist['videos'] = json_decode($playlist['videos']);
622
-														?> 
620
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
621
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
622
+                                                        ?> 
623 623
 															<div class="playlist yt-tile-visible yt-uix-tile">
624 624
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
625 625
 																<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/view_playlist.php 3 patches
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
 <?php
15 15
     $_playlist = $__video_h->fetch_playlist_rid($_GET['v']);
16 16
 
17
-    if(!$__user_h->user_exists($_playlist['author']))
18
-        header("Location: /?userdoesntexist");    
17
+    if(!$__user_h->user_exists($_playlist['author'])) {
18
+            header("Location: /?userdoesntexist");
19
+    }
19 20
 
20 21
     $_user = $__user_h->fetch_user_username($_playlist['author']);
21 22
 
@@ -38,10 +39,11 @@  discard block
 block discarded – undo
38 39
     
39 40
         if (
40 41
               ctype_xdigit($colorCode) &&
41
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
42
-                   return true;
43
-    
44
-        else return false;
42
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
43
+                           return true;
44
+        } else {
45
+            return false;
46
+        }
45 47
     }
46 48
 
47 49
     $_user['subscribers'] = $__user_h->fetch_subs_count($_user['username']);
@@ -73,8 +75,9 @@  discard block
 block discarded – undo
73 75
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
74 76
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
75 77
 
76
-	if(isset($_SESSION['siteusername']))
77
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
78
+	if(isset($_SESSION['siteusername'])) {
79
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
80
+	}
78 81
 
79 82
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
80 83
         $error = array();
@@ -145,8 +148,9 @@  discard block
 block discarded – undo
145 148
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
146 149
 				<?php } ?>
147 150
 				<?php
148
-					if(empty(trim($_user['bio'])))
149
-						$_user['bio'] = "This user has no description.";
151
+					if(empty(trim($_user['bio']))) {
152
+											$_user['bio'] = "This user has no description.";
153
+					}
150 154
 				?>
151 155
 				<div id="content">
152 156
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
Please login to merge, or discard this patch.
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -25,21 +25,21 @@  discard block
 block discarded – undo
25 25
         return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
26 26
     }
27 27
 
28
-	function addhttp($url) {
29
-		if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
30
-			$url = "http://" . $url;
31
-		}
32
-		return $url;
33
-	}
28
+    function addhttp($url) {
29
+        if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
30
+            $url = "http://" . $url;
31
+        }
32
+        return $url;
33
+    }
34 34
 
35 35
     function check_valid_colorhex($colorCode) {
36 36
         // If user accidentally passed along the # sign, strip it off
37 37
         $colorCode = ltrim($colorCode, '#');
38 38
     
39 39
         if (
40
-              ctype_xdigit($colorCode) &&
40
+                ctype_xdigit($colorCode) &&
41 41
               (strlen($colorCode) == 6 || strlen($colorCode) == 3))
42
-                   return true;
42
+                    return true;
43 43
     
44 44
         else return false;
45 45
     }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     $_user['2009_bgcolor'] = substr($_user['2009_bgcolor'], 0, 7);
65 65
 
66 66
     $_user['genre'] = strtolower($_user['genre']);
67
-	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
67
+    $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
68 68
 
69 69
     if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
70 70
     if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
74 74
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
75 75
 
76
-	if(isset($_SESSION['siteusername']))
77
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
76
+    if(isset($_SESSION['siteusername']))
77
+        $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
78 78
 
79 79
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
80 80
         $error = array();
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
89 89
 
90 90
         if(!isset($error['message'])) {
91
-			$text = $_POST['comment'];
91
+            $text = $_POST['comment'];
92 92
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
93
-			$stmt->bindParam(":id", $_user['username']);
94
-			$stmt->bindParam(":username", $_SESSION['siteusername']);
95
-			$stmt->bindParam(":comment", $text);
93
+            $stmt->bindParam(":id", $_user['username']);
94
+            $stmt->bindParam(":username", $_SESSION['siteusername']);
95
+            $stmt->bindParam(":comment", $text);
96 96
             $stmt->execute();
97 97
 
98 98
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
     }
105 105
 ?>
106 106
 <?php
107
-	$__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_playlist['title']);
108
-	$__server->page_embeds->page_description = htmlspecialchars($_playlist['description']);
109
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
110
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
107
+    $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_playlist['title']);
108
+    $__server->page_embeds->page_description = htmlspecialchars($_playlist['description']);
109
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
110
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
111 111
 ?>	
112 112
 <!DOCTYPE html>
113 113
 <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en">
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
152 152
 				<?php } ?>
153 153
 				<?php
154
-					if(empty(trim($_user['bio'])))
155
-						$_user['bio'] = "This user has no description.";
156
-				?>
154
+                    if(empty(trim($_user['bio'])))
155
+                        $_user['bio'] = "This user has no description.";
156
+                ?>
157 157
 				<div id="content">
158 158
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
159 159
 						<div class="content" id="recommended-channels-list"></div>
@@ -312,20 +312,20 @@  discard block
 block discarded – undo
312 312
                                                         </div>
313 313
                                                         <ol>
314 314
 															<?php
315
-																$_playlist['videos'] = json_decode($_playlist['videos']);
316
-																$_playlist['count'] = 1;
317
-																foreach($_playlist['videos'] as $video) {
318
-																	if($__video_h->video_exists($video)) {
319
-																		$_video = $__video_h->fetch_video_rid($video);
320
-																		$_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
321
-																		$_video['age'] = $__time_h->time_elapsed_string($_video['publish']);		
322
-																		$_video['duration'] = $__time_h->timestamp($_video['duration']);
323
-																		$_video['views'] = $__video_h->fetch_video_views($_video['rid']);
324
-																		$_video['author'] = htmlspecialchars($_video['author']);		
325
-																		$_video['title'] = htmlspecialchars($_video['title']);
326
-																		$_video['description'] = $__video_h->shorten_description($_video['description'], 50);
327
-																		$_playlist['title'] = htmlspecialchars($_playlist['title']);
328
-																	?>
315
+                                                                $_playlist['videos'] = json_decode($_playlist['videos']);
316
+                                                                $_playlist['count'] = 1;
317
+                                                                foreach($_playlist['videos'] as $video) {
318
+                                                                    if($__video_h->video_exists($video)) {
319
+                                                                        $_video = $__video_h->fetch_video_rid($video);
320
+                                                                        $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
321
+                                                                        $_video['age'] = $__time_h->time_elapsed_string($_video['publish']);		
322
+                                                                        $_video['duration'] = $__time_h->timestamp($_video['duration']);
323
+                                                                        $_video['views'] = $__video_h->fetch_video_views($_video['rid']);
324
+                                                                        $_video['author'] = htmlspecialchars($_video['author']);		
325
+                                                                        $_video['title'] = htmlspecialchars($_video['title']);
326
+                                                                        $_video['description'] = $__video_h->shorten_description($_video['description'], 50);
327
+                                                                        $_playlist['title'] = htmlspecialchars($_playlist['title']);
328
+                                                                    ?>
329 329
 																	<li class="playlist-video-item
330 330
 																		odd
331 331
 																		"> 
@@ -480,9 +480,9 @@  discard block
 block discarded – undo
480 480
 													<h2>Featured Channels</h2>
481 481
 													<ul class="channel-summary-list ">
482 482
 														<?php 
483
-															foreach($_user['featured_channels'] as $user) {
484
-																if($__user_h->user_exists($user)) {
485
-														?>
483
+                                                            foreach($_user['featured_channels'] as $user) {
484
+                                                                if($__user_h->user_exists($user)) {
485
+                                                        ?>
486 486
 															<li class="yt-tile-visible yt-uix-tile">
487 487
 																<div class="channel-summary clearfix channel-summary-compact">
488 488
 																	<div class="channel-summary-thumb">
@@ -506,19 +506,19 @@  discard block
 block discarded – undo
506 506
 											</div>
507 507
 
508 508
 											<?php 
509
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
510
-												$stmt->bindParam(":search", $_user['username']);
511
-												$stmt->execute();
509
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
510
+                                                $stmt->bindParam(":search", $_user['username']);
511
+                                                $stmt->execute();
512 512
 
513
-												if($stmt->rowCount() != 0) {
514
-											?>
513
+                                                if($stmt->rowCount() != 0) {
514
+                                            ?>
515 515
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
516 516
 													<div class="module-view gh-featured">
517 517
 														<h2>Featured Playlists</h2>     
518 518
 														<?php
519
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
520
-															$playlist['videos'] = json_decode($playlist['videos']);
521
-														?> 
519
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
520
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
521
+                                                        ?> 
522 522
 															<div class="playlist yt-tile-visible yt-uix-tile">
523 523
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
524 524
 																<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   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 <?php
15 15
     $_playlist = $__video_h->fetch_playlist_rid($_GET['v']);
16 16
 
17
-    if(!$__user_h->user_exists($_playlist['author']))
17
+    if (!$__user_h->user_exists($_playlist['author']))
18 18
         header("Location: /?userdoesntexist");    
19 19
 
20 20
     $_user = $__user_h->fetch_user_username($_playlist['author']);
@@ -66,28 +66,28 @@  discard block
 block discarded – undo
66 66
     $_user['genre'] = strtolower($_user['genre']);
67 67
 	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
68 68
 
69
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
70
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
71
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
72
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
73
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
74
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
69
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
70
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
71
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
72
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
73
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
74
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
75 75
 
76
-	if(isset($_SESSION['siteusername']))
76
+	if (isset($_SESSION['siteusername']))
77 77
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
78 78
 
79
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
79
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
80 80
         $error = array();
81 81
 
82
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
83
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
84
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
82
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
83
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
84
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
85 85
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
86 86
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
87
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
87
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
88 88
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
89 89
 
90
-        if(!isset($error['message'])) {
90
+        if (!isset($error['message'])) {
91 91
 			$text = $_POST['comment'];
92 92
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
93 93
 			$stmt->bindParam(":id", $_user['username']);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
99 99
 
100
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
100
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
101 101
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
102 102
             }
103 103
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
132 132
 		<style>
133 133
 			#content-container {
134
-				background-color: <?php echo $_user['primary_color'];  ?>;
134
+				background-color: <?php echo $_user['primary_color']; ?>;
135 135
 				background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>);
136 136
 				background-repeat: repeat;
137 137
 				background-position: center top;
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
148 148
 			<div id="content-container">
149 149
 				<!-- begin content -->
150
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
150
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
151 151
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
152 152
 				<?php } ?>
153 153
 				<?php
154
-					if(empty(trim($_user['bio'])))
154
+					if (empty(trim($_user['bio'])))
155 155
 						$_user['bio'] = "This user has no description.";
156 156
 				?>
157 157
 				<div id="content">
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 												</div>
212 212
 											</div>
213 213
 											<div class="upper-left-section enable-fancy-subscribe-button">
214
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
214
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
215 215
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
216 216
 														<button 
217 217
 															href="#" 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 															title="" 
220 220
 															id="subscribe-button"
221 221
 															type="button" 
222
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
222
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
223 223
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
224 224
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
225 225
 														<span class="subscribed-label">Subscribed</span>
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 									</div>
254 254
 								</div>
255 255
 							</div>
256
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
256
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
257 257
 							<div id="branded-page-body">
258 258
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
259 259
 									<div class="tab-content-body">
@@ -287,8 +287,8 @@  discard block
 block discarded – undo
287 287
 															<?php
288 288
 																$_playlist['videos'] = json_decode($_playlist['videos']);
289 289
 																$_playlist['count'] = 1;
290
-																foreach($_playlist['videos'] as $video) {
291
-																	if($__video_h->video_exists($video)) {
290
+																foreach ($_playlist['videos'] as $video) {
291
+																	if ($__video_h->video_exists($video)) {
292 292
 																		$_video = $__video_h->fetch_video_rid($video);
293 293
 																		$_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
294 294
 																		$_video['age'] = $__time_h->time_elapsed_string($_video['publish']);		
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 														</div>
388 388
 														<hr class="yt-horizontal-rule ">
389 389
 													</div>
390
-													<?php if(!empty($_user['website'])) { ?>
390
+													<?php if (!empty($_user['website'])) { ?>
391 391
 														<div class="user-profile-item">
392 392
 															<div class="yt-c3-profile-custom-url field-container ">
393 393
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 															<h5>Country</h5>
437 437
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
438 438
 														</div>
439
-														<?php if($_user['genre'] != "none") { ?>
439
+														<?php if ($_user['genre'] != "none") { ?>
440 440
 															<div class="user-profile-item ">
441 441
 																<h5>Channel Genre</h5>
442 442
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
@@ -448,13 +448,13 @@  discard block
 block discarded – undo
448 448
 											</div>
449 449
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
450 450
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
451
-												<?php if(count($_user['featured_channels']) != 0) { ?>
451
+												<?php if (count($_user['featured_channels']) != 0) { ?>
452 452
 												<div class="module-view other-channels-view">
453 453
 													<h2>Featured Channels</h2>
454 454
 													<ul class="channel-summary-list ">
455 455
 														<?php 
456
-															foreach($_user['featured_channels'] as $user) {
457
-																if($__user_h->user_exists($user)) {
456
+															foreach ($_user['featured_channels'] as $user) {
457
+																if ($__user_h->user_exists($user)) {
458 458
 														?>
459 459
 															<li class="yt-tile-visible yt-uix-tile">
460 460
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -483,13 +483,13 @@  discard block
 block discarded – undo
483 483
 												$stmt->bindParam(":search", $_user['username']);
484 484
 												$stmt->execute();
485 485
 
486
-												if($stmt->rowCount() != 0) {
486
+												if ($stmt->rowCount() != 0) {
487 487
 											?>
488 488
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
489 489
 													<div class="module-view gh-featured">
490 490
 														<h2>Featured Playlists</h2>     
491 491
 														<?php
492
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
492
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
493 493
 															$playlist['videos'] = json_decode($playlist['videos']);
494 494
 														?> 
495 495
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/template.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-	$__server->page_embeds->page_title = "SubRocks - Replace me";
12
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
11
+    $__server->page_embeds->page_title = "SubRocks - Replace me";
12
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
13
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
15 15
 ?>
16 16
 <!DOCTYPE html>
17 17
 <html>
Please login to merge, or discard this patch.