summaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder/FunctionBuilder
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-01-04 13:59:54 +0100
committerJoas Schilling <coding@schilljs.com>2022-01-04 13:59:54 +0100
commit005e717fe6d3f5bf38e65069c055b9b817a2b6ef (patch)
tree9b58f1279f2927552927d8eccc5141dd2d0b706d /lib/private/DB/QueryBuilder/FunctionBuilder
parentecc92067bf6eff340bc2f6833112c0e1084e74d4 (diff)
downloadnextcloud-server-005e717fe6d3f5bf38e65069c055b9b817a2b6ef.tar.gz
nextcloud-server-005e717fe6d3f5bf38e65069c055b9b817a2b6ef.zip
Use quote function
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB/QueryBuilder/FunctionBuilder')
-rw-r--r--lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php
index b2d5deffc87..3871070a583 100644
--- a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php
+++ b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php
@@ -26,7 +26,6 @@ namespace OC\DB\QueryBuilder\FunctionBuilder;
use OC\DB\QueryBuilder\QueryFunction;
use OCP\DB\QueryBuilder\ILiteral;
use OCP\DB\QueryBuilder\IParameter;
-use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\QueryBuilder\IQueryFunction;
class OCIFunctionBuilder extends FunctionBuilder {
@@ -80,10 +79,7 @@ class OCIFunctionBuilder extends FunctionBuilder {
return new QueryFunction('LISTAGG(' . $this->helper->quoteColumnName($expr) . ')' . $orderByClause);
}
- if ($separator === '\'') {
- $separator = '\'\'';
- }
-
- return new QueryFunction('LISTAGG(' . $this->helper->quoteColumnName($expr) . ", '$separator')$orderByClause");
+ $separator = $this->connection->quote($separator);
+ return new QueryFunction('LISTAGG(' . $this->helper->quoteColumnName($expr) . ', ' . $separator . ')' . $orderByClause);
}
}