Test Failed
Push — main ( c0bf37...778e90 )
by chief
50s queued 14s
created
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/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.
web/public/admin/index.php 3 patches
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -12,64 +12,64 @@  discard block
 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 - Admin Panel";
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 - Admin Panel";
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
-	function get_server_array_stats() {
21
-		$stat1 = file('/proc/stat'); 
22
-		sleep(1); 
23
-		$stat2 = file('/proc/stat'); 
24
-		$info1 = explode(" ", preg_replace("!cpu +!", "", $stat1[0])); 
25
-		$info2 = explode(" ", preg_replace("!cpu +!", "", $stat2[0])); 
26
-		$dif = array(); 
27
-		$dif['user'] = $info2[0] - $info1[0]; 
28
-		$dif['nice'] = $info2[1] - $info1[1]; 
29
-		$dif['sys'] = $info2[2] - $info1[2]; 
30
-		$dif['idle'] = $info2[3] - $info1[3]; 
31
-		$total = array_sum($dif); 
32
-		$cpu = array(); 
33
-		foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
20
+    function get_server_array_stats() {
21
+        $stat1 = file('/proc/stat'); 
22
+        sleep(1); 
23
+        $stat2 = file('/proc/stat'); 
24
+        $info1 = explode(" ", preg_replace("!cpu +!", "", $stat1[0])); 
25
+        $info2 = explode(" ", preg_replace("!cpu +!", "", $stat2[0])); 
26
+        $dif = array(); 
27
+        $dif['user'] = $info2[0] - $info1[0]; 
28
+        $dif['nice'] = $info2[1] - $info1[1]; 
29
+        $dif['sys'] = $info2[2] - $info1[2]; 
30
+        $dif['idle'] = $info2[3] - $info1[3]; 
31
+        $total = array_sum($dif); 
32
+        $cpu = array(); 
33
+        foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
34 34
 
35
-		return $cpu;
36
-	}
35
+        return $cpu;
36
+    }
37 37
 
38
-	function adjustBrightness($hexCode, $adjustPercent) {
39
-		$hexCode = ltrim($hexCode, '#');
38
+    function adjustBrightness($hexCode, $adjustPercent) {
39
+        $hexCode = ltrim($hexCode, '#');
40 40
 
41
-		if (strlen($hexCode) == 3) {
42
-			$hexCode = $hexCode[0] . $hexCode[0] . $hexCode[1] . $hexCode[1] . $hexCode[2] . $hexCode[2];
43
-		}
41
+        if (strlen($hexCode) == 3) {
42
+            $hexCode = $hexCode[0] . $hexCode[0] . $hexCode[1] . $hexCode[1] . $hexCode[2] . $hexCode[2];
43
+        }
44 44
 
45
-		$hexCode = array_map('hexdec', str_split($hexCode, 2));
45
+        $hexCode = array_map('hexdec', str_split($hexCode, 2));
46 46
 
47
-		foreach ($hexCode as & $color) {
48
-			$adjustableLimit = $adjustPercent < 0 ? $color : 255 - $color;
49
-			$adjustAmount = ceil($adjustableLimit * $adjustPercent);
47
+        foreach ($hexCode as & $color) {
48
+            $adjustableLimit = $adjustPercent < 0 ? $color : 255 - $color;
49
+            $adjustAmount = ceil($adjustableLimit * $adjustPercent);
50 50
 
51
-			$color = str_pad(dechex($color + $adjustAmount), 2, '0', STR_PAD_LEFT);
52
-		}
51
+            $color = str_pad(dechex($color + $adjustAmount), 2, '0', STR_PAD_LEFT);
52
+        }
53 53
 
54
-		return '#' . implode($hexCode);
55
-	}
54
+        return '#' . implode($hexCode);
55
+    }
56 56
 
