Subversion Repositories oidplus

Rev

Rev 1116 | Rev 1130 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1116 Rev 1125
Line 562... Line 562...
562
                return OIDplus::config()->getValue('oobe_registration_done') == '0';
562
                return OIDplus::config()->getValue('oobe_registration_done') == '0';
563
        }
563
        }
564
 
564
 
565
        /**
565
        /**
566
         * Implements interface 1.3.6.1.4.1.37476.2.5.2.3.1
566
         * Implements interface 1.3.6.1.4.1.37476.2.5.2.3.1
567
         * @param $step
567
         * @param int $step
568
         * @param $do_edits
568
         * @param bool $do_edits
569
         * @param $errors_happened
569
         * @param bool $errors_happened
570
         * @return void
570
         * @return void
571
         * @throws OIDplusConfigInitializationException
571
         * @throws OIDplusConfigInitializationException
572
         * @throws OIDplusException
572
         * @throws OIDplusException
573
         */
573
         */
574
        public function oobeEntry($step, $do_edits, &$errors_happened)/*: void*/ {
574
        public function oobeEntry(int $step, bool $do_edits, bool &$errors_happened)/*: void*/ {
575
                echo '<h2>'._L('Step %1: System registration and automatic publishing (optional)',$step).'</h2>';
575
                echo '<h2>'._L('Step %1: System registration and automatic publishing (optional)',$step).'</h2>';
576
 
576
 
577
                if (file_exists(__DIR__ . '/info$'.OIDplus::getCurrentLang().'.html')) {
577
                if (file_exists(__DIR__ . '/info$'.OIDplus::getCurrentLang().'.html')) {
578
                        $info = file_get_contents(__DIR__ . '/info$'.OIDplus::getCurrentLang().'.html');
578
                        $info = file_get_contents(__DIR__ . '/info$'.OIDplus::getCurrentLang().'.html');
579
                } else {
579
                } else {
Line 674... Line 674...
674
                echo '</p>';
674
                echo '</p>';
675
        }
675
        }
676
 
676
 
677
        /**
677
        /**
678
         * Implements interface 1.3.6.1.4.1.37476.2.5.2.3.8
678
         * Implements interface 1.3.6.1.4.1.37476.2.5.2.3.8
679
         * @param $user
679
         * @param string|null $user
680
         * @return array
680
         * @return array
681
         * @throws OIDplusException
681
         * @throws OIDplusException
682
         */
682
         */
683
        public function getNotifications($user=null): array {
683
        public function getNotifications(string $user=null): array {
684
                $notifications = array();
684
                $notifications = array();
685
                if ((!$user || ($user == 'admin')) && OIDplus::authUtils()->isAdminLoggedIn()) {
685
                if ((!$user || ($user == 'admin')) && OIDplus::authUtils()->isAdminLoggedIn()) {
686
                        if (!function_exists('curl_init')) {
686
                        if (!function_exists('curl_init')) {
687
                                $title = _L('System registration');
687
                                $title = _L('System registration');
688
                                $notifications[] = array('ERR', _L('OIDplus plugin "%1" is enabled, but the required PHP extension "%2" is not installed.', '<a '.OIDplus::gui()->link('oidplus:srv_registration').'>'.htmlentities($title).'</a>', 'php_curl'));
688
                                $notifications[] = array('ERR', _L('OIDplus plugin "%1" is enabled, but the required PHP extension "%2" is not installed.', '<a '.OIDplus::gui()->link('oidplus:srv_registration').'>'.htmlentities($title).'</a>', 'php_curl'));