From 8f096c6b62b11f04a847363f5fe173c021fae9be Mon Sep 17 00:00:00 2001 From: webchick Date: Tue, 13 Mar 2012 12:44:26 -0700 Subject: =?UTF-8?q?Issue=20#655048=20by=20G=C3=A1bor=20Hojtsy,=20gumanist,?= =?UTF-8?q?=20intuited:=20Fixed=20Plural=20formula=20information=20blanked?= =?UTF-8?q?=20when=20importing=20a=20poorly-formed=20.po=20file.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/locale.inc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'includes') diff --git a/includes/locale.inc b/includes/locale.inc index 0db4d4a07..72e466802 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -978,7 +978,7 @@ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NUL // data untouched or if we don't have an existing plural formula. $header = _locale_import_parse_header($value['msgstr']); - // Get the plural formula and update in database. + // Get and store the plural formula if available. if (isset($header["Plural-Forms"]) && $p = _locale_import_parse_plural_forms($header["Plural-Forms"], $file->uri)) { list($nplurals, $plural) = $p; db_update('languages') @@ -989,15 +989,6 @@ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NUL ->condition('language', $lang) ->execute(); } - else { - db_update('languages') - ->fields(array( - 'plurals' => 0, - 'formula' => '', - )) - ->condition('language', $lang) - ->execute(); - } } $header_done = TRUE; } -- cgit v1.2.3