diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-03-10 10:24:08 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-03-10 10:24:08 +0100 |
commit | 6b4117df34232fbe9da49fca9a813bc8c5ec226d (patch) | |
tree | 4d4099c2477e48da4f6ff24de611dd2cd53930f2 /apps/dav | |
parent | 308c99f1fd7ee82348232e93d1a6bae32ad0afa7 (diff) | |
download | nextcloud-server-6b4117df34232fbe9da49fca9a813bc8c5ec226d.tar.gz nextcloud-server-6b4117df34232fbe9da49fca9a813bc8c5ec226d.zip |
Correctly escape join statements and use selectAlias
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/caldav/caldavbackend.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/caldav/caldavbackend.php b/apps/dav/lib/caldav/caldavbackend.php index 521d1b1de5e..0315baada3d 100644 --- a/apps/dav/lib/caldav/caldavbackend.php +++ b/apps/dav/lib/caldav/caldavbackend.php @@ -815,9 +815,9 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription function getCalendarObjectByUID($principalUri, $uid) { $query = $this->db->getQueryBuilder(); - $query->select([$query->createFunction('c.`uri` AS `calendaruri`'), $query->createFunction('co.`uri` AS `objecturi`')]) + $query->selectAlias('c.uri', 'calendaruri')->selectAlias('co.uri', 'objecturi') ->from('calendarobjects', 'co') - ->leftJoin('co', 'calendars', 'c', 'co.`calendarid` = c.`id`') + ->leftJoin('co', 'calendars', 'c', $query->expr()->eq('co.calendarid', 'c.id')) ->where($query->expr()->eq('c.principaluri', $query->createNamedParameter($principalUri))) ->andWhere($query->expr()->eq('co.uid', $query->createNamedParameter($uid))); |