summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-06 03:20:44 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-06 03:20:44 +0200
commitdc062b8bfe1cb97a49ed18b8364605babc83c967 (patch)
tree1ab24f4b8ca2876f8c79e05509801d3974543813
parentdf2613660f8e7b6b0c90a06542b830061513c725 (diff)
remove old fromrow method from itembusinesslayer to prevent failing when starring
-rw-r--r--businesslayer/itembusinesslayer.php1
-rw-r--r--db/itemmapper.php6
2 files changed, 2 insertions, 5 deletions
diff --git a/businesslayer/itembusinesslayer.php b/businesslayer/itembusinesslayer.php
index 7c8e7e02c..86217cdad 100644
--- a/businesslayer/itembusinesslayer.php
+++ b/businesslayer/itembusinesslayer.php
@@ -122,6 +122,7 @@ class ItemBusinessLayer extends BusinessLayer {
public function star($feedId, $guidHash, $isStarred, $userId){
try {
$item = $this->mapper->findByGuidHash($guidHash, $feedId, $userId);
+
$item->setLastModified($this->timeFactory->getTime());
if($isStarred){
$item->setStarred();
diff --git a/db/itemmapper.php b/db/itemmapper.php
index ad5424eac..eee3adb6a 100644
--- a/db/itemmapper.php
+++ b/db/itemmapper.php
@@ -222,12 +222,8 @@ class ItemMapper extends Mapper implements IMapper {
$sql = $this->makeSelectQuery(
'AND `items`.`guid_hash` = ? ' .
'AND `feeds`.`id` = ? ');
- $row = $this->findOneQuery($sql, array($userId, $guidHash, $feedId));
- $item = new Item();
- $item->fromRow($row);
-
- return $item;
+ return $this->findEntity($sql, array($userId, $guidHash, $feedId));
}