summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-07-23 10:34:01 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-07-23 10:34:01 +0200
commitbd63fddbf44312f7c388711b6f7b990245654283 (patch)
tree74cdbe0148d7b69b6012243b0c0b1e2cb1e7374f /apps/files/appinfo
parentc0e37c7d69196ae34a01cfda95394625d79e7c29 (diff)
downloadnextcloud-server-bd63fddbf44312f7c388711b6f7b990245654283.tar.gz
nextcloud-server-bd63fddbf44312f7c388711b6f7b990245654283.zip
fix broken properties in the database
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/update.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php
index 88db08e7e23..5514aed197f 100644
--- a/apps/files/appinfo/update.php
+++ b/apps/files/appinfo/update.php
@@ -1,13 +1,13 @@
<?php
-// fix webdav properties, remove namespace information between curly bracket
+// fix webdav properties, remove namespace information between curly bracket (update from OC4 to OC5)
$installedVersion=OCP\Config::getAppValue('files', 'installed_version');
if (version_compare($installedVersion, '1.1.4', '<')) {
$query = OC_DB::prepare( "SELECT propertyname, propertypath, userid FROM `*PREFIX*properties`" );
$result = $query->execute();
while( $row = $result->fetchRow()){
$query = OC_DB::prepare( 'UPDATE *PREFIX*properties SET propertyname = ? WHERE userid = ? AND propertypath = ?' );
- $query->execute( array( preg_replace("/{.*}/", "", $row["propertyname"]),$row["userid"], $row["propertypath"] ));
+ $query->execute( array( preg_replace("/^{.*}/", "", $row["propertyname"]),$row["userid"], $row["propertypath"] ));
}
}