looking for wrong seperator
[Pman.Core] / JavascriptError.php
index be9e303..11f4deb 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 // FIXME... auth errors need ratelimiting 
 
+require_once 'Pman.php';
+
 class Pman_Core_JavascriptError extends Pman {
     
     
@@ -9,12 +11,9 @@ class Pman_Core_JavascriptError extends Pman {
         parent::getAuth(); // load company!
         $au = $this->getAuthUser();
        
-        if (!$au) {
+        if (!$au || !$au->pid()) {
             
-            $this->jerr("Not authenticated", array('authFailure' => true));
-        }
-        if (!$au->pid()   ) { // not set up yet..
-            $this->jerr("Not authenticated", array('authFailure' => true));
+            die("authenticated Users only");
         }
         
         
@@ -22,6 +21,18 @@ class Pman_Core_JavascriptError extends Pman {
         return true;
     }
     
+    function get($v, $opts=array())
+    {
+        die("invalid url");
+    }
+    
+    function post($v)
+    {
+         
+        $this->addEvent("JSERROR", false,$_REQUEST['msg']);
+        $this->jok("OK");
+    }
+