Created
October 9, 2017 12:50
-
-
Save cmb69/7f89430c58bdfe353dccdc3c3d83d2ee to your computer and use it in GitHub Desktop.
Always use default lang in back-end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmsimple/cms.php | 5 +++++ | |
1 file changed, 5 insertions(+) | |
diff --git a/cmsimple/cms.php b/cmsimple/cms.php | |
index fbfe9437..f71e341c 100644 | |
--- a/cmsimple/cms.php | |
+++ b/cmsimple/cms.php | |
@@ -338,6 +338,7 @@ if (preg_match('/\/([A-z]{2})\/index.php$/', sv('SCRIPT_NAME'), $temp) | |
$pth['folder']['content'] = $pth['folder']['base'] . $cf['folders']['content']; | |
} | |
+adminlang: | |
$pth['file']['content'] = $pth['folder']['content'] . 'content.htm'; | |
$pth['file']['pagedata'] = $pth['folder']['content'] . 'pagedata.php'; | |
$pth['file']['language'] = $pth['folder']['language'] . basename($sl) . '.php'; | |
@@ -897,6 +898,10 @@ $_XH_controller->handleLoginAndLogout(); | |
define('XH_ADM', $adm); | |
if (XH_ADM) { | |
+ if ($sl !== $cf['language']['default']) { | |
+ $sl = $cf['language']['default']; | |
+ goto adminlang; | |
+ } | |
include_once $pth['folder']['cmsimple'] . 'adminfuncs.php'; | |
if (isset($_GET['xh_keep_alive'])) { | |
$_XH_controller->handleKeepAlive(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment