Commit 945c39aa authored by Benni Mack's avatar Benni Mack Committed by Georg Ringer
Browse files

[!!!][TASK] Remove hardly used pagetree related TS options

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's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarJoerg Boesche <typo3@joergboesche.de>
Reviewed-by: default avatarEugene Kenah Djomo <kdeugene@yahoo.fr>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
parent 3ad2756d
......@@ -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');
}
}
/**
......
......@@ -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;
......
......@@ -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' => [
......
......@@ -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();
},
......
.. 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
......@@ -267,7 +267,6 @@
'disableDelete': kw('disableDelete'),
'disableDocSelector': kw('disableDocSelector'),
'disableHideAtCopy': kw('disableHideAtCopy'),
'disableIconLinkToContextmenu': kw('disableIconLinkToContextmenu'),
'disableItems': kw('disableItems'),
'disableNewContentElementWizard': kw('disableNewContentElementWizard'),
'disableNoMatchingValueElement': kw('disableNoMatchingValueElement'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment