Test Failed
Push — main ( 1c70d7...b09f12 )
by chief
02:52
created
web/public/get/favorite.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,10 @@
 block discarded – undo
27 27
 $stmt->bind_param("ss", $_SESSION['siteusername'], $name);
28 28
     $stmt->execute();
29 29
     $result = $stmt->get_result();
30
-    if($result->num_rows === 1) die('You already favorited this video!');
31
-$stmt->close();
30
+    if($result->num_rows === 1) {
31
+        die('You already favorited this video!');
32
+    }
33
+    $stmt->close();
32 34
 
33 35
 $stmt = $conn->prepare("INSERT INTO favorite_video (sender, reciever) VALUES (?, ?)");
34 36
 $stmt->bind_param("ss", $_SESSION['siteusername'], $name);
Please login to merge, or discard this patch.
web/public/get/unblock.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,10 @@
 block discarded – undo
25 25
 $stmt->bind_param("ss", $_SESSION['siteusername'], $name);
26 26
     $stmt->execute();
27 27
     $result = $stmt->get_result();
28
-    if($result->num_rows === 0) die('You haven\'t blocked this person!');
29
-$stmt->close();
28
+    if($result->num_rows === 0) {
29
+        die('You haven\'t blocked this person!');
30
+    }
31
+    $stmt->close();
30 32
 
31 33
 $stmt = $conn->prepare("DELETE FROM block WHERE sender = ? AND reciever = ?");
32 34
 $stmt->bind_param("ss", $_SESSION['siteusername'], $name);
Please login to merge, or discard this patch.
web/public/get/block.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,10 @@
 block discarded – undo
24 24
 $stmt->bind_param("ss", $_SESSION['siteusername'], $name);
25 25
     $stmt->execute();
26 26
     $result = $stmt->get_result();
27
-    if($result->num_rows === 1) die('You already blocked this person!');
28
-$stmt->close();
27
+    if($result->num_rows === 1) {
28
+        die('You already blocked this person!');
29
+    }
30
+    $stmt->close();
29 31
 
30 32
 $stmt = $conn->prepare("INSERT INTO block (sender, reciever) VALUES (?, ?)");
31 33
 $stmt->bind_param("ss", $_SESSION['siteusername'], $name);
Please login to merge, or discard this patch.
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/playlists.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
         $stmt->bindParam(":username", $_SESSION['siteusername']);
28 28
         $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_';
29 29
         $result = '';
30
-        for ($i = 0; $i < 11; $i++)
31
-            $rid .= $characters[mt_rand(0, 63)];
30
+        for ($i = 0; $i < 11; $i++) {
31
+                    $rid .= $characters[mt_rand(0, 63)];
32
+        }
32 33
         $text = htmlspecialchars($_POST['comment']);
33 34
         $stmt->execute();
34 35
         $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment");
Please login to merge, or discard this patch.
web/public/channel.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/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.