From 457342db8b7380118ffa9c7dd66729505e11f435 Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Thu, 21 Sep 2023 21:53:11 +0200
Subject: [PATCH] [TASK] Change menu ordering in admin module of indexed_search

The most used view is the indexing information of a page and its
subpages and not a general statistic. Therefore the default action
should be the detail action.

Resolves: #102000
Releases: main, 12.4
Change-Id: I4822b9aea8f4310837d4d55ac9376d45ac2c4df7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81163
Tested-by: core-ci <typo3@b13.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
---
 .../Classes/Controller/AdministrationController.php  | 12 ++++++------
 .../indexed_search/Configuration/Backend/Modules.php |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php b/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php
index 9e11b037aeae..f18284715099 100644
--- a/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php
+++ b/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php
@@ -63,10 +63,10 @@ class AdministrationController extends ActionController
     protected function initializeModuleTemplate(ServerRequestInterface $request): ModuleTemplate
     {
         $menuItems = [
-            'index' => [
+            'statistic' => [
                 'controller' => 'Administration',
-                'action' => 'index',
-                'label' => $this->getLanguageService()->sL('LLL:EXT:indexed_search/Resources/Private/Language/locallang.xlf:administration.menu.general'),
+                'action' => 'statistic',
+                'label' => $this->getLanguageService()->sL('LLL:EXT:indexed_search/Resources/Private/Language/locallang.xlf:administration.menu.statistic'),
             ],
             'pages' => [
                 'controller' => 'Administration',
@@ -78,10 +78,10 @@ class AdministrationController extends ActionController
                 'action' => 'externalDocuments',
                 'label' => $this->getLanguageService()->sL('LLL:EXT:indexed_search/Resources/Private/Language/locallang.xlf:administration.menu.externalDocuments'),
             ],
-            'statistic' => [
+            'index' => [
                 'controller' => 'Administration',
-                'action' => 'statistic',
-                'label' => $this->getLanguageService()->sL('LLL:EXT:indexed_search/Resources/Private/Language/locallang.xlf:administration.menu.statistic'),
+                'action' => 'index',
+                'label' => $this->getLanguageService()->sL('LLL:EXT:indexed_search/Resources/Private/Language/locallang.xlf:administration.menu.general'),
             ],
         ];
 
diff --git a/typo3/sysext/indexed_search/Configuration/Backend/Modules.php b/typo3/sysext/indexed_search/Configuration/Backend/Modules.php
index 28688d950e13..a22833c2730d 100644
--- a/typo3/sysext/indexed_search/Configuration/Backend/Modules.php
+++ b/typo3/sysext/indexed_search/Configuration/Backend/Modules.php
@@ -14,7 +14,7 @@ return [
         'extensionName' => 'IndexedSearch',
         'controllerActions' => [
             AdministrationController::class => [
-                'index', 'pages', 'externalDocuments', 'statistic', 'statisticDetails', 'deleteIndexedItem', 'saveStopwordsKeywords', 'wordDetail',
+                'statistic', 'index', 'pages', 'externalDocuments', 'statisticDetails', 'deleteIndexedItem', 'saveStopwordsKeywords', 'wordDetail',
             ],
         ],
     ],
-- 
GitLab