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 54... Line 54...
54
 
54
 
55
        public function gui($id, &$out, &$handled) {
55
        public function gui($id, &$out, &$handled) {
56
                if ($id === 'oidplus:list_ra') {
56
                if ($id === 'oidplus:list_ra') {
57
                        $handled = true;
57
                        $handled = true;
58
                        $out['title'] = _L('RA Listing');
58
                        $out['title'] = _L('RA Listing');
59
                        $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : '';
59
                        $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : '';
60
 
60
 
61
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
61
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
62
                                $out['icon'] = 'img/error_big.png';
62
                                $out['icon'] = 'img/error.png';
63
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>';
63
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>';
64
                                return;
64
                                return;
65
                        }
65
                        }
66
 
66
 
67
                        $out['text'] = '';
67
                        $out['text'] = '';
Line 96... Line 96...
96
        }
96
        }
97
 
97
 
98
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
98
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
99
                if (!OIDplus::authUtils()->isAdminLoggedIn()) return false;
99
                if (!OIDplus::authUtils()->isAdminLoggedIn()) return false;
100
 
100
 
101
                if (file_exists(__DIR__.'/treeicon.png')) {
101
                if (file_exists(__DIR__.'/img/main_icon16.png')) {
102
                        $tree_icon = OIDplus::webpath(__DIR__).'treeicon.png';
102
                        $tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png';
103
                } else {
103
                } else {
104
                        $tree_icon = null; // default icon (folder)
104
                        $tree_icon = null; // default icon (folder)
105
                }
105
                }
106
 
106
 
107
                $children = array();
107
                $children = array();