Subversion Repositories oidplus

Rev

Rev 635 | Rev 801 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 635 Rev 800
Line 53... Line 53...
53
                        $handled = true;
53
                        $handled = true;
54
 
54
 
55
                        $ra_email = explode('$',$id)[1];
55
                        $ra_email = explode('$',$id)[1];
56
 
56
 
57
                        $out['title'] = _L('Automated AJAX calls');
57
                        $out['title'] = _L('Automated AJAX calls');
58
                        $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : '';
58
                        $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : '';
59
 
59
 
60
                        if (!OIDplus::authUtils()->isRaLoggedIn($ra_email) && !OIDplus::authUtils()->isAdminLoggedIn()) {
60
                        if (!OIDplus::authUtils()->isRaLoggedIn($ra_email) && !OIDplus::authUtils()->isAdminLoggedIn()) {
61
                                $out['icon'] = 'img/error_big.png';
61
                                $out['icon'] = 'img/error.png';
62
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as the requested RA %2 or as admin.',OIDplus::gui()->link('oidplus:login$ra$'.$ra_email),'<b>'.htmlentities($ra_email).'</b>').'</p>';
62
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as the requested RA %2 or as admin.',OIDplus::gui()->link('oidplus:login$ra$'.$ra_email),'<b>'.htmlentities($ra_email).'</b>').'</p>';
63
                                return;
63
                                return;
64
                        }
64
                        }
65
 
65
 
66
                        if (!OIDplus::baseConfig()->getValue('JWT_ALLOW_AJAX_USER', true)) {
66
                        if (!OIDplus::baseConfig()->getValue('JWT_ALLOW_AJAX_USER', true)) {
Line 124... Line 124...
124
 
124
 
125
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
125
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
126
                if (!$ra_email) return false;
126
                if (!$ra_email) return false;
127
                if (!OIDplus::authUtils()->isRaLoggedIn($ra_email) && !OIDplus::authUtils()->isAdminLoggedIn()) return false;
127
                if (!OIDplus::authUtils()->isRaLoggedIn($ra_email) && !OIDplus::authUtils()->isAdminLoggedIn()) return false;
128
 
128
 
129
                if (file_exists(__DIR__.'/treeicon.png')) {
129
                if (file_exists(__DIR__.'/img/main_icon16.png')) {
130
                        $tree_icon = OIDplus::webpath(__DIR__).'treeicon.png';
130
                        $tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png';
131
                } else {
131
                } else {
132
                        $tree_icon = null; // default icon (folder)
132
                        $tree_icon = null; // default icon (folder)
133
                }
133
                }
134
 
134
 
135
                $json[] = array(
135
                $json[] = array(