summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-04-06 14:15:43 +0000
committerDries Buytaert <dries@buytaert.net>2007-04-06 14:15:43 +0000
commita871b96a489dc679110455b51a78696c9b59cf42 (patch)
treeca7fb9ab7a60d48aeffdc4b98b0b9df120c73087
parent5bbbf10ba84042b8576d67576d98922c0063c6d6 (diff)
downloadbrdo-a871b96a489dc679110455b51a78696c9b59cf42.tar.gz
brdo-a871b96a489dc679110455b51a78696c9b59cf42.tar.bz2
- Patch #72564 by Gabor: locale bugfix: undefined variable.
-rw-r--r--includes/locale.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/locale.inc b/includes/locale.inc
index 4c5e49d74..9929668d2 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -742,7 +742,7 @@ function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL) {
$current["#"][] = substr($line, 1);
}
elseif (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) { // End current entry, start a new one
- _locale_import_one_string($op, $current, $mode, $lang);
+ _locale_import_one_string($op, $current, $mode, $lang, $file);
$current = array();
$current["#"][] = substr($line, 1);
$context = "COMMENT";
@@ -768,7 +768,7 @@ function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL) {
}
elseif (!strncmp("msgid", $line, 5)) {
if ($context == "MSGSTR") { // End current entry, start a new one
- _locale_import_one_string($op, $current, $mode, $lang);
+ _locale_import_one_string($op, $current, $mode, $lang, $file);
$current = array();
}
elseif ($context == "MSGID") { // Already in this context? Parse error
@@ -842,7 +842,7 @@ function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL) {
// End of PO file, flush last entry
if (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) {
- _locale_import_one_string($op, $current, $mode, $lang);
+ _locale_import_one_string($op, $current, $mode, $lang, $file);
}
elseif ($context != "COMMENT") {
_locale_import_message('The translation file %filename ended unexpectedly at line %line.', $file, $lineno);
@@ -881,8 +881,10 @@ function _locale_import_message($message, $file, $lineno = NULL) {
* Should existing translations be replaced ('overwrite' or 'keep')
* @param $lang
* Language to store the string in
+ * @param $file
+ * Object representation of file being imported, only required when op is 'db-store'
*/
-function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NULL) {
+function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NULL, $file = NULL) {
static $additions = 0;
static $updates = 0;
static $headerdone = FALSE;