PHP7 fix
[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 || !$au->pid()) {
15             
16             die("authenticated Users only");
17         }
18         
19         
20         $this->authUser = $au;
21         return true;
22     }
23     
24     function get($v, $opts=array())
25     {
26         die("invalid url");
27     }
28     
29     function post($v)
30     {
31          
32         $this->addEvent("JSERROR", false,$_REQUEST['msg']);
33         $this->jok("OK");
34     }
35     
36     
37     
38     
39 }