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 47... | Line 47... | ||
47 | 47 | ||
48 | public function gui($id, &$out, &$handled) { |
48 | public function gui($id, &$out, &$handled) { |
49 | if ($id === 'oidplus:automated_ajax_information_admin') { |
49 | if ($id === 'oidplus:automated_ajax_information_admin') { |
50 | $handled = true; |
50 | $handled = true; |
51 | $out['title'] = _L('Automated AJAX calls'); |
51 | $out['title'] = _L('Automated AJAX calls'); |
52 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
52 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
53 | 53 | ||
54 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
54 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
55 | $out['icon'] = 'img/error_big.png'; |
55 | $out['icon'] = 'img/error.png'; |
56 | $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>'; |
56 | $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>'; |
57 | return; |
57 | return; |
58 | } |
58 | } |
59 | 59 | ||
60 | if (!OIDplus::baseConfig()->getValue('JWT_ALLOW_AJAX_ADMIN', true)) { |
60 | if (!OIDplus::baseConfig()->getValue('JWT_ALLOW_AJAX_ADMIN', true)) { |
Line 117... | Line 117... | ||
117 | } |
117 | } |
118 | 118 | ||
119 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
119 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
120 | if (!OIDplus::authUtils()->isAdminLoggedIn()) return false; |
120 | if (!OIDplus::authUtils()->isAdminLoggedIn()) return false; |
121 | 121 | ||
122 | if (file_exists(__DIR__.'/treeicon.png')) { |
122 | if (file_exists(__DIR__.'/img/main_icon16.png')) { |
123 | $tree_icon = OIDplus::webpath(__DIR__).'treeicon.png'; |
123 | $tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png'; |
124 | } else { |
124 | } else { |
125 | $tree_icon = null; // default icon (folder) |
125 | $tree_icon = null; // default icon (folder) |
126 | } |
126 | } |
127 | 127 | ||
128 | $json[] = array( |
128 | $json[] = array( |