summaryrefslogtreecommitdiffstats
path: root/apps/remoteStorage
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-11-03 12:47:12 +0100
committerRobin Appelman <icewind1991@gmail.com>2011-11-03 13:09:51 +0100
commite2907eb99db54090ded8332bee5ebb7c94e08b2f (patch)
tree7616d7c0335f9078920cb8ec641e653ade231458 /apps/remoteStorage
parent7b3ae2edd405f31071f43f941615c9da6dd1536e (diff)
downloadnextcloud-server-e2907eb99db54090ded8332bee5ebb7c94e08b2f.tar.gz
nextcloud-server-e2907eb99db54090ded8332bee5ebb7c94e08b2f.zip
no longer rely on PEAR::isError since we can use PDO now
Diffstat (limited to 'apps/remoteStorage')
-rw-r--r--apps/remoteStorage/lib_remoteStorage.php24
1 files changed, 0 insertions, 24 deletions
diff --git a/apps/remoteStorage/lib_remoteStorage.php b/apps/remoteStorage/lib_remoteStorage.php
index f10a72870a4..4bbadafe7d2 100644
--- a/apps/remoteStorage/lib_remoteStorage.php
+++ b/apps/remoteStorage/lib_remoteStorage.php
@@ -4,12 +4,6 @@ class OC_remoteStorage {
public static function getValidTokens($ownCloudUser, $userAddress, $dataScope) {
$query=OC_DB::prepare("SELECT token,appUrl FROM *PREFIX*authtoken WHERE user=? AND userAddress=? AND dataScope=? LIMIT 100");
$result=$query->execute(array($ownCloudUser,$userAddress,$dataScope));
- if( PEAR::isError($result)) {
- $entry = 'DB Error: "'.$result->getMessage().'"<br />';
- $entry .= 'Offending command was: '.$result->getDebugInfo().'<br />';
- OC_Log::write('removeStorage',$entry,OC_Log::ERROR);
- die( $entry );
- }
$ret = array();
while($row=$result->fetchRow()){
$ret[$row['token']]=$userAddress;
@@ -21,12 +15,6 @@ class OC_remoteStorage {
$user=OC_User::getUser();
$query=OC_DB::prepare("SELECT token,appUrl,userAddress,dataScope FROM *PREFIX*authtoken WHERE user=? LIMIT 100");
$result=$query->execute(array($user));
- if( PEAR::isError($result)) {
- $entry = 'DB Error: "'.$result->getMessage().'"<br />';
- $entry .= 'Offending command was: '.$result->getDebugInfo().'<br />';
- OC_Log::write('removeStorage',$entry,OC_Log::ERROR);
- die( $entry );
- }
$ret = array();
while($row=$result->fetchRow()){
$ret[$row['token']] = array(
@@ -42,23 +30,11 @@ class OC_remoteStorage {
$user=OC_User::getUser();
$query=OC_DB::prepare("DELETE FROM *PREFIX*authtoken WHERE token=? AND user=?");
$result=$query->execute(array($token,$user));
- if( PEAR::isError($result)) {
- $entry = 'DB Error: "'.$result->getMessage().'"<br />';
- $entry .= 'Offending command was: '.$result->getDebugInfo().'<br />';
- OC_Log::write('removeStorage',$entry,OC_Log::ERROR);
- die( $entry );
- }
}
private static function addToken($token, $appUrl, $userAddress, $dataScope){
$user=OC_User::getUser();
$query=OC_DB::prepare("INSERT INTO *PREFIX*authtoken (`token`,`appUrl`,`user`,`userAddress`,`dataScope`) VALUES(?,?,?,?,?)");
$result=$query->execute(array($token,$appUrl,$user,$userAddress,$dataScope));
- if( PEAR::isError($result)) {
- $entry = 'DB Error: "'.$result->getMessage().'"<br />';
- $entry .= 'Offending command was: '.$result->getDebugInfo().'<br />';
- OC_Log::write('removeStorage',$entry,OC_Log::ERROR);
- die( $entry );
- }
}
public static function createDataScope($appUrl, $userAddress, $dataScope){
$token=uniqid();