[BUGFIX] Add separate sorting direction to getMenu methods 66/51066/5
authorSusanne Moog <susanne.moog@typo3.com>
Fri, 30 Dec 2016 08:40:43 +0000 (09:40 +0100)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 30 Dec 2016 10:20:45 +0000 (11:20 +0100)
Since the doctrine change the sorting direction has to be passed as
separate parameter, the methods getMenu, getMenuForPages and
getSubpagesForPages now have a parameter for that.

Change-Id: Ib83c7c47ede4972eee187832c704f549ccaa520a
Resolves: #79113
Releases: master
Reviewed-on: https://review.typo3.org/51066
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/frontend/Classes/Page/PageRepository.php

index db47a5f..b4347a3 100644 (file)
@@ -720,7 +720,10 @@ class PageRepository
             );
 
         if (!empty($sortField)) {
-            $res->orderBy($sortField);
+            $orderBy = QueryHelper::parseOrderBy($sortField);
+            foreach ($orderBy as $order) {
+                $res->orderBy(...$order);
+            }
         }
         $result = $res->execute();