summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-11-01 15:45:33 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-11-01 15:45:33 +0100
commit9ae829497a3e3a4ef535e9ed18f59233c0a4aa35 (patch)
treee9ae563b3d51b01dc00eabc56e477f1e524c577f /apps/files/appinfo
parent72ca0a482b2b998c8f75f4dd3710c9635d8d6ca7 (diff)
downloadnextcloud-server-9ae829497a3e3a4ef535e9ed18f59233c0a4aa35.tar.gz
nextcloud-server-9ae829497a3e3a4ef535e9ed18f59233c0a4aa35.zip
cleanup and actually execute the query
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/update.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php
index 7ae09114653..f920f842166 100644
--- a/apps/files/appinfo/update.php
+++ b/apps/files/appinfo/update.php
@@ -3,10 +3,14 @@
// fix webdav properties,add namespace in front of the property, update for OC4.5
$installedVersion=OCP\Config::getAppValue('files', 'installed_version');
if (version_compare($installedVersion, '1.1.6', '<')) {
- $concat = OC_DB::getConnection()->getDatabasePlatform()->getConcatExpression( "'{DAV:}'", "`propertyname`" );
- $query = OC_DB::prepare( "UPDATE `*PREFIX*properties`
- SET `propertyname` = $concat
- WHERE `propertyname` LIKE '{%'" );
+ $concat = OC_DB::getConnection()->getDatabasePlatform()->
+ getConcatExpression( '\'{DAV:}\'', '`propertyname`' );
+ $query = OC_DB::prepare('
+ UPDATE `*PREFIX*properties`
+ SET `propertyname` = ' . $concat . '
+ WHERE `propertyname` NOT LIKE \'{%\'
+ ');
+ $query->execute();
}
//update from OC 3