Subversion Repositories oidplus

Rev

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

Rev 1195 Rev 1201
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 OIDplusException(_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')));
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 421... Line 421...
421
 
421
 
422
                ob_start();
422
                ob_start();
423
                try {
423
                try {
424
                        $cont = $this->showChangelog($local_installation);
424
                        $cont = $this->showChangelog($local_installation);
425
                } catch (\Exception $e) {
425
                } catch (\Exception $e) {
-
 
426
                        $htmlmsg = $e instanceof OIDplusException ? $e->getHtmlMessage() : htmlentities($e->getMessage());
426
                        $cont = _L('Error: %1',$e->getMessage());
427
                        $cont = _L('Error: %1',$htmlmsg);
427
                }
428
                }
428
                ob_end_clean();
429
                ob_end_clean();
429
 
430
 
430
                $cont = preg_replace('@!!!(.+)\\n@', '<font color="red">!!!\\1</font>'."\n", "$cont\n");
431
                $cont = preg_replace('@!!!(.+)\\n@', '<font color="red">!!!\\1</font>'."\n", "$cont\n");
431
 
432