Rev 800 | Rev 1050 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 800 | Rev 801 | ||
---|---|---|---|
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__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
59 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png' : ''; |
60 | 60 | ||
61 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
61 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
62 | $out['icon'] = 'img/error.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; |
Line 97... | Line 97... | ||
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__.'/img/main_icon16.png')) { |
101 | if (file_exists(__DIR__.'/img/main_icon16.png')) { |
102 | $tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png'; |
102 | $tree_icon = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'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(); |