Rev 1086 | Rev 1130 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1086 | Rev 1116 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | \defined('INSIDE_OIDPLUS') or die; |
23 | \defined('INSIDE_OIDPLUS') or die; |
24 | // phpcs:enable PSR1.Files.SideEffects |
24 | // phpcs:enable PSR1.Files.SideEffects |
25 | 25 | ||
26 | class OIDplusPageAdminSysteminfo extends OIDplusPagePluginAdmin { |
26 | class OIDplusPageAdminSysteminfo extends OIDplusPagePluginAdmin { |
27 | 27 | ||
- | 28 | /** |
|
- | 29 | * @param string $actionID |
|
- | 30 | * @param array $params |
|
- | 31 | * @return array |
|
- | 32 | * @throws OIDplusException |
|
- | 33 | */ |
|
28 | public function action($actionID, $params) { |
34 | public function action(string $actionID, array $params): array { |
- | 35 | return parent::action($actionID, $params); |
|
29 | } |
36 | } |
30 | 37 | ||
- | 38 | /** |
|
- | 39 | * @param bool $html |
|
- | 40 | * @return void |
|
- | 41 | */ |
|
31 | public function init($html=true) { |
42 | public function init(bool $html=true) { |
32 | } |
43 | } |
33 | 44 | ||
- | 45 | /** |
|
- | 46 | * @return array|mixed|string|string[] |
|
- | 47 | */ |
|
34 | private function getLoadedInis() { |
48 | private function getLoadedInis() { |
35 | $s_inis = ''; |
49 | $s_inis = ''; |
36 | 50 | ||
37 | $inis = array(); |
51 | $inis = array(); |
38 | $main_ini = php_ini_loaded_file(); |
52 | $main_ini = php_ini_loaded_file(); |
Line 49... | Line 63... | ||
49 | if ($s_inis == '') $s_inis = _L('n/a'); |
63 | if ($s_inis == '') $s_inis = _L('n/a'); |
50 | 64 | ||
51 | return $s_inis; |
65 | return $s_inis; |
52 | } |
66 | } |
53 | 67 | ||
- | 68 | /** |
|
- | 69 | * @param string $id |
|
- | 70 | * @param array $out |
|
- | 71 | * @param bool $handled |
|
- | 72 | * @return void |
|
- | 73 | * @throws OIDplusConfigInitializationException |
|
- | 74 | * @throws OIDplusException |
|
- | 75 | */ |
|
54 | public function gui($id, &$out, &$handled) { |
76 | public function gui(string $id, array &$out, bool &$handled) { |
55 | if ($id === 'oidplus:phpinfo') { |
77 | if ($id === 'oidplus:phpinfo') { |
56 | $handled = true; |
78 | $handled = true; |
57 | $out['title'] = _L('PHP information'); |
79 | $out['title'] = _L('PHP information'); |
58 | $out['icon'] = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/php_icon.png'; |
80 | $out['icon'] = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/php_icon.png'; |
59 | 81 | ||
Line 143... | Line 165... | ||
143 | $out['text'] .= ' <td>'._L('System GUID').' <abbr title="'._L('SHA1-Namebased UUID based on the public key of your OIDplus system.').'">(?)</abbr></td>'; |
165 | $out['text'] .= ' <td>'._L('System GUID').' <abbr title="'._L('SHA1-Namebased UUID based on the public key of your OIDplus system.').'">(?)</abbr></td>'; |
144 | $out['text'] .= ' <td>'.(!$sysid_guid ? '<i>'._L('unknown').'</i>' : htmlentities($sysid_guid)).'</td>'; |
166 | $out['text'] .= ' <td>'.(!$sysid_guid ? '<i>'._L('unknown').'</i>' : htmlentities($sysid_guid)).'</td>'; |
145 | $out['text'] .= ' </tr>'; |
167 | $out['text'] .= ' </tr>'; |
146 | 168 | ||
147 | $sysid = OIDplus::getSystemId(false); |
169 | $sysid = OIDplus::getSystemId(false); |
148 | $sysid_aid = $sysid ? 'D276000186B20005'.strtoupper(str_pad(dechex($sysid),8,'0',STR_PAD_LEFT)) : ''; |
170 | $sysid_aid = $sysid ? 'D276000186B20005'.strtoupper(str_pad(dechex((int)$sysid),8,'0',STR_PAD_LEFT)) : ''; |
149 | $out['text'] .= ' <tr>'; |
171 | $out['text'] .= ' <tr>'; |
150 | $out['text'] .= ' <td>'._L('System AID').' <abbr title="'._L('Application Identifier (ISO/IEC 7816) based on the system ID (which is based on the hash of the public key of your OIDplus system).').'">(?)</abbr></td>'; |
172 | $out['text'] .= ' <td>'._L('System AID').' <abbr title="'._L('Application Identifier (ISO/IEC 7816) based on the system ID (which is based on the hash of the public key of your OIDplus system).').'">(?)</abbr></td>'; |
151 | $out['text'] .= ' <td>'.(!$sysid_aid ? '<i>'._L('unknown').'</i>' : htmlentities($sysid_aid)).' ('._L('No PIX allowed').')</td>'; |
173 | $out['text'] .= ' <td>'.(!$sysid_aid ? '<i>'._L('unknown').'</i>' : htmlentities($sysid_aid)).' ('._L('No PIX allowed').')</td>'; |
152 | $out['text'] .= ' </tr>'; |
174 | $out['text'] .= ' </tr>'; |
153 | 175 | ||
Line 325... | Line 347... | ||
325 | # --- |
347 | # --- |
326 | 348 | ||
327 | } |
349 | } |
328 | } |
350 | } |
329 | 351 | ||
- | 352 | /** |
|
- | 353 | * @param array $json |
|
- | 354 | * @param string|null $ra_email |
|
- | 355 | * @param bool $nonjs |
|
- | 356 | * @param string $req_goto |
|
- | 357 | * @return bool |
|
- | 358 | * @throws OIDplusException |
|
- | 359 | */ |
|
330 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
360 | public function tree(array &$json, string $ra_email=null, bool $nonjs=false, string $req_goto=''): bool { |
331 | if (!OIDplus::authUtils()->isAdminLoggedIn()) return false; |
361 | if (!OIDplus::authUtils()->isAdminLoggedIn()) return false; |
332 | 362 | ||
333 | if (file_exists(__DIR__.'/img/main_icon16.png')) { |
363 | if (file_exists(__DIR__.'/img/main_icon16.png')) { |
334 | $tree_icon = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png'; |
364 | $tree_icon = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png'; |
335 | } else { |
365 | } else { |
Line 354... | Line 384... | ||
354 | ); |
384 | ); |
355 | 385 | ||
356 | return true; |
386 | return true; |
357 | } |
387 | } |
358 | 388 | ||
- | 389 | /** |
|
- | 390 | * @param string $request |
|
- | 391 | * @return array|false |
|
- | 392 | */ |
|
359 | public function tree_search($request) { |
393 | public function tree_search(string $request) { |
360 | return false; |
394 | return false; |
361 | } |
395 | } |
362 | 396 | ||
- | 397 | /** |
|
- | 398 | * @param string $id |
|
- | 399 | * @return bool |
|
- | 400 | */ |
|
363 | public function implementsFeature($id) { |
401 | public function implementsFeature(string $id): bool { |
364 | return false; |
402 | return false; |
365 | } |
403 | } |
366 | } |
404 | } |