57
-	function get_server_memory_usage() {
58
-		$free = shell_exec('free');
59
-		$free = (string)trim($free);
60
-		$free_arr = explode("\n", $free);
61
-		$mem = explode(" ", $free_arr[1]);
62
-		$mem = array_filter($mem);
63
-		$mem = array_merge($mem);
64
-		$memory_usage = $mem[2]/$mem[1]*100;
57
+    function get_server_memory_usage() {
58
+        $free = shell_exec('free');
59
+        $free = (string)trim($free);
60
+        $free_arr = explode("\n", $free);
61
+        $mem = explode(" ", $free_arr[1]);
62
+        $mem = array_filter($mem);
63
+        $mem = array_merge($mem);
64
+        $memory_usage = $mem[2]/$mem[1]*100;
65 65
 	
66
-		return $memory_usage;
67
-	}
66
+        return $memory_usage;
67
+    }
68 68
 
69
-	function get_server_cpu_usage() {
70
-		$load = sys_getloadavg();
71
-		return $load[0];
72
-	}	
69
+    function get_server_cpu_usage() {
70
+        $load = sys_getloadavg();
71
+        return $load[0];
72
+    }	
73 73
 ?>
74 74
 <!DOCTYPE html>
75 75
 <html dir="ltr">
@@ -237,14 +237,14 @@  discard block
 block discarded – undo
237 237
                                         <h3>Statistics</h3>
238 238
                                         <ul class="disc">
239 239
 											<?php 
240
-												$stmt = $__db->prepare("SELECT id FROM videos");
241
-												$stmt->execute();
242
-												$videos = $stmt->rowCount();
240
+                                                $stmt = $__db->prepare("SELECT id FROM videos");
241
+                                                $stmt->execute();
242
+                                                $videos = $stmt->rowCount();
243 243
 
244
-												$stmt = $__db->prepare("SELECT id FROM users");
245
-												$stmt->execute();
246
-												$users = $stmt->rowCount();
247
-											?>
244
+                                                $stmt = $__db->prepare("SELECT id FROM users");
245
+                                                $stmt->execute();
246
+                                                $users = $stmt->rowCount();
247
+                                            ?>
248 248
 											<li>Videos uploaded: <b><?php echo $videos; ?></b></li>
249 249
 											<li>
250 250
 												Users registered: <b><?php echo $users; ?></b>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 <?php $__user_u = new user_update($__db); ?>
10 10
 <?php $__db_h = new db_helper(); ?>
11 11
 <?php $__time_h = new time_helper(); ?>
12
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
-<?php if(!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?>
12
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?>
14 14
 <?php
15 15
 	$__server->page_embeds->page_title = "SubRocks - Admin Panel";
16 16
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		$dif['idle'] = $info2[3] - $info1[3]; 
31 31
 		$total = array_sum($dif); 
32 32
 		$cpu = array(); 
33
-		foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
33
+		foreach ($dif as $x=>$y) $cpu[$x] = round($y/$total*100, 1);
34 34
 
35 35
 		return $cpu;
36 36
 	}
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 		foreach ($hexCode as & $color) {
48 48
 			$adjustableLimit = $adjustPercent < 0 ? $color : 255 - $color;
49
-			$adjustAmount = ceil($adjustableLimit * $adjustPercent);
49
+			$adjustAmount = ceil($adjustableLimit*$adjustPercent);
50 50
 
51 51
 			$color = str_pad(dechex($color + $adjustAmount), 2, '0', STR_PAD_LEFT);
52 52
 		}
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 	function get_server_memory_usage() {
58 58
 		$free = shell_exec('free');
59
-		$free = (string)trim($free);
59
+		$free = (string) trim($free);
60 60
 		$free_arr = explode("\n", $free);
61 61
 		$mem = explode(" ", $free_arr[1]);
62 62
 		$mem = array_filter($mem);
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 											CPU Idle Usage: 
262 262
 												<b style="float:right;color:<?php echo adjustBrightness("#FF0000", $server['idle']); ?>">
263 263
 													<?php echo $server['idle']; ?>%</b><br>
264
-											RAM Usage: <b style="float:right;"><?php echo round(get_server_memory_usage(), 3)	; ?> megabytes</b>
264
+											RAM Usage: <b style="float:right;"><?php echo round(get_server_memory_usage(), 3); ?> megabytes</b>
265 265
 										</div><br>
266 266
                                         <button href="/admin/stats" type="button" class=" yt-uix-button yt-uix-button-default" onclick=";window.location.href=this.getAttribute('href');return false;" role="button"><span class="yt-uix-button-content">See more statistics </span></button>
267 267
                                     </div>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 		$dif['idle'] = $info2[3] - $info1[3]; 
27 27
 		$total = array_sum($dif); 
28 28
 		$cpu = array(); 
29
-		foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
29
+		foreach($dif as $x=>$y) {
30
+		    $cpu[$x] = round($y / $total * 100, 1);
31
+		}
30 32
 
31 33
 		return $cpu;
32 34
 	}
