summaryrefslogtreecommitdiffstats
path: root/lib/connector
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-06-14 10:06:13 +0200
committerThomas Mueller <thomas.mueller@tmit.eu>2013-06-14 10:06:13 +0200
commitc8564c07955ead3e85daa67e1871a2c41df3a6d5 (patch)
tree134c228f43e641d34fbf342df2745ece43580fee /lib/connector
parent0a29d2029a719d42f347edb95bd6486c2ab842a8 (diff)
parent6c534c8165d3c3fba64e3cf5c05993a84733eef7 (diff)
downloadnextcloud-server-c8564c07955ead3e85daa67e1871a2c41df3a6d5.tar.gz
nextcloud-server-c8564c07955ead3e85daa67e1871a2c41df3a6d5.zip
Merge branch 'master' into move-maint-start
Conflicts: lib/util.php
Diffstat (limited to 'lib/connector')
-rw-r--r--lib/connector/sabre/locks.php22
-rw-r--r--lib/connector/sabre/node.php2
2 files changed, 19 insertions, 5 deletions
diff --git a/lib/connector/sabre/locks.php b/lib/connector/sabre/locks.php
index e58e584fb41..745523c7a5b 100644
--- a/lib/connector/sabre/locks.php
+++ b/lib/connector/sabre/locks.php
@@ -45,7 +45,12 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
// but otherwise reading locks from SQLite Databases will return
// nothing
$query = 'SELECT * FROM `*PREFIX*locks`'
- .' WHERE `userid` = ? AND (`created` + `timeout`) > '.time().' AND (( `uri` = ?)';
+ .' WHERE `userid` = ? AND (`created` + `timeout`) > '.time().' AND (( `uri` = ?)';
+ if (OC_Config::getValue( "dbtype") === 'oci') {
+ //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
+ $query = 'SELECT * FROM `*PREFIX*locks`'
+ .' WHERE `userid` = ? AND (`created` + `timeout`) > '.time().' AND (( to_char(`uri`) = ?)';
+ }
$params = array(OC_User::getUser(), $uri);
// We need to check locks for every part in the uri.
@@ -60,15 +65,24 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
if ($currentPath) $currentPath.='/';
$currentPath.=$part;
-
- $query.=' OR (`depth` != 0 AND `uri` = ?)';
+ //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
+ if (OC_Config::getValue( "dbtype") === 'oci') {
+ $query.=' OR (`depth` != 0 AND to_char(`uri`) = ?)';
+ } else {
+ $query.=' OR (`depth` != 0 AND `uri` = ?)';
+ }
$params[] = $currentPath;
}
if ($returnChildLocks) {
- $query.=' OR (`uri` LIKE ?)';
+ //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
+ if (OC_Config::getValue( "dbtype") === 'oci') {
+ $query.=' OR (to_char(`uri`) LIKE ?)';
+ } else {
+ $query.=' OR (`uri` LIKE ?)';
+ }
$params[] = $uri . '/%';
}
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php
index 360c3066d05..1ffa048d6b2 100644
--- a/lib/connector/sabre/node.php
+++ b/lib/connector/sabre/node.php
@@ -101,7 +101,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
/**
* @brief Ensure that the fileinfo cache is filled
- & @note Uses OC_FileCache or a direct stat
+ * @note Uses OC_FileCache or a direct stat
*/
protected function getFileinfoCache() {
if (!isset($this->fileinfo_cache)) {