Skip to content

Commit

Permalink
Don't disable caching; use parameter defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jan 29, 2018
1 parent d307c2d commit 09992c8
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions lib/Horde/Group/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,10 @@ class Horde_Group_File extends Horde_Group_Base
*/
public function __construct($params)
{
/* disable caching for now, otherwise we would need to
monitor mtime changes on the input file and build our
cache signature in _sig() including the mtime.
Caching might even be more overhead for this lightweight backend.
*/
if (isset($params['cache'])) {
$params['cache'] = new Horde_Support_Stub();
}

$use_gid = false;
if (isset($params['use_gid'])) {
$use_gid = $params['use_gid'];
}
$params = array_merge(
array('use_gid' => false),
$params
);

parent::__construct($params);

Expand All @@ -83,7 +74,7 @@ public function __construct($params)
}

// either use gid from file or group name as id
$id = $use_gid ? $m[2] : $m[1];
$id = $params['use_gid'] ? $m[2] : $m[1];
$this->_groups[$id] = array(
'name' => $m[1],
'users' => explode(',', $m[3])
Expand Down

0 comments on commit 09992c8

Please sign in to comment.