@@ -2169,38 +2169,6 @@ public function getCalendarObjectByUID($principalUri, $uid) {
21692169 return null ;
21702170 }
21712171
2172- /**
2173- * Searches through all of a users calendars and calendar objects to find
2174- * an object with a specific UID and will return the object.
2175- * Could theoretically return more than one object as we're searching the whole
2176- * principal (UIDs are only unqiue across calendars, not principals)
2177- * thus the result is sorted by the Last_modified time and only the first result is
2178- * returned.
2179- *
2180- * As this method is (at this moment in time) used to compare it with
2181- * incoming scheduling data, the possibility of duplicates across the principal
2182- * collection is not a problem.
2183- *
2184- * @throws Exception
2185- */
2186- public function searchPrincipalByUid (string $ principalUri , string $ uid ): ?array {
2187- $ query = $ this ->db ->getQueryBuilder ();
2188- $ query ->select ('c.* ' , 'co.calendardata ' , 'co.calendarid ' , 'co.uid ' )
2189- ->from ('calendarobjects ' , 'co ' )
2190- ->leftJoin ('co ' , 'calendars ' , 'c ' , $ query ->expr ()->eq ('co.calendarid ' , 'c.id ' ))
2191- ->where ($ query ->expr ()->eq ('c.principaluri ' , $ query ->createNamedParameter ($ principalUri )))
2192- ->andWhere ($ query ->expr ()->eq ('co.uid ' , $ query ->createNamedParameter ($ uid )))
2193- ->andWhere ($ query ->expr ()->isNull ('co.deleted_at ' ))
2194- ->orderBy ('co.lastmodified ' );
2195- $ stmt = $ query ->executeQuery ();
2196- $ row = $ stmt ->fetch ();
2197- $ stmt ->closeCursor ();
2198- if ($ row ) {
2199- return $ row ;
2200- }
2201- return null ;
2202- }
2203-
22042172 public function getCalendarObjectById (string $ principalUri , int $ id ): ?array {
22052173 $ query = $ this ->db ->getQueryBuilder ();
22062174 $ query ->select (['co.id ' , 'co.uri ' , 'co.lastmodified ' , 'co.etag ' , 'co.calendarid ' , 'co.size ' , 'co.calendardata ' , 'co.componenttype ' , 'co.classification ' , 'co.deleted_at ' ])
0 commit comments