diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-09-12 12:11:36 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-11-01 15:40:21 +0100 |
commit | 72ca0a482b2b998c8f75f4dd3710c9635d8d6ca7 (patch) | |
tree | 10a26cd39dffd09ba10f2c4a07fcd4e7767543b2 /apps/files/appinfo | |
parent | 51ec68a6231c577baa0890dbf8b4b91fe9c10ed0 (diff) | |
download | nextcloud-server-72ca0a482b2b998c8f75f4dd3710c9635d8d6ca7.tar.gz nextcloud-server-72ca0a482b2b998c8f75f4dd3710c9635d8d6ca7.zip |
use doctrine to construct concat expression
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r-- | apps/files/appinfo/update.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index d8886328d8f..7ae09114653 100644 --- a/apps/files/appinfo/update.php +++ b/apps/files/appinfo/update.php @@ -3,14 +3,7 @@ // 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', '<')) { - // SQL92 string concatenation is ||, some of the DBMS don't know that - if (OC_Config::getValue('dbtype') === 'mysql') { - $concat = "concat('{DAV:}', `propertyname`)"; - } else if (OC_Config::getValue('dbtype') === 'mssql') { - $concat = "'{DAV:}' + `propertyname`"; - } else { - $concat = "'{DAV:}' || `propertyname`"; - } + $concat = OC_DB::getConnection()->getDatabasePlatform()->getConcatExpression( "'{DAV:}'", "`propertyname`" ); $query = OC_DB::prepare( "UPDATE `*PREFIX*properties` SET `propertyname` = $concat WHERE `propertyname` LIKE '{%'" ); |