aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2010-07-05 13:39:53 +0200
committerRobin Appelman <icewind1991@gmail.com>2010-07-05 13:39:53 +0200
commita26ef8784044b72d054c4942598650040b51b18c (patch)
tree9af5acf75b765435d10159d1fca616f9f4cd8e2f
parentdb5ac0b477b4e6e4a47a0bd0cc6321b3dd95957b (diff)
downloadnextcloud-server-a26ef8784044b72d054c4942598650040b51b18c.tar.gz
nextcloud-server-a26ef8784044b72d054c4942598650040b51b18c.zip
Fix some database errors
-rwxr-xr-xinc/HTTP/WebDAV/Server/Filesystem.php7
-rwxr-xr-xinc/lib_config.php1
-rwxr-xr-xinc/lib_log.php1
3 files changed, 4 insertions, 5 deletions
diff --git a/inc/HTTP/WebDAV/Server/Filesystem.php b/inc/HTTP/WebDAV/Server/Filesystem.php
index b99bbdbb81e..a41d3687303 100755
--- a/inc/HTTP/WebDAV/Server/Filesystem.php
+++ b/inc/HTTP/WebDAV/Server/Filesystem.php
@@ -324,6 +324,7 @@
*/
function PUT(&$options)
{
+ error_log("put $fspath");
$fspath = $options["path"];
$dir = dirname($fspath);
if (!OC_FILESYSTEM::file_exists($dir) || !OC_FILESYSTEM::is_dir($dir)) {
@@ -641,14 +642,14 @@
return true;
} else {//check for indirect refresh
$query = "SELECT *
- FROM locks
+ FROM {$CONFIG_DBTABLEPREFIX}locks
WHERE recursive = 1
";
$res = OC_DB::select($query);
foreach($res as $row){
if(strpos($options['path'],$row['path'])==0){//are we a child of a folder with an recursive lock
$where = "WHERE path = '$row[path]' AND token = '$options[update]'";
- $query = "UPDATE `locks` SET `expires` = '$options[timeout]', `modified` = ".time()." $where";
+ $query = "UPDATE `{$CONFIG_DBTABLEPREFIX}locks` SET `expires` = '$options[timeout]', `modified` = ".time()." $where";
OC_DB::query($query);
$options['owner'] = $row['owner'];
$options['scope'] = $row["exclusivelock"] ? "exclusive" : "shared";
@@ -727,7 +728,7 @@
}else{
//check for recursive locks;
$query = "SELECT *
- FROM locks
+ FROM {$CONFIG_DBTABLEPREFIX}locks
WHERE recursive = 1
";
$res = OC_DB::select($query);
diff --git a/inc/lib_config.php b/inc/lib_config.php
index 78e10f9474e..dad2fbf8159 100755
--- a/inc/lib_config.php
+++ b/inc/lib_config.php
@@ -336,7 +336,6 @@ class OC_CONFIG{
$result = pg_exec($connection, $query);
}
}
- global $CONFIG_DBTABLEPREFIX;
}
}
?>
diff --git a/inc/lib_log.php b/inc/lib_log.php
index f163fb9fe94..ce46e9a683d 100755
--- a/inc/lib_log.php
+++ b/inc/lib_log.php
@@ -69,7 +69,6 @@ class OC_LOG {
$user=$_SESSION['username_clean'];
$result = OC_DB::select('select `timestamp`,`user`,`type`,`message` from '.$CONFIG_DBTABLEPREFIX.'log where user=\''.$user.'\' order by timestamp desc limit 20');
}
- $result = OC_DB::select($query);
foreach($result as $entry){
echo('<tr class="browserline">');
echo('<td class="sizetext">'.date($CONFIG_DATEFORMAT,$entry['timestamp']).'</td>');