diff --git a/src/classes/logstreampdo.class.php b/src/classes/logstreampdo.class.php index 5ad98f5..f54610f 100644 --- a/src/classes/logstreampdo.class.php +++ b/src/classes/logstreampdo.class.php @@ -712,7 +712,10 @@ class LogStreamPDO extends LogStream { return ERROR_DB_QUERYFAILED; if ( $this->_myDBQuery->rowCount() == 0 ) + { + $this->_myDBQuery = null; return ERROR_NOMORERECORDS; + } // Initialize Array variable $aResult = array(); @@ -728,6 +731,9 @@ class LogStreamPDO extends LogStream { } } + // Delete handle + $this->_myDBQuery = null; + // return finished array if ( count($aResult) > 0 ) return $aResult; diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 21a3813..95de275 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -1031,12 +1031,23 @@ function IncludeLanguageFile( $langfile ) { global $LANG, $LANG_EN; - if ( file_exists( $langfile ) ) - include( $langfile ); + // If english is not selected, we load ENGLISH first - then overwrite with configured language + if ( $LANG != "en" ) + $langengfile = str_replace( $LANG, $LANG_EN, $langfile ); else + $langengfile = $langfile; + if ( file_exists($langengfile) ) + include( $langengfile ); + else + DieWithErrorMsg( "FATAL Error initialzing sublanguage system. Please make sure that all files have been uploaded correctly." ); + + // If nto english, load the additional translations + if ( $LANG != "en" ) { - $langfile = str_replace( $LANG, $LANG_EN, $langfile ); - include( $langfile ); + if ( file_exists( $langfile ) ) + include( $langfile ); + else + OutputDebugMessage("FATAL Error reading the configured language $LANG. Please make sure that all files have been uploaded correctly.", DEBUG_ERROR); } }