Please login to merge, or discard this patch.
web/public/admin/bans.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 - Ban User";
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 - Ban User";
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 - Ban User";
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/comment_service_ajax.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@  discard block
 block discarded – undo
14 14
 <?php
15 15
 $_video = $__video_h->fetch_video_rid($_SESSION['current_video']);
16 16
 
17
-if($_SERVER['REQUEST_METHOD'] == 'POST') {
17
+if ($_SERVER['REQUEST_METHOD'] == 'POST') {
18 18
     $error = array();
19 19
 
20
-    if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
21
-    if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
22
-    if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
23
-    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; }
20
+    if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
21
+    if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
22
+    if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
23
+    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; }
24 24
 
25
-    if(!isset($error['message'])) {
25
+    if (!isset($error['message'])) {
26 26
         $text = $_POST['comment'];
27 27
         $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)");
28 28
         $stmt->bindParam(":v", $_SESSION['current_video']);
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
         $stmt->execute();
32 32
 
33 33
         $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment");
34
-        if(@$_SESSION['siteusername'] != $_video['author'])
34
+        if (@$_SESSION['siteusername'] != $_video['author'])
35 35
             $__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt");
36 36
     }
37 37
 }
38 38
 
39 39
 header("Content-type: text/xml");
40 40
 // ugly solution
41
-if(!isset($error['status'])) {
41
+if (!isset($error['status'])) {
42 42
     $xml = '<?xml version="1.0" encoding="utf-8"?><root><str_code><![CDATA[OK]]></str_code><html_content><![CDATA[<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="420" data-score="0"><div class="comment-body"><div class="content-container"><div class="content"><div class="comment-text" dir="ltr"><p>' . $__video_h->shorten_description($_POST['comment'], 2048, true) . '</p></div><p class="metadata"><span class="author "><a href="/user/' . htmlspecialchars($_SESSION['siteusername']) . '" class="yt-uix-sessionlink yt-user-name " data-sessionlink="' . htmlspecialchars($_SESSION['siteusername']) . '" dir="ltr">' . htmlspecialchars($_SESSION['siteusername']) . '</a></span><span class="time" dir="ltr"><span dir="ltr">just now<span></span></span></span></p></div><div class="comment-actions"><span class="yt-uix-button-group"><button type="button" class="start comment-action-vote-up comment-action yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" onclick=";return false;" title="Vote Up" data-action="vote-up" data-tooltip-show-delay="300" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-watch-comment-vote-up" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Vote Up"><span class="yt-valign-trick"></span></span></button><button type="button" class="end comment-action-vote-down comment-action yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" onclick=";return false;" title="Vote Down" data-action="vote-down" data-tooltip-show-delay="300" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-watch-comment-vote-down" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Vote Down"><span class="yt-valign-trick"></span></span></button></span><span class="yt-uix-button-group"><!--<button type="button" class="start comment-action yt-uix-button yt-uix-button-default" onclick=";return false;" data-action="reply" role="button"><span class="yt-uix-button-content">Reply </span></button>--><button type="button" class="end flip yt-uix-button yt-uix-button-default yt-uix-button-empty" onclick=";return false;" data-button-has-sibling-menu="true" role="button" aria-pressed="false" aria-expanded="false" aria-haspopup="true" aria-activedescendant=""><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""><div class=" yt-uix-button-menu yt-uix-button-menu-default" style="display: none;"><ul><li class="comment-action" data-action="share"><span class="yt-uix-button-menu-item">Share</span></li><li class="comment-action-remove comment-action" data-action="remove"><span class="yt-uix-button-menu-item">Remove</span></li><li class="comment-action" data-action="flag"><span class="yt-uix-button-menu-item">Flag for spam</span></li><li class="comment-action-block comment-action" data-action="block"><span class="yt-uix-button-menu-item">Block User</span></li><li class="comment-action-unblock comment-action" data-action="unblock"><span class="yt-uix-button-menu-item">Unblock User</span></li></ul></div></button></span></div></div></div></li>]]></html_content><return_code><![CDATA[0]]></return_code></root>';
43 43
 } else {
44 44
     $xml = '<?xml version="1.0" encoding="utf-8"?><root><str_code><![CDATA[OK]]></str_code><html_content><![CDATA[<div class="yt-alert yt-alert-default yt-alert-error ">  <div class="yt-alert-icon"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"></div><div class="yt-alert-buttons"></div><div class="yt-alert-content" role="alert"><span class="yt-alert-vertical-trick"></span><div class="yt-alert-message">You are under a cooldown!</div></div></div>]]></html_content><return_code><![CDATA[0]]></return_code></root>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@
 block discarded – undo
31 31
         $stmt->execute();
32 32
 
33 33
         $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment");
34
-        if(@$_SESSION['siteusername'] != $_video['author'])
35
-            $__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt");
34
+        if(@$_SESSION['siteusername'] != $_video['author']) {
35
+                    $__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt");
36
+        }
36 37
     }
37 38
 }
