Permalink
Browse files

set limit to 1 (one) in getLastModifiedForResource

  • Loading branch information...
1 parent 0c9bead commit 902f58f7a2e1ee6df6d92e9aaec0a75ae1c6c61b @white-gecko white-gecko committed Feb 6, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 library/Erfurt/Versioning.php
@@ -133,8 +133,13 @@ public function getLastModifiedForResource($resourceUri, $graphUri)
{
$this->_checkSetup();
+ $limit = $this->getLimit();
+ $this->setLimit(1);
+
$history = $this->getHistoryForResource($resourceUri, $graphUri);
+ $this->setLimit($limit);
+
if (is_array($history) && count($history) > 0) {
return $history[0];
} else {

0 comments on commit 902f58f

Please sign in to comment.