diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-07-30 22:42:43 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-08-01 14:59:08 +0200 |
commit | e13f381189788c74fe08a3f3336d961977ff9dc4 (patch) | |
tree | 19b81673f6804e718534e4c6a286c94e0a2743b8 /apps/remoteStorage | |
parent | 795e78809f55be762fb07d9a179bbdffa7aefbd9 (diff) | |
download | nextcloud-server-e13f381189788c74fe08a3f3336d961977ff9dc4.tar.gz nextcloud-server-e13f381189788c74fe08a3f3336d961977ff9dc4.zip |
add limit support to OC_DB & OCP/DB
Diffstat (limited to 'apps/remoteStorage')
-rw-r--r-- | apps/remoteStorage/lib_remoteStorage.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/remoteStorage/lib_remoteStorage.php b/apps/remoteStorage/lib_remoteStorage.php index 7c7e455d823..b6934e87d67 100644 --- a/apps/remoteStorage/lib_remoteStorage.php +++ b/apps/remoteStorage/lib_remoteStorage.php @@ -2,7 +2,7 @@ class OC_remoteStorage { public static function getValidTokens($ownCloudUser, $category) { - $query=OCP\DB::prepare("SELECT `token`,`appUrl`,`category` FROM `*PREFIX*authtoken` WHERE `user`=? LIMIT 100"); + $query=OCP\DB::prepare("SELECT `token`,`appUrl`,`category` FROM `*PREFIX*authtoken` WHERE `user`=?",100); $result=$query->execute(array($ownCloudUser)); $ret = array(); while($row=$result->fetchRow()){ @@ -15,7 +15,7 @@ class OC_remoteStorage { public static function getTokenFor($appUrl, $categories) { $user=OCP\USER::getUser(); - $query=OCP\DB::prepare("SELECT `token` FROM `*PREFIX*authtoken` WHERE `user`=? AND `appUrl`=? AND `category`=? LIMIT 1"); + $query=OCP\DB::prepare("SELECT `token` FROM `*PREFIX*authtoken` WHERE `user`=? AND `appUrl`=? AND `category`=?",1); $result=$query->execute(array($user, $appUrl, $categories)); $ret = array(); if($row=$result->fetchRow()) { @@ -27,7 +27,7 @@ class OC_remoteStorage { public static function getAllTokens() { $user=OCP\USER::getUser(); - $query=OCP\DB::prepare("SELECT `token`,`appUrl`,`category` FROM `*PREFIX*authtoken` WHERE `user`=? LIMIT 100"); + $query=OCP\DB::prepare("SELECT `token`,`appUrl`,`category` FROM `*PREFIX*authtoken` WHERE `user`=?",100); $result=$query->execute(array($user)); $ret = array(); while($row=$result->fetchRow()){ |