38 39
 
Please login to merge, or discard this patch.
web/public/d/reply.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
     ]
22 22
 ];
23 23
 
24
-if(empty(trim($request->comment))) { header("Location: /watch?v=" . $_GET['v']); }
25
-if(empty(trim($request->to_id  ))) { header("Location: /"); }
26
-if(isset($_SESSION['siteusername'])) {
24
+if (empty(trim($request->comment))) { header("Location: /watch?v=" . $_GET['v']); }
25
+if (empty(trim($request->to_id))) { header("Location: /"); }
26
+if (isset($_SESSION['siteusername'])) {
27 27
     $stmt = $__db->prepare("INSERT INTO comment_reply (toid, author, comment) VALUES (:to_id, :author, :comment)");
28
-    $stmt->bindParam(":to_id",   $request->to_id);
29
-    $stmt->bindParam(":author",  $request->sender);
28
+    $stmt->bindParam(":to_id", $request->to_id);
29
+    $stmt->bindParam(":author", $request->sender);
30 30
     $stmt->bindParam(":comment", $request->comment);
31 31
     $stmt->execute();
32 32
 
Please login to merge, or discard this patch.
web/public/d/admin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13 13
 <?php
14
-    if(!isset($_SESSION['siteusername'])) { die(); }
15
-    if(!$__user_h->if_admin($_SESSION['siteusername'])) { die(); }
14
+    if (!isset($_SESSION['siteusername'])) { die(); }
15
+    if (!$__user_h->if_admin($_SESSION['siteusername'])) { die(); }
16 16
 
17 17
     $request = (object) [
18 18
         "action" => $_GET['action'],
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
     );
49 49
     $request->tables_increment = 0;
50 50
 
51
-    if($request->action == "ban_users") {        
52
-        foreach($request->users as $username) {
51
+    if ($request->action == "ban_users") {        
52
+        foreach ($request->users as $username) {
53 53
             $stmt = $__db->prepare("DELETE FROM users WHERE username=:username");
54 54
             $stmt->execute(array(
55 55
                 ':username' => $username,
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 
133 133
             header("Location: /admin/bans");
134 134
         }
135
-    } else if($request->action == "delete_videos") {
136
-        foreach($request->videos as $video) {
135
+    } else if ($request->action == "delete_videos") {
136
+        foreach ($request->videos as $video) {
137 137
             $stmt = $__db->prepare("DELETE FROM videos WHERE rid=:video");
138 138
             $stmt->execute(array(
139 139
                 ':video' => $video,
Please login to merge, or discard this patch.