Test Failed
Push — main ( 4a5de7...3526c5 )
by chief
03:00
created
web/public/video_manager_ajax.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,10 +85,11 @@
 block discarded – undo
85 85
                 $status = "Unknown";
86 86
             }                      
87 87
             
88
-            if($video['commenting'] == "a") 
89
-                $video['commentstatus'] = "Commenting allowed";
90
-            else 
91
-                $video['commentstatus'] = "Commenting disallowed";
88
+            if($video['commenting'] == "a") {
89
+                            $video['commentstatus'] = "Commenting allowed";
90
+            } else {
91
+                            $video['commentstatus'] = "Commenting disallowed";
92
+            }
92 93
     ?> 
93 94
     <tr style="margin-top: 5px;" id="videoslist">
94 95
         <td class="video-manager-left">
Please login to merge, or discard this patch.
web/public/favorite_videos.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -221,10 +221,11 @@
 block discarded – undo
221 221
 													$status = "Unknown";
222 222
 												}                      
223 223
 												
224
-												if($_video['commenting'] == "a") 
225
-													$_video['commentstatus'] = "Commenting allowed";
226
-												else 
227
-													$_video['commentstatus'] = "Commenting disallowed";
224
+												if($_video['commenting'] == "a") {
225
+																									$_video['commentstatus'] = "Commenting allowed";
226
+												} else {
227
+																									$_video['commentstatus'] = "Commenting disallowed";
228
+												}
228 229
                                     ?> 
229 230
                                     <tr style="margin-top: 5px;" id="videoslist">
230 231
                                         <td class="video-manager-left">
Please login to merge, or discard this patch.
web/public/index.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -41,10 +41,11 @@  discard block
 block discarded – undo
41 41
 
42 42
         $file_info = new finfo(FILEINFO_MIME_TYPE);
43 43
         $mime_type = $file_info->buffer($file);
44
-        if($mime_type == "text/plain")
45
-            header('Content-Type: text/css');
46
-        else
47
-            header('Content-Type: ' . $mime_type);
44
+        if($mime_type == "text/plain") {
45
+                    header('Content-Type: text/css');
46
+        } else {
47
+                    header('Content-Type: ' . $mime_type);
48
+        }
48 49
         echo $file;
49 50
         break;
50 51
     case 'inbox':
@@ -82,10 +83,11 @@  discard block
 block discarded – undo
82 83
 		$__db_h = new db_helper(); 
83 84
 		$__time_h = new time_helper(); 
84 85
         
85
-        if(empty($requestedPage[1]))
86
-            require_once($_SERVER['DOCUMENT_ROOT'] . "/homepage.php");
87
-        else
88
-            require_once($_SERVER['DOCUMENT_ROOT'] . "/" . $requestedPage[1] . ".php");
86
+        if(empty($requestedPage[1])) {
87
+                    require_once($_SERVER['DOCUMENT_ROOT'] . "/homepage.php");
88
+        } else {
89
+                    require_once($_SERVER['DOCUMENT_ROOT'] . "/" . $requestedPage[1] . ".php");
90
+        }
89 91
         die();
90 92
         break;
91 93
 }
92 94
\ No newline at end of file
Please login to merge, or discard this patch.
web/public/s/classes/video_helper.php 1 patch
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,14 +12,22 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function sh_exec(string $cmd, string $outputfile = "", string $pidfile = "", bool $mergestderror = true, bool $bg = false) {
14 14
         $fullcmd = $cmd;
15
-        if(strlen($outputfile) > 0) $fullcmd .= " >> " . $outputfile;
16
-        if($mergestderror) $fullcmd .= " 2>&1";
15
+        if(strlen($outputfile) > 0) {
16
+            $fullcmd .= " >> " . $outputfile;
17
+        }
18
+        if($mergestderror) {
19
+            $fullcmd .= " 2>&1";
20
+        }
17 21
         
18 22
         if($bg) {
19 23
             $fullcmd = "nohup " . $fullcmd . " &";
20
-            if(strlen($pidfile)) $fullcmd .= " echo $! > " . $pidfile;
24
+            if(strlen($pidfile)) {
25
+                $fullcmd .= " echo $! > " . $pidfile;
26
+            }
21 27
         } else {
22
-            if(strlen($pidfile) > 0) $fullcmd .= "; echo $$ > " . $pidfile;
28
+            if(strlen($pidfile) > 0) {
29
+                $fullcmd .= "; echo $$ > " . $pidfile;
30
+            }
23 31
         }
24 32
         shell_exec($fullcmd);
25 33
     }
@@ -34,8 +42,7 @@  discard block
 block discarded – undo
34 42
             }
35 43
     
36 44
             fclose($handle);
