Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 9c19a65

Browse files
author
Charles Marion
committed
BUG refs #122 Now use fetchRow
1 parent ef2240d commit 9c19a65

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

core/models/pdo/FeedModel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ function policyCheck($feedDao, $userDao = null, $policy = 0)
100100
$sql = $this->database->select()
101101
->union(array($subqueryUser, $subqueryGroup));
102102

103-
$rowset = $this->database->fetchAll($sql);
104-
if(count($rowset) > 0)
103+
$row = $this->database->fetchRow($sql);
104+
if($row == null)
105105
{
106-
return true;
106+
return false;
107107
}
108-
return false;
108+
return true;
109109
} //end policyCheck
110110

111111

core/models/pdo/FolderModel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ function policyCheck($folderDao, $userDao = null, $policy = 0)
7676

7777
$sql = $this->database->select()
7878
->union(array($subqueryUser, $subqueryGroup));
79-
$rowset = $this->database->fetchAll($sql);
80-
if(count($rowset) > 0)
79+
$row = $this->database->fetchRow($sql);
80+
if($row == null)
8181
{
82-
return true;
82+
return false;
8383
}
84-
return false;
84+
return true;
8585
}//end policyCheck
8686

8787
/** get the size and the number of item in a folder*/

core/models/pdo/ItemModel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,12 @@ function policyCheck($itemdao, $userDao = null, $policy = 0)
257257

258258
$sql = $this->database->select()
259259
->union(array($subqueryUser, $subqueryGroup));
260-
$rowset = $this->database->fetchAll($sql);
261-
if(count($rowset) > 0)
260+
$row = $this->database->fetchRow($sql);
261+
if($row == null)
262262
{
263-
return true;
263+
return false;
264264
}
265-
return false;
265+
return true;
266266
}//end policyCheck
267267

268268
/** get random items

0 commit comments

Comments
 (0)