Subversion Repositories oidplus

Rev

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

Rev 360 Rev 362
Line 22... Line 22...
22
        public function gui($id, &$out, &$handled) {
22
        public function gui($id, &$out, &$handled) {
23
                // Nothing
23
                // Nothing
24
        }
24
        }
25
 
25
 
26
        public function init($html=true) {
26
        public function init($html=true) {
27
                OIDplus::config()->prepareConfigKey('reg_wizard_done', '"Out Of Box Experience" wizard done once?', '0', OIDplusConfig::PROTECTION_HIDDEN, function($value) {});
27
                OIDplus::config()->prepareConfigKey('oobe_main_done', '"Out Of Box Experience" wizard for the system settings done once?', '0', OIDplusConfig::PROTECTION_HIDDEN, function($value) {});
28
 
28
 
29
                $oobe_done = OIDplus::config()->getValue('reg_wizard_done') == '1';
29
                $oobe_done = OIDplus::config()->getValue('oobe_main_done') == '1';
-
 
30
 
-
 
31
                foreach (OIDplus::getPagePlugins() as $plugin) {
-
 
32
                        if ($plugin->implementsFeature('1.3.6.1.4.1.37476.2.5.2.3.1')) {
-
 
33
                                if ($plugin->oobeRequested()) {
-
 
34
                                        echo "Plugin ".get_class($plugin)." requested OOBE\n";
-
 
35
                                        $oobe_done = false;
-
 
36
                                }
-
 
37
                        }
-
 
38
                }
30
 
39
 
31
                if (!$oobe_done) {
40
                if (!$oobe_done) {
32
                        // Show registration/configuration wizard once
41
                        // Show registration/configuration wizard once
33
                        if ($html) {
42
                        if ($html) {
34
                                if (basename($_SERVER['SCRIPT_NAME']) != 'oobe.php') {
43
                                if (basename($_SERVER['SCRIPT_NAME']) != 'oobe.php') {
35
                                        header('Location:'.OIDplus::webpath(__DIR__).'oobe.php');
44
                                        header('Location:'.OIDplus::webpath(__DIR__).'oobe.php');
36
                                        die(_L('Redirecting to registration wizard...'));
45
                                        die(_L('Redirecting to Out-Of-Box-Experience wizard...'));
37
                                }
46
                                }
38
                        } else {
47
                        } else {
39
                                // We cannot guarantee that everything works correctly if OOBE never ran once. So abort AJAX and co.
48
                                // We cannot guarantee that everything works correctly if OOBE never ran once. So abort AJAX and co.
40
                                die();
49
                                die();
41
                        }
50
                        }