37
-        }
38
-        catch(Exception $e) {
45
+        } catch(Exception $e) {
39 46
             trigger_error("file_get_contents_chunked::" . $e->getMessage(),E_USER_NOTICE);
40 47
             return false;
41 48
         }
Please login to merge, or discard this patch.
web/public/channel_videos.php 1 patch
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,11 +15,13 @@  discard block
 block discarded – undo
15 15
 <?php $__db_h = new db_helper(); ?>
16 16
 <?php $__time_h = new time_helper(); ?>
17 17
 <?php
18
-	if(isset($_SESSION['siteusername']))
19
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18
+	if(isset($_SESSION['siteusername'])) {
19
+		    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
20
+	}
20 21
 
21
-    if(!$__user_h->user_exists($_GET['n']))
22
-        header("Location: /?userdoesntexist");
22
+    if(!$__user_h->user_exists($_GET['n'])) {
23
+            header("Location: /?userdoesntexist");
24
+    }
23 25
 
24 26
     $_user = $__user_h->fetch_user_username($_GET['n']);
25 27
 
@@ -42,10 +44,11 @@  discard block
 block discarded – undo
42 44
     
43 45
         if (
44 46
               ctype_xdigit($colorCode) &&
45
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
46
-                   return true;
47
-    
48
-        else return false;
47
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
48
+                           return true;
49
+        } else {
50
+            return false;
51
+        }
49 52
     }
50 53
 
51 54
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
@@ -77,8 +80,9 @@  discard block
 block discarded – undo
77 80
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
78 81
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
79 82
 
80
-	if(isset($_SESSION['siteusername']))
81
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
83
+	if(isset($_SESSION['siteusername'])) {
84
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
85
+	}
82 86
 
83 87
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
84 88
         $error = array();
Please login to merge, or discard this patch.
web/public/uploaded_video.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,12 +18,14 @@
 block discarded – undo
18 18
     $video['title'] = htmlspecialchars($video['title']);
19 19
     $video['description'] = $__video_h->shorten_description($video['description'], 50);
20 20
 
21
-	if(!$__video_h->video_exists($_GET['v']))
22
-		header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag.");
21
+	if(!$__video_h->video_exists($_GET['v'])) {
22
+			header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag.");
23
+	}
23 24
 
24
-    if($_SESSION['siteusername'] != $video['author'])
25
-        header("Location: /");
26
-?>
25
+    if($_SESSION['siteusername'] != $video['author']) {
26
+            header("Location: /");
27
+    }
28
+    ?>
27 29
 <!DOCTYPE html>
28 30
 <html>
29 31
 	<head>
Please login to merge, or discard this patch.
web/public/playlists.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@
 block discarded – undo
26 26
         if(!isset($error['message'])) {
27 27
             $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_';
28 28
             $result = '';
29
-            for ($i = 0; $i < 11; $i++)
30
-                $rid .= $characters[mt_rand(0, 63)];
29
+            for ($i = 0; $i < 11; $i++) {
30
+                            $rid .= $characters[mt_rand(0, 63)];
31
+            }
31 32
             $stmt = $__db->prepare("INSERT INTO playlists (title, description, rid, author) VALUES (:title, :desc, :rid, :username)");
32 33
             $stmt->bindParam(":title", $_POST['title']);
33 34
             $stmt->bindParam(":desc", $_POST['comment']);
Please login to merge, or discard this patch.
web/public/get_video_info.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,10 +50,11 @@
 block discarded – undo
50 50
 $count = 0;
51 51
 $url_encoded_fmt_stream_map;
52 52
 foreach($fmt_stream_map as $stream) {
53
-    if($count == 0)
54
-        $url_encoded_fmt_stream_map = http_build_query($stream);
55
-    else
56
-        $url_encoded_fmt_stream_map = $url_encoded_fmt_stream_map . "," . http_build_query($stream);
53
+    if($count == 0) {
54
+            $url_encoded_fmt_stream_map = http_build_query($stream);
55
+    } else {
56
+            $url_encoded_fmt_stream_map = $url_encoded_fmt_stream_map . "," . http_build_query($stream);
57
+    }
57 58
     $count++;
58 59
 }
59 60
 
Please login to merge, or discard this patch.
web/public/s/mod/sidebar_inbox.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
 <div id="browse-side-column" class="ytg-2col ytg-last">
41 41
     <ol class="navigation-menu">
42 42
         <?php foreach($__tabs as $_tab) { 
43
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
44
-                $_tab->selected = true;
43
+            if($_SERVER['REQUEST_URI'] != $_tab->url) {
44
+                            $_tab->selected = true;
45
+            }
45 46
             ?>
46 47
             <li class="menu-item">
47 48
                 <a class="<?php echo $_tab->selected ? true : "selected"; ?>" href="<?php echo $_tab->url; ?>">
Please login to merge, or discard this patch.