Rev 1293 | Rev 1305 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1293 | Rev 1297 | ||
---|---|---|---|
Line 89... | Line 89... | ||
89 | $plugin = OIDplus::getPluginByOid(explode(':',$subpage)[1]); |
89 | $plugin = OIDplus::getPluginByOid(explode(':',$subpage)[1]); |
90 | if (!$plugin || !($plugin instanceof INTF_OID_1_3_6_1_4_1_37476_2_5_2_3_9)) throw new OIDplusException(_L("No endpoints for this plugin found"), null, 404); |
90 | if (!$plugin || !($plugin instanceof INTF_OID_1_3_6_1_4_1_37476_2_5_2_3_9)) throw new OIDplusException(_L("No endpoints for this plugin found"), null, 404); |
91 | $out['title'] = _L('REST API').' - '.$plugin->getManifest()->getName() . ' ' . _L('Endpoints'); |
91 | $out['title'] = _L('REST API').' - '.$plugin->getManifest()->getName() . ' ' . _L('Endpoints'); |
92 | $out['icon'] = file_exists(__DIR__.'/img/endpoints_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/endpoints_icon.png' : ''; |
92 | $out['icon'] = file_exists(__DIR__.'/img/endpoints_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/endpoints_icon.png' : ''; |
93 | $out['text'] = ''; |
93 | $out['text'] = ''; |
94 | if (!OIDplus::authUtils()->isRaLoggedIn($ra_email) && !OIDplus::authUtils()->isAdminLoggedIn()) { |
94 | if (OIDplus::authUtils()->isRaLoggedIn($ra_email) || OIDplus::authUtils()->isAdminLoggedIn()) { |
95 | $out['text'] .= '<p><a '.OIDplus::gui()->link('oidplus:rest_api_information_ra').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
95 | $out['text'] .= '<p><a '.OIDplus::gui()->link('oidplus:rest_api_information_ra$'.$ra_email).'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
96 | } |
96 | } |
97 | $out['text'] .= $plugin->restApiInfo('html'); |
97 | $out['text'] .= $plugin->restApiInfo('html'); |
98 | } else { |
98 | } else { |
99 | $out['title'] = _L('REST API'); |
99 | $out['title'] = _L('REST API'); |
100 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png' : ''; |
100 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png' : ''; |