Skip to content

Commit

Permalink
Ingo - filter by rule_owner
Browse files Browse the repository at this point in the history
Signed-off-by: Michael M Slusarz <slusarz@horde.org>
  • Loading branch information
joaomachado authored and slusarz committed May 16, 2015
1 parent 4789ca1 commit dc23a7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ingo/lib/Storage/Sql.php
Expand Up @@ -261,10 +261,12 @@ protected function _storeBackend($action, $rule)
case self::STORE_ADD:
try {
$query = sprintf(
'SELECT MAX(rule_order) FROM %s',
'SELECT MAX(rule_order) FROM %s WHERE rule_owner = ?',
$this->_params['table_rules']
);
$max = $this->_params['db']->selectValue($query);
$values = array(Ingo::getUser());

$max = $this->_params['db']->selectValue($query, $values);
} catch (Horde_Db_Exception $e) {
throw new Ingo_Exception($e);
}
Expand Down

0 comments on commit dc23a7a

Please sign in to comment.