Rev 1212 | Rev 1267 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1212 | Rev 1266 | ||
---|---|---|---|
Line 71... | Line 71... | ||
71 | * @throws OIDplusException |
71 | * @throws OIDplusException |
72 | */ |
72 | */ |
73 | public function action(string $actionID, array $params): array { |
73 | public function action(string $actionID, array $params): array { |
74 | if ($actionID == 'color_update') { |
74 | if ($actionID == 'color_update') { |
75 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
75 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
76 | throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin'))); |
76 | throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')), null, 401); |
77 | } |
77 | } |
78 | 78 | ||
79 | _CheckParamExists($params, 'hue_shift'); |
79 | _CheckParamExists($params, 'hue_shift'); |
80 | _CheckParamExists($params, 'sat_shift'); |
80 | _CheckParamExists($params, 'sat_shift'); |
81 | _CheckParamExists($params, 'val_shift'); |
81 | _CheckParamExists($params, 'val_shift'); |
Line 150... | Line 150... | ||
150 | $handled = true; |
150 | $handled = true; |
151 | $out['title'] = _L('Design'); |
151 | $out['title'] = _L('Design'); |
152 | $out['icon'] = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png'; |
152 | $out['icon'] = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png'; |
153 | 153 | ||
154 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
154 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
155 | throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')), $out['title']); |
155 | throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')), $out['title'], 401); |
156 | } |
156 | } |
157 | 157 | ||
158 | $out['text'] = '<br><p>'; |
158 | $out['text'] = '<br><p>'; |
159 | $out['text'] .= ' <label for="theme">'._L('Design').':</label>'; |
159 | $out['text'] .= ' <label for="theme">'._L('Design').':</label>'; |
160 | $out['text'] .= ' <select name="theme" id="theme">'; |
160 | $out['text'] .= ' <select name="theme" id="theme">'; |