mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 22:27:31 -04:00
use doctrine to construct concat expression
This commit is contained in:
parent
51ec68a623
commit
72ca0a482b
1 changed files with 1 additions and 8 deletions
|
|
@ -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 '{%'" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue