JavascriptError.php
[Pman.Core] / JavascriptError.php
1 <?php
2 // FIXME... auth errors need ratelimiting 
3
4 require_once 'Pman.php';
5
6 class Pman_Core_JavascriptError extends Pman {
7     
8     
9     function getAuth()
10     {
11         parent::getAuth(); // load company!
12         $au = $this->getAuthUser();
13        
14         if (!$au) {
15             
16             $this->jerr("Not authenticated", array('authFailure' => true));
17         }
18         if (!$au->pid()   ) { // not set up yet..
19             $this->jerr("Not authenticated", array('authFailure' => true));
20         }
21         
22         
23         $this->authUser = $au;
24         return true;
25     }
26     
27     function get()
28     {
29         die("invalid url");
30     }
31     
32     function post()
33     {
34          
35         $this->addEvent("JSERROR", false,$_REQUEST['msg']);
36         $this->jok("OK");
37     }
38     
39     
40     
41     
42 }