diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-11-01 15:45:33 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-11-01 15:45:33 +0100 |
commit | 9ae829497a3e3a4ef535e9ed18f59233c0a4aa35 (patch) | |
tree | e9ae563b3d51b01dc00eabc56e477f1e524c577f /apps/files/appinfo | |
parent | 72ca0a482b2b998c8f75f4dd3710c9635d8d6ca7 (diff) | |
download | nextcloud-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.php | 12 |
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 |