Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug #12398: fixed return value of addLangToList() and updateLang() in…

… the MDB2 admin container

git-svn-id: http://svn.php.net/repository/pear/packages/Translation2/trunk@245960 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit 6217e44aaad66d25687f8d01e2829033a5cdcf0a 1 parent b04ae0c
Lorenzo Alberton quipo authored
Showing with 16 additions and 8 deletions.
  1. +14 −8 Admin/Container/mdb2.php
  2. +2 −0  package.xml
22 Admin/Container/mdb2.php
View
@@ -229,7 +229,7 @@ function addLangToList($langData)
foreach ($queries as $query) {
++$this->_queries;
- $res = $this->db->query($query);
+ $res = $this->db->exec($query);
if (PEAR::isError($res)) {
return $res;
}
@@ -251,9 +251,12 @@ function addLangToList($langData)
);
++$this->_queries;
- $success = $this->db->query($query);
+ $res = $this->db->exec($query);
$this->options['strings_tables'][$langData['lang_id']] = $langData['table_name'];
- return $success;
+ if (PEAR::isError($res)) {
+ return $res;
+ }
+ return true;
}
// }}}
@@ -279,7 +282,7 @@ function removeLang($langID, $force)
$this->db->quote($langID, 'text')
);
++$this->_queries;
- $res = $this->db->query($query);
+ $res = $this->db->exec($query);
if (PEAR::isError($res)) {
return $res;
}
@@ -335,9 +338,12 @@ function updateLang($langData)
);
++$this->_queries;
- $success = $this->db->query($query);
+ $res = $this->db->exec($query);
$this->fetchLangs(); //update memory cache
- return $success;
+ if (PEAR::isError($res)) {
+ return $res;
+ }
+ return true;
}
// }}}
@@ -382,7 +388,7 @@ function add($stringID, $pageID, $stringArray)
$query = $this->$func($table, $tableLangs, $stringID, $pageID, $stringArray);
++$this->_queries;
- $res = $this->db->query($query);
+ $res = $this->db->exec($query);
if (PEAR::isError($res)) {
return $res;
}
@@ -515,7 +521,7 @@ function remove($stringID, $pageID)
}
++$this->_queries;
- $res = $this->db->query($query);
+ $res = $this->db->exec($query);
if (PEAR::isError($res)) {
return $res;
}
2  package.xml
View
@@ -60,6 +60,8 @@ Currently, the following decorators are provided:
- bug #11880: [XML driver] removing one language removes all strings for all languages
- request #11881: getLang(...,'array') now returns a 'lang_id' alias to 'id'
- bug #12183: language ID '0' considered invalid
+- bug #12398: fixed return value of addLangToList() and updateLang() in the MDB2
+ admin container
- fixed Coding Standards
</notes>
<contents>
Please sign in to comment.
Something went wrong with that request. Please try again.