Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/inc/HTTP
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2010-07-04 11:54:54 +0400
committerRobin Appelman <icewind1991@gmail.com>2010-07-04 11:54:54 +0400
commit8c8979f11e1f454d3b0e866880a4be6d7daf7f82 (patch)
treef22ef2ea5a540fad678ada635cd74f7d6f544bf5 /inc/HTTP
parenta857c7a04c21b1be21fd4665d954bb5c4998f916 (diff)
fix potential infinite loop
Diffstat (limited to 'inc/HTTP')
-rwxr-xr-xinc/HTTP/WebDAV/Server/Filesystem.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/HTTP/WebDAV/Server/Filesystem.php b/inc/HTTP/WebDAV/Server/Filesystem.php
index 000831f6fef..7826a690a55 100755
--- a/inc/HTTP/WebDAV/Server/Filesystem.php
+++ b/inc/HTTP/WebDAV/Server/Filesystem.php
@@ -177,15 +177,15 @@
$info["props"][] = $this->mkprop("resourcetype", "");
if ( OC_FILESYSTEM::is_readable($fspath)) {
$info["props"][] = $this->mkprop("getcontenttype", $this->_mimetype($fspath));
- } else {
+ } else { "SELECT ns, name, value FROM properties WHERE path = '$path'";
$info["props"][] = $this->mkprop("getcontenttype", "application/x-non-readable");
}
$info["props"][] = $this->mkprop("getcontentlength", OC_FILESYSTEM::filesize($fspath));
}
// get additional properties from database
- $query = "SELECT ns, name, value FROM properties WHERE path = '$path'";
- $res = OC_DB::select($query);
- while ($row = $res[0]) {
+ $query = "SELECT ns, name, value FROM properties WHERE path = '$path'";
+ $res = OC_DB::select($query);
+ foreach($res as $row){
$info["props"][] = $this->mkprop($row["ns"], $row["name"], $row["value"]);
}
return $info;