From 9ae829497a3e3a4ef535e9ed18f59233c0a4aa35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 1 Nov 2013 15:45:33 +0100 Subject: [PATCH] cleanup and actually execute the query --- apps/files/appinfo/update.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index 7ae0911465..f920f84216 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