regression bug from release 1.9.12

This commit is contained in:
oheil 2023-03-04 15:45:45 +01:00
parent 6e664ad3f8
commit f0263dc5e1
2 changed files with 5 additions and 6 deletions

View file

@ -10,7 +10,7 @@
*
* @package NOCC
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: nocc_languages.php 3016 2022-08-25 11:00:42Z oheil $
* @version SVN: $Id: nocc_languages.php 3057 2023-03-04 14:45:24Z oheil $
*/
/**
@ -56,7 +56,6 @@ class NOCC_Languages {
$path .= '/';
}
$this->_languages["default"]=convertLang2Html($html_default);
//TODO: Move some code to a NOCC_Directory class?
if ($handle = opendir($path)) { //if can open the directory...
while (false !== ($name = readdir($handle))) { //for each item...

View file

@ -11,7 +11,7 @@
*
* @package NOCC
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: common.php 3052 2023-02-28 10:40:12Z oheil $
* @version SVN: $Id: common.php 3057 2023-03-04 14:45:24Z oheil $
*/
define('NOCC_DEBUG_LEVEL', 0);
@ -57,7 +57,7 @@ require_once './utils/crypt.php';
require_once './utils/translation.php';
$conf->nocc_name = 'NOCC';
$conf->nocc_version = '1.9.12';
$conf->nocc_version = '1.9.13-dev';
$conf->nocc_url = 'http://nocc.sourceforge.net/';
$pwd_to_encrypt = false;
@ -137,7 +137,7 @@ if (isset($_REQUEST['lang'])) { //if a language is requested...
}
}
if( isset($_SESSION['nocc_lang']) && $_SESSION['nocc_lang']!="default" ) { //if session language already set...
if( isset($_SESSION['nocc_lang']) && $_SESSION['nocc_lang'] != "default" ) { //if session language already set...
$languages->setSelectedLangId($_SESSION['nocc_lang']);
}
else { //if session language NOT already set...
@ -152,7 +152,7 @@ else { //if session language NOT already set...
$languages->setSelectedLangId('en');
}
}
if( $_SESSION['nocc_lang']!="default" ) {
if( ! isset($_SESSION['nocc_lang']) || $_SESSION['nocc_lang'] != "default" ) {
$_SESSION['nocc_lang'] = $languages->getSelectedLangId();
}
}