diff options
| author | bitweaver.org <bitweaver@users.sourceforge.net> | 2005-06-19 04:55:13 +0000 |
|---|---|---|
| committer | bitweaver.org <bitweaver@users.sourceforge.net> | 2005-06-19 04:55:13 +0000 |
| commit | 396ab382b5cac2adc58e92429b7b44ba07f2cb84 (patch) | |
| tree | 4c56dc7f1ce4b2287dd8b180668f4deca342f993 /switch_lang.php | |
| download | languages-396ab382b5cac2adc58e92429b7b44ba07f2cb84.tar.gz languages-396ab382b5cac2adc58e92429b7b44ba07f2cb84.tar.bz2 languages-396ab382b5cac2adc58e92429b7b44ba07f2cb84.zip | |
IMPORT TikiPro CLYDE FINAL
Diffstat (limited to 'switch_lang.php')
| -rw-r--r-- | switch_lang.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/switch_lang.php b/switch_lang.php new file mode 100644 index 0000000..493e76d --- /dev/null +++ b/switch_lang.php @@ -0,0 +1,21 @@ +<?php +require_once( '../bit_setup_inc.php' ); +include_once( KERNEL_PKG_PATH.'BitBase.php' ); + +if (isset($_SERVER['HTTP_REFERER'])) + $orig_url = $_SERVER['HTTP_REFERER']; +else + $orig_url = $bitIndex; + +if( !empty( $_GET['language'] ) ) { + if($gBitSystem->isFeatureActive( 'feature_userPreferences' ) && $gBitUser->isRegistered() && $gBitSystem->isFeatureActive( 'change_language' ) ) { + $gBitUser->storePreference( 'tikilanguage', $_GET['language'] ); + } else { + $_SESSION["tikilanguage"] = $_GET['language']; + // $gBitLanguage->mLanguage will be read again in the location: redirect + } +} + +header("location: $orig_url"); +exit; +?> |
