Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 1366 → Rev 1367

/trunk/includes/classes/OIDplus.class.php
2268,10 → 2268,12
*/
public static function getCurrentLang() {
 
if (isset($_SERVER['REQUEST_URI'])) {
$rel_url = substr($_SERVER['REQUEST_URI'], strlen(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT)));
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)
return self::getDefaultLang();
}
}
 
if (isset($_GET['lang'])) {
$lang = $_GET['lang'];
/trunk/includes/classes/OIDplusAuthContentStoreJWT.class.php
511,9 → 511,15
 
try {
 
if (isset($_SERVER['REQUEST_URI'])) {
$rel_url = substr($_SERVER['REQUEST_URI'], strlen(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT)));
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.
$only_use_bearer = 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.
} else {
$only_use_bearer = false;
}
 
if ($only_use_bearer) {
 
// REST may only use Bearer Authentication
$bearer = getBearerToken();
if (!is_null($bearer)) {