Passed
Push — master ( 77ba77...a19bd1 )
by Cody
01:48
created
index.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
   if (!$_SESSION['logged_in'] && $password != "") {
28 28
     require_once("functions/login.php");
29
-  }else if ($_SESSION['logged_in'] || $password == "") {
29
+  } else if ($_SESSION['logged_in'] || $password == "") {
30 30
     // display messages
31 31
     require_once("functions/display_messages.php");
32 32
     $messages = get_messages($file);
Please login to merge, or discard this patch.
functions/login.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2
-if($password != "" && isset($_POST['auth_submit'])){
3
-  if($password != $_POST['password']){
2
+if ($password != "" && isset($_POST['auth_submit'])) {
3
+  if ($password != $_POST['password']) {
4 4
     ?>
5 5
       <b>wrong password</b>, try again.
6 6
     <?php
7
-  } else{
7
+  }else {
8 8
     $_SESSION['logged_in'] = true;
9 9
     echo 'logged in!';
10 10
     header("refresh:0;");
Please login to merge, or discard this patch.
functions/display_messages.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,15 +15,15 @@
 block discarded – undo
15 15
     }
16 16
     if (isset($display_messages) && $display_messages != "") {
17 17
       $msg = $display_messages;
18
-    } else {
18
+    }else {
19 19
       $msg = "something's wrong, this nerve is either empty or our brain doesn't have access to this nerve's messages...";
20 20
     }
21 21
 
22 22
     if ($action == "messages") {
23 23
       $result = $msg;
24
-    } else if ($action == "last_msg") {
24
+    }else if ($action == "last_msg") {
25 25
       $result = $last_msg;
26
-    } else {
26
+    }else {
27 27
       $result = "show_messages: parameters <b>must</b> be either 'messages' or 'last_msg'";
28 28
     }
29 29
 
Please login to merge, or discard this patch.
functions/post_messages.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         $check = getimagesize($_FILES["file"]["tmp_name"]);
16 16
         if ($check !== false) {
17 17
           $uploadOk = 1;
18
-        } else {
18
+        }else {
19 19
           echo "what are you doing anon? that file was not an image or a webm...";
20 20
           $uploadOk = 0;
21 21
         }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         // Upload the file
36 36
         if ($uploadOk == 0) {
37 37
             echo "Sorry, your file was not uploaded.";
38
-        } else {
38
+        }else {
39 39
             move_uploaded_file($_FILES["file"]["tmp_name"], $target_file);
40 40
         }
41 41
       }
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
       array_push($messages["messages"], $new_message);
59 59
       $jsondata = json_encode($messages, JSON_PRETTY_PRINT);
60 60
       file_put_contents($file, $jsondata);
61
-    } else {
61
+    }else {
62 62
       echo "The message field is <b>required</b>.";
63 63
     }
64 64
   }
65 65
 
66
-  function greenText($msg){
66
+  function greenText($msg) {
67 67
     preg_match_all('/(?<!&gt;)&gt;(?!&gt;).*/', $msg, $matches, PREG_SET_ORDER, 0);
68 68
 
69 69
     foreach ($matches as $m) {
Please login to merge, or discard this patch.