Rev 1125 | Rev 1131 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1125 | Rev 1130 | ||
---|---|---|---|
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 OIDplusPageAdminRegistration extends OIDplusPagePluginAdmin { |
26 | class OIDplusPageAdminRegistration extends OIDplusPagePluginAdmin { |
27 | 27 | ||
- | 28 | /** |
|
- | 29 | * |
|
- | 30 | */ |
|
28 | /*private*/ const QUERY_REGISTER_V1 = '1.3.6.1.4.1.37476.2.5.2.1.1.1'; |
31 | /*private*/ const QUERY_REGISTER_V1 = '1.3.6.1.4.1.37476.2.5.2.1.1.1'; |
- | 32 | ||
- | 33 | /** |
|
- | 34 | * |
|
- | 35 | */ |
|
29 | /*private*/ const QUERY_UNREGISTER_V1 = '1.3.6.1.4.1.37476.2.5.2.1.2.1'; |
36 | /*private*/ const QUERY_UNREGISTER_V1 = '1.3.6.1.4.1.37476.2.5.2.1.2.1'; |
- | 37 | ||
- | 38 | /** |
|
- | 39 | * |
|
- | 40 | */ |
|
30 | /*private*/ const QUERY_LISTALLSYSTEMIDS_V1 = '1.3.6.1.4.1.37476.2.5.2.1.3.1'; |
41 | /*private*/ const QUERY_LISTALLSYSTEMIDS_V1 = '1.3.6.1.4.1.37476.2.5.2.1.3.1'; |
- | 42 | ||
- | 43 | /** |
|
- | 44 | * |
|
- | 45 | */ |
|
31 | /*private*/ const QUERY_LIVESTATUS_V1 = '1.3.6.1.4.1.37476.2.5.2.1.4.1'; |
46 | /*private*/ const QUERY_LIVESTATUS_V1 = '1.3.6.1.4.1.37476.2.5.2.1.4.1'; |
32 | 47 | ||
33 | /** |
48 | /** |
34 | * @param string $actionID |
49 | * @param string $actionID |
35 | * @return bool |
50 | * @return bool |
Line 252... | Line 267... | ||
252 | 267 | ||
253 | return in_array(OIDplus::getSystemId(false), $list); |
268 | return in_array(OIDplus::getSystemId(false), $list); |
254 | } |
269 | } |
255 | 270 | ||
256 | /** |
271 | /** |
257 | * @param $privacy_level |
272 | * @param int|null $privacy_level |
258 | * @return false|void |
273 | * @return false|void |
259 | * @throws OIDplusException |
274 | * @throws OIDplusException|\OIDInfoException |
260 | */ |
275 | */ |
261 | public function sendRegistrationQuery($privacy_level=null) { |
276 | public function sendRegistrationQuery(int $privacy_level=null) { |
262 | 277 | ||
263 | if (is_null($privacy_level)) { |
278 | if (is_null($privacy_level)) { |
264 | $privacy_level = OIDplus::config()->getValue('reg_privacy'); |
279 | $privacy_level = OIDplus::config()->getValue('reg_privacy'); |
265 | } |
280 | } |
266 | 281 | ||
Line 658... | Line 673... | ||
658 | echo '</select>'; |
673 | echo '</select>'; |
659 | 674 | ||
660 | $msg = ''; |
675 | $msg = ''; |
661 | if ($do_edits) { |
676 | if ($do_edits) { |
662 | try { |
677 | try { |
663 | OIDplus::config()->setValue('reg_privacy', isset($_POST['reg_privacy']) ? $_POST['reg_privacy'] : 1); |
678 | OIDplus::config()->setValue('reg_privacy', $_POST['reg_privacy'] ?? 1); |
664 | OIDplus::config()->setValue('oobe_registration_done', '1'); |
679 | OIDplus::config()->setValue('oobe_registration_done', '1'); |
665 | } catch (\Exception $e) { |
680 | } catch (\Exception $e) { |
666 | $msg = $e->getMessage(); |
681 | $msg = $e->getMessage(); |
667 | $errors_happened = true; |
682 | $errors_happened = true; |
668 | } |
683 | } |