[!!!][TASK] Remove hardly used pagetree related TS options 60/54560/3
authorBenni Mack <benni@typo3.org>
Sun, 5 Nov 2017 15:37:11 +0000 (16:37 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 6 Nov 2017 10:18:09 +0000 (11:18 +0100)
The following pageTSconfig options are removed:

- options.pageTree.excludeDoktypes
No doktypes are exclueded anymore in search.

- options.pageTree.disableIconLinkToContextmenu
Icon Links are always selected (option had no effect anymore).

- options.pageTree.searchInAlias
Alias is now always searched for.

- options.pageTree.hideFilter
The filter is always shown, this feature should not be available
on a per-user basis.

Resolves: #82919
Releases: master
Change-Id: Ie0031fef9948bf758e880b04662210d74e27688b
Reviewed-on: https://review.typo3.org/54560
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Eugene Kenah Djomo <kdeugene@yahoo.fr>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php
typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php
typo3/sysext/backend/Classes/Tree/Pagetree/ExtdirectTreeDataProvider.php
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/toppanel.js
typo3/sysext/core/Documentation/Changelog/master/Breaking-82919-RemovedPageTreeRelatesTsConfigSettings.rst [new file with mode: 0644]
typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js

index 6b288a0..9e999ed 100644 (file)
@@ -124,11 +124,6 @@ class FileSystemNavigationFrameController
             $this->foldertree = GeneralUtility::makeInstance(FileListFolderTree::class);
             $this->foldertree->thisScript = BackendUtility::getModuleUrl('file_navframe');
         }
-        // Only set ext_IconMode if we are not running an ajax request from the ElementBrowser,
-        // which has this property hardcoded to "titlelink".
-        if (!$this->foldertree instanceof ElementBrowserFolderTreeView) {
-            $this->foldertree->ext_IconMode = $this->getBackendUser()->getTSConfigVal('options.folderTree.disableIconLinkToContextmenu');
-        }
     }
 
     /**
index 78aebab..64d90fa 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Backend\Tree\Pagetree;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Query\QueryBuilder;
 use TYPO3\CMS\Core\Database\Query\QueryHelper;
@@ -445,19 +444,6 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider
             );
         }
 
-        $excludedDoktypes = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.excludeDoktypes');
-        if (!empty($excludedDoktypes)) {
-            $queryBuilder->andWhere(
-                $expressionBuilder->notIn(
-                    'doktype',
-                    $queryBuilder->createNamedParameter(
-                        GeneralUtility::intExplode(',', $excludedDoktypes, true),
-                        Connection::PARAM_INT_ARRAY
-                    )
-                )
-            );
-        }
-
         if ($searchFilter !== '') {
             $searchParts = $expressionBuilder->orX();
             if (is_numeric($searchFilter) && $searchFilter > 0) {
@@ -467,15 +453,6 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider
             }
             $searchFilter = '%' . $queryBuilder->escapeLikeWildcards($searchFilter) . '%';
             $useNavTitle = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showNavTitle');
-            $useAlias = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.searchInAlias');
-
-            $aliasExpression = '';
-            if ($useAlias) {
-                $aliasExpression = $expressionBuilder->like(
-                    'alias',
-                    $queryBuilder->createNamedParameter($searchFilter, \PDO::PARAM_STR)
-                );
-            }
 
             if ($useNavTitle) {
                 $searchWhereAlias = $expressionBuilder->orX(
@@ -494,9 +471,6 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider
                         )
                     )
                 );
-                if (strlen($aliasExpression)) {
-                    $searchWhereAlias->add($aliasExpression);
-                }
                 $searchParts->add($searchWhereAlias);
             } else {
                 $searchParts->add(
@@ -505,12 +479,15 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider
                         $queryBuilder->createNamedParameter($searchFilter, \PDO::PARAM_STR)
                     )
                 );
-
-                if (strlen($aliasExpression)) {
-                    $searchParts->add($aliasExpression);
-                }
             }
 
+            // Also search for the alias
+            $searchParts->add(
+                $expressionBuilder->like(
+                    'alias',
+                    $queryBuilder->createNamedParameter($searchFilter, \PDO::PARAM_STR)
+                )
+            );
             $queryBuilder->andWhere($searchParts);
         }
         return $queryBuilder;
index d60ad38..27deab7 100644 (file)
@@ -178,10 +178,8 @@ class ExtdirectTreeDataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTree
                 'recursiveDeleteDialogMessage' => htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:recursiveDeleteWarning'))
             ],
             'Configuration' => [
-                'hideFilter' => $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.hideFilter'),
                 'displayDeleteConfirmation' => $GLOBALS['BE_USER']->jsConfirmation(JsConfirmation::DELETE),
                 'canDeleteRecursivly' => $GLOBALS['BE_USER']->uc['recursiveDelete'] == true,
-                'disableIconLinkToContextmenu' => $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.disableIconLinkToContextmenu'),
                 'temporaryMountPoint' => Commands::getMountPointPath()
             ],
             'Icons' => [
index 0d1a122..3f46ce6 100644 (file)
@@ -123,13 +123,7 @@ require(['TYPO3/CMS/Backend/Utility'], function(Utility) {
                        TYPO3.Components.PageTree.TopPanel.superclass.initComponent.apply(this, arguments);
 
                        this.addDragDropNodeInsertionFeature();
-
-                       if (!TYPO3.Components.PageTree.Configuration.hideFilter
-                               || TYPO3.Components.PageTree.Configuration.hideFilter === '0'
-                       ) {
-                               this.addFilterFeature();
-                       }
-
+      this.addFilterFeature();
                        this.getTopToolbar().addItem({xtype: 'tbfill'});
                        this.addRefreshTreeFeature();
                },
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-82919-RemovedPageTreeRelatesTsConfigSettings.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82919-RemovedPageTreeRelatesTsConfigSettings.rst
new file mode 100644 (file)
index 0000000..39619a3
--- /dev/null
@@ -0,0 +1,31 @@
+.. include:: ../../Includes.txt
+
+=============================================================
+Breaking: #82919 - Removed pagetree-related TSconfig settings
+=============================================================
+
+See :issue:`82919`
+
+Description
+===========
+
+The following edge-case TSconfig options have been removed:
+
+- options.pageTree.disableIconLinkToContextmenu (Icons are always linked)
+- options.pageTree.searchInAlias (the pages.alias DB field is now always respected when filtering)
+- options.pageTree.excludeDoktypes (there is no restriction to doctypes in the filter anymore)
+- options.pageTree.hideFilter (filter is now always visible)
+
+
+Impact
+======
+
+Setting these options in UserTSconfig will have no effect anymore.
+
+
+Affected Installations
+======================
+
+Installations having one of these options set.
+
+.. index:: Backend, TSConfig, NotScanned
\ No newline at end of file
index 86bd1d4..b4e611f 100644 (file)
                                'disableDelete': kw('disableDelete'),
                                'disableDocSelector': kw('disableDocSelector'),
                                'disableHideAtCopy': kw('disableHideAtCopy'),
-                               'disableIconLinkToContextmenu': kw('disableIconLinkToContextmenu'),
                                'disableItems': kw('disableItems'),
                                'disableNewContentElementWizard': kw('disableNewContentElementWizard'),
                                'disableNoMatchingValueElement': kw('disableNoMatchingValueElement'),