summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Cornutt <chris.cornutt@hp.com>2015-01-05 14:57:46 -0600
committerChris Cornutt <chris.cornutt@hp.com>2015-01-05 14:57:46 -0600
commit427f1ba520b06fb66dc4aeaa3dc3e283c2074d18 (patch)
tree7d568e423d706640ddfc24ab224fc7482b755ee4 /src
parent0fe5a290d9992461ff27b0b85a5f3ac29eada297 (diff)
downloadgatekeeper-427f1ba520b06fb66dc4aeaa3dc3e283c2074d18.zip
gatekeeper-427f1ba520b06fb66dc4aeaa3dc3e283c2074d18.tar.gz
gatekeeper-427f1ba520b06fb66dc4aeaa3dc3e283c2074d18.tar.bz2
updating Group and Throttle models to use new data source handling
Diffstat (limited to 'src')
-rw-r--r--src/Psecio/Gatekeeper/GroupModel.php4
-rw-r--r--src/Psecio/Gatekeeper/ThrottleModel.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Psecio/Gatekeeper/GroupModel.php b/src/Psecio/Gatekeeper/GroupModel.php
index 50a8d81..e23e588 100644
--- a/src/Psecio/Gatekeeper/GroupModel.php
+++ b/src/Psecio/Gatekeeper/GroupModel.php
@@ -78,7 +78,7 @@ class GroupModel extends \Psecio\Gatekeeper\Model\Mysql
'user_id' => $user
);
$groupUser = new UserGroupModel($this->getDb(), $data);
- return $groupUser->save();
+ return $this->getDb()->save($groupUser);
}
/**
@@ -100,7 +100,7 @@ class GroupModel extends \Psecio\Gatekeeper\Model\Mysql
'group_id' => $this->id
);
$groupPerm = new GroupPermissionModel($this->getDb(), $data);
- return $groupPerm->save();
+ return $this->getDb()->save($groupPerm);
}
/**
diff --git a/src/Psecio/Gatekeeper/ThrottleModel.php b/src/Psecio/Gatekeeper/ThrottleModel.php
index ac5f065..ad78361 100644
--- a/src/Psecio/Gatekeeper/ThrottleModel.php
+++ b/src/Psecio/Gatekeeper/ThrottleModel.php
@@ -95,7 +95,7 @@ class ThrottleModel extends \Psecio\Gatekeeper\Model\Mysql
{
$this->lastAttempt = date('Y-m-d H:i:s');
$this->attempts = $this->attempts + 1;
- return $this->save();
+ return $this->getDb()->save($this);
}
/**
@@ -107,7 +107,7 @@ class ThrottleModel extends \Psecio\Gatekeeper\Model\Mysql
{
$this->statusChange = date('Y-m-d H:i:s');
$this->status = ThrottleModel::STATUS_ALLOWED;
- return $this->save();
+ return $this->getDb()->save($this);
}
// See how long it was since the last change (to blocked)
@@ -140,7 +140,7 @@ class ThrottleModel extends \Psecio\Gatekeeper\Model\Mysql
{
if ($this->attempts >= $this->allowedAttemts) {
$this->status = ThrottleModel::STATUS_BLOCKED;
- $this->save();
+ return $this->getDb()->save($this);
return false;
}
return true;