summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-07-19 14:35:28 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-07-23 10:25:26 +0200
commit708c771296bfc839a54dce7e50fa9793fb636457 (patch)
tree4359c2fd6ea08474b05ae6dda9847ffe829102f8 /apps/files/appinfo
parent25e1c13ef7dbbcea0dd3ad80533aa9005ea3e978 (diff)
downloadnextcloud-server-708c771296bfc839a54dce7e50fa9793fb636457.tar.gz
nextcloud-server-708c771296bfc839a54dce7e50fa9793fb636457.zip
update routine to fix broken file properties in db
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/update.php11
-rw-r--r--apps/files/appinfo/version2
2 files changed, 12 insertions, 1 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php
index f9953ba4de5..88db08e7e23 100644
--- a/apps/files/appinfo/update.php
+++ b/apps/files/appinfo/update.php
@@ -1,5 +1,16 @@
<?php
+// fix webdav properties, remove namespace information between curly bracket
+$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"] ));
+ }
+}
+
//update from OC 3
//try to remove remaining files.
diff --git a/apps/files/appinfo/version b/apps/files/appinfo/version
index 9c1218c201f..1b87bcd0b09 100644
--- a/apps/files/appinfo/version
+++ b/apps/files/appinfo/version
@@ -1 +1 @@
-1.1.3 \ No newline at end of file
+1.1.4 \ No newline at end of file