Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Unescape val column of ajxp_user_prefs when using postgresql
Browse files Browse the repository at this point in the history
dibi does not unescape them automatically
  • Loading branch information
lucmil committed Nov 17, 2014
1 parent 7c54c0a commit 18b881f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/plugins/conf.sql/class.AJXP_SqlUser.php
Expand Up @@ -363,6 +363,13 @@ public function load()

$result_prefs = dibi::query('SELECT [name], [val] FROM [ajxp_user_prefs] WHERE [login] = %s', $this->getId());
$this->prefs = $result_prefs->fetchPairs('name', 'val');
if ("postgre" == $this->storage->sqlDriver["driver"]) {
$unescaped = array();
foreach($this->prefs as $name => $val) {
$unescaped[$name] = unserialize($val);
}
$this->prefs = $unescaped;
}

$result_bookmarks = dibi::query('SELECT [repo_uuid], [path], [title] FROM [ajxp_user_bookmarks] WHERE [login] = %s', $this->getId());
$all_bookmarks = $result_bookmarks->fetchAll();
Expand Down

0 comments on commit 18b881f

Please sign in to comment.