Subversion Repositories oidplus

Rev

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

Rev 1354 Rev 1367
Line 2266... Line 2266...
2266
         * @throws OIDplusConfigInitializationException
2266
         * @throws OIDplusConfigInitializationException
2267
         * @throws OIDplusException
2267
         * @throws OIDplusException
2268
         */
2268
         */
2269
        public static function getCurrentLang() {
2269
        public static function getCurrentLang() {
2270
 
2270
 
-
 
2271
                if (isset($_SERVER['REQUEST_URI'])) {
2271
                $rel_url = substr($_SERVER['REQUEST_URI'], strlen(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT)));
2272
                        $rel_url = substr($_SERVER['REQUEST_URI'], strlen(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT)));
2272
                if (str_starts_with($rel_url, 'rest/')) { // <== TODO: Find a way how to move this into the plugin, since REST does not belong to the core. (Maybe some kind of "stateless mode" that is enabled by the REST plugin)
2273
                        if (str_starts_with($rel_url, 'rest/')) { // <== TODO: Find a way how to move this into the plugin, since REST does not belong to the core. (Maybe some kind of "stateless mode" that is enabled by the REST plugin)
2273
                        return self::getDefaultLang();
2274
                                return self::getDefaultLang();
2274
                }
2275
                        }
-
 
2276
                }
2275
 
2277
 
2276
                if (isset($_GET['lang'])) {
2278
                if (isset($_GET['lang'])) {
2277
                        $lang = $_GET['lang'];
2279
                        $lang = $_GET['lang'];
2278
                } else if (isset($_POST['lang'])) {
2280
                } else if (isset($_POST['lang'])) {
2279
                        $lang = $_POST['lang'];
2281
                        $lang = $_POST['lang'];