summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-07-22 12:21:00 +0200
committerJoas Schilling <coding@schilljs.com>2017-08-02 09:48:16 +0200
commit20f8d1094ab9958dc50104a79a2ad0f0a9e0ce1a (patch)
tree6d4a58f43aa068cc593f30cbd98ce4737016423a /lib
parent106df7bc330a2c2e6d974e33be2bed26e22b538e (diff)
downloadnextcloud-server-20f8d1094ab9958dc50104a79a2ad0f0a9e0ce1a.tar.gz
nextcloud-server-20f8d1094ab9958dc50104a79a2ad0f0a9e0ce1a.zip
Can not insert auto increment on oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Comments/Manager.php2
-rw-r--r--lib/private/Repair/NC12/UpdateLanguageCodes.php3
-rw-r--r--lib/private/User/Manager.php3
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php
index 0c2a5efe601..078e1eef4d3 100644
--- a/lib/private/Comments/Manager.php
+++ b/lib/private/Comments/Manager.php
@@ -411,7 +411,7 @@ class Manager implements ICommentsManager {
*/
public function getNumberOfUnreadCommentsForFolder($folderId, IUser $user) {
$qb = $this->dbConn->getQueryBuilder();
- $query = $qb->select('fileid')
+ $query = $qb->select('f.fileid')
->selectAlias(
$qb->createFunction('COUNT(' . $qb->getColumnName('c.id') . ')'),
'num_ids'
diff --git a/lib/private/Repair/NC12/UpdateLanguageCodes.php b/lib/private/Repair/NC12/UpdateLanguageCodes.php
index 891473f51a7..f4a1204543b 100644
--- a/lib/private/Repair/NC12/UpdateLanguageCodes.php
+++ b/lib/private/Repair/NC12/UpdateLanguageCodes.php
@@ -23,6 +23,7 @@
namespace OC\Repair\NC12;
+use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
@@ -80,7 +81,7 @@ class UpdateLanguageCodes implements IRepairStep {
->set('configvalue', $qb->createNamedParameter($newCode))
->where($qb->expr()->eq('appid', $qb->createNamedParameter('core')))
->andWhere($qb->expr()->eq('configkey', $qb->createNamedParameter('lang')))
- ->andWhere($qb->expr()->eq('configvalue', $qb->createNamedParameter($oldCode)))
+ ->andWhere($qb->expr()->eq('configvalue', $qb->createNamedParameter($oldCode), IQueryBuilder::PARAM_STR))
->execute();
$output->info('Changed ' . $affectedRows . ' setting(s) from "' . $oldCode . '" to "' . $newCode . '" in preferences table.');
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index ded807a223b..8f3c98d4b5e 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -34,6 +34,7 @@
namespace OC\User;
use OC\Hooks\PublicEmitter;
+use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IUser;
use OCP\IUserBackend;
use OCP\IUserManager;
@@ -436,7 +437,7 @@ class Manager extends PublicEmitter implements IUserManager {
->from('preferences')
->where($queryBuilder->expr()->eq('appid', $queryBuilder->createNamedParameter('core')))
->andWhere($queryBuilder->expr()->eq('configkey', $queryBuilder->createNamedParameter('enabled')))
- ->andWhere($queryBuilder->expr()->eq('configvalue', $queryBuilder->createNamedParameter('false')));
+ ->andWhere($queryBuilder->expr()->eq('configvalue', $queryBuilder->createNamedParameter('false'), IQueryBuilder::PARAM_STR));
$query = $queryBuilder->execute();