55,10 → 55,10 |
if ($id === 'oidplus:srv_registration') { |
$handled = true; |
$out['title'] = _L('System registration settings'); |
$out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
$out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
|
if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
$out['icon'] = 'img/error_big.png'; |
$out['icon'] = 'img/error.png'; |
$out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>'; |
return; |
} |
130,10 → 130,10 |
if ($id === 'oidplus:srvreg_status') { |
$handled = true; |
$out['title'] = _L('Registration live status'); |
$out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
$out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
|
if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
$out['icon'] = 'img/error_big.png'; |
$out['icon'] = 'img/error.png'; |
$out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>'; |
return; |
} |
184,13 → 184,13 |
$json = @json_decode($res, true); |
|
if (!$json) { |
$out['icon'] = 'img/error_big.png'; |
$out['icon'] = 'img/error.png'; |
$out['text'] = _L('JSON reply from ViaThinkSoft decoding error: %1',$res); |
return; |
} |
|
if (isset($json['error']) || ($json['status'] < 0)) { |
$out['icon'] = 'img/error_big.png'; |
$out['icon'] = 'img/error.png'; |
if (isset($json['error'])) { |
$out['text'] = _L('Received error status code: %1',$json['error']); |
} else { |
478,8 → 478,8 |
public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
if (!OIDplus::authUtils()->isAdminLoggedIn()) return false; |
|
if (file_exists(__DIR__.'/treeicon.png')) { |
$tree_icon = OIDplus::webpath(__DIR__).'treeicon.png'; |
if (file_exists(__DIR__.'/img/main_icon16.png')) { |
$tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png'; |
} else { |
$tree_icon = null; // default icon (folder) |
} |