Subversion Repositories oidplus

Rev

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

Rev 1267 Rev 1293
Line 63... Line 63...
63
                        }
63
                        }
64
                }
64
                }
65
        }
65
        }
66
 
66
 
67
        /**
67
        /**
68
         * @param string $actionID
-
 
69
         * @param array $params
68
         * @param array $params
70
         * @return array
69
         * @return array
71
         * @throws OIDplusException
70
         * @throws OIDplusException
72
         */
71
         */
73
        public function action(string $actionID, array $params): array {
72
        private function action_Update(array $params): array {
74
                if ($actionID == 'color_update') {
-
 
75
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
73
                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')), null, 401);
74
                        throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')), null, 401);
77
                        }
75
                }
78
 
76
 
79
                        _CheckParamExists($params, 'hue_shift');
77
                _CheckParamExists($params, 'hue_shift');
Line 89... Line 87...
89
                        OIDplus::config()->setValue('design',          $params['theme']);
87
                OIDplus::config()->setValue('design',          $params['theme']);
90
 
88
 
91
                        OIDplus::logger()->log("V2:[OK/INFO]A", "Changed system color theme");
89
                OIDplus::logger()->log("V2:[OK/INFO]A", "Changed system color theme");
92
 
90
 
93
                        return array("status" => 0);
91
                return array("status" => 0);
-
 
92
        }
-
 
93
 
-
 
94
        /**
-
 
95
         * @param string $actionID
-
 
96
         * @param array $params
-
 
97
         * @return array
-
 
98
         * @throws OIDplusException
-
 
99
         */
-
 
100
        public function action(string $actionID, array $params): array {
-
 
101
                if ($actionID == 'color_update') {
-
 
102
                        return $this->action_Update($params);
94
                } else {
103
                } else {
95
                        return parent::action($actionID, $params);
104
                        return parent::action($actionID, $params);
96
                }
105
                }
97
        }
106
        }
98
 
107