Test Failed
Push — main ( d9df25...7cc2e0 )
by chief
07:27
created
web/public/s/classes/config.inc.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@
 block discarded – undo
38 38
             ]
39 39
         );
40 40
         $__server->db_properties->db_connected = true;
41
-    }
42
-    catch(PDOException $e)
41
+    } catch(PDOException $e)
43 42
     {
44 43
         $__server->db_properties->db_connected = false;
45 44
         die($e);
Please login to merge, or discard this patch.
web/public/get/add_friend.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,15 +10,18 @@
 block discarded – undo
10 10
 <?php $__time_h = new time_helper(); ?>
11 11
 <?php
12 12
 
13
-if($_SESSION['siteusername'] == $_GET['sending'])
13
+if($_SESSION['siteusername'] == $_GET['sending']) {
14 14
     die("You can't friend yourself!");
15
+}
15 16
 
16 17
 $stmt = $conn->prepare("SELECT * FROM friends WHERE sender = ? AND reciever = ?");
17 18
 $stmt->bind_param("ss", $_SESSION['siteusername'], $_GET['sending']);
18 19
     $stmt->execute();
19 20
     $result = $stmt->get_result();
20
-    if($result->num_rows === 1) die('You already sent a friend request to this person');
21
-$stmt->close();
21
+    if($result->num_rows === 1) {
22
+        die('You already sent a friend request to this person');
23
+    }
24
+    $stmt->close();
22 25
 
23 26
 $stmt = $conn->prepare("INSERT INTO friends (sender, reciever, status) VALUES (?, ?, 'u')");
24 27
 $stmt->bind_param("ss", $_SESSION['siteusername'], $_GET['sending']);
Please login to merge, or discard this patch.
web/public/get/unfavorite.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,10 @@
 block discarded – undo
26 26
 $stmt->bind_param("ss", $_SESSION['siteusername'], $name);
27 27
     $stmt->execute();
28 28
     $result = $stmt->get_result();
29
-    if($result->num_rows === 0) die('You already are not subscribed to this person!');
30
-$stmt->close();
29
+    if($result->num_rows === 0) {
30
+        die('You already are not subscribed to this person!');
31
+    }
32
+    $stmt->close();
31 33
 
32 34
 $stmt = $conn->prepare("DELETE FROM favorite_video WHERE sender = ? AND reciever = ?");
33 35
 $stmt->bind_param("ss", $_SESSION['siteusername'], $name);
Please login to merge, or discard this patch.
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/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.