]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #3799 from owncloud/fix_pdo_statement_wrapper_numrows_on_modification
authorBart Visscher <bartv@thisnet.nl>
Fri, 28 Jun 2013 14:15:38 +0000 (07:15 -0700)
committerBart Visscher <bartv@thisnet.nl>
Fri, 28 Jun 2013 14:15:38 +0000 (07:15 -0700)
Fix pdo statement wrapper numrows on modification

1  2 
lib/connector/sabre/locks.php
lib/db.php

index 7aca2e437129714038ef0a3ffff6d1ccd0064c70,e057b05994764c9655b9d9cd63336d1992c4d7b2..69496c15adadd75db8eda4fa35e719f83c5fca3d
@@@ -176,13 -176,9 +176,13 @@@ class OC_Connector_Sabre_Locks extends 
        public function unlock($uri, Sabre_DAV_Locks_LockInfo $lockInfo) {
  
                $sql = 'DELETE FROM `*PREFIX*locks` WHERE `userid` = ? AND `uri` = ? AND `token` = ?';
 +              if (OC_Config::getValue( "dbtype") === 'oci') {
 +                      //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
 +                      $sql = 'DELETE FROM `*PREFIX*locks` WHERE `userid` = ? AND to_char(`uri`) = ? AND `token` = ?';
 +              }
                $result = OC_DB::executeAudited( $sql, array(OC_User::getUser(), $uri, $lockInfo->token));
  
-               return $result->numRows() === 1;
+               return $result === 1;
  
        }
  
diff --cc lib/db.php
Simple merge