Fix that preferences can't be stored in a database

The mtime column is a column to update, not a column for the where condition.

fixes #8629
This commit is contained in:
Eric Lippmann 2015-03-08 10:19:17 +01:00
parent cddcde9494
commit d414d7e395
1 changed files with 5 additions and 3 deletions

View File

@ -203,12 +203,14 @@ class DbStore extends PreferencesStore
foreach ($preferences as $key => $value) {
$db->update(
$this->table,
array(self::COLUMN_VALUE => $value),
array(
self::COLUMN_VALUE => $value,
self::COLUMN_MODIFIED_TIME => new Zend_Db_Expr('NOW()')
),
array(
self::COLUMN_USERNAME . '=?' => $this->getUser()->getUsername(),
$db->quoteIdentifier(self::COLUMN_SECTION) . '=?' => $section,
$db->quoteIdentifier(self::COLUMN_PREFERENCE) . '=?' => $key,
self::COLUMN_MODIFIED_TIME => new Zend_Db_Expr('NOW()')
$db->quoteIdentifier(self::COLUMN_PREFERENCE) . '=?' => $key
)
);
}