Subversion Repositories oidplus

Rev

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

Rev 1206 Rev 1266
Line 57... Line 57...
57
        public function action(string $actionID, array $params): array {
57
        public function action(string $actionID, array $params): array {
58
                if ($actionID == 'update_now') {
58
                if ($actionID == 'update_now') {
59
                        @set_time_limit(0);
59
                        @set_time_limit(0);
60
 
60
 
61
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
61
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
62
                                throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')));
62
                                throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')), null, 401);
63
                        }
63
                        }
64
 
64
 
65
                        if (OIDplus::getInstallType() === 'git-wc') {
65
                        if (OIDplus::getInstallType() === 'git-wc') {
66
                                $cmd = $this->getGitCommand().' 2>&1';
66
                                $cmd = $this->getGitCommand().' 2>&1';
67
 
67
 
Line 194... Line 194...
194
                        $handled = true;
194
                        $handled = true;
195
                        $out['title'] = _L('Software update');
195
                        $out['title'] = _L('Software update');
196
                        $out['icon']  = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png';
196
                        $out['icon']  = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png';
197
 
197
 
198
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
198
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
199
                                throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')), $out['title']);
199
                                throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')), $out['title'], 401);
200
                        }
200
                        }
201
 
201
 
202
                        $out['text'] .= '<div id="update_versioninfo">';
202
                        $out['text'] .= '<div id="update_versioninfo">';
203
 
203
 
204
                        $out['text'] .= '<p><u>'._L('There are three possibilities how to keep OIDplus up-to-date').':</u></p>';
204
                        $out['text'] .= '<p><u>'._L('There are three possibilities how to keep OIDplus up-to-date').':</u></p>';