DataObjects/Core_domain.php
[Pman.Core] / JavascriptError.php
index e69de29..9e3c13b 100644 (file)
@@ -0,0 +1,39 @@
+<?php
+// FIXME... auth errors need ratelimiting 
+
+require_once 'Pman.php';
+
+class Pman_Core_JavascriptError extends Pman {
+    
+    
+    function getAuth()
+    {
+        parent::getAuth(); // load company!
+        $au = $this->getAuthUser();
+       
+        if (!$au || !$au->pid()) {
+            
+            die("authenticated Users only");
+        }
+        
+        
+        $this->authUser = $au;
+        return true;
+    }
+    
+    function get()
+    {
+        die("invalid url");
+    }
+    
+    function post()
+    {
+         
+        $this->addEvent("JSERROR", false,$_REQUEST['msg']);
+        $this->jok("OK");
+    }
+    
+    
+    
+    
+}