Skip to content

Commit

Permalink
Merge pull request #75 from jweiland-net/increasePerformanceInReduceC…
Browse files Browse the repository at this point in the history
…ategories

Increase performance in reduce categories
  • Loading branch information
hojalatheef committed May 13, 2024
2 parents bed66d4 + 8c6b0a8 commit 87f17bb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
8 changes: 7 additions & 1 deletion Classes/EventListener/ReduceCategoryTreeToPageTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,14 @@ protected function getListOfAllowedCategoryUids(int $pageUid): string
->executeQuery()
->fetchAllAssociative();

// If there are no categories we have to make sure $this->listOfCategoryUids will be filled with 0,
// to prevent that this method will be called again and again
if ($categories === []) {
return '0';
$categories = [
0 => [
'uid' => 0,
],
];
}

$listOfCategories = [];
Expand Down
5 changes: 5 additions & 0 deletions Documentation/ChangeLog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ ChangeLog
.. contents::
:local:

Version 7.0.1
=============

* [PERFORMANCE] Prevent calling getListOfAllowedCategoryUids multiple times

Version 7.0.0
=============

Expand Down
4 changes: 2 additions & 2 deletions Documentation/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
[general]

project = Jwtools2
version = 7.0.0
version = 7.0.1
release = 7.0
copyright = since 2019 by jweiland.net

[html_theme_options]

# "Edit on GitHub" button
github_repository = jweiland/jwtools2
github_branch = master
github_branch = main

# Footer links
project_home = https://www.jweiland.net
Expand Down
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

$EM_CONF[$_EXTKEY] = [
'title' => 'JW tools',
'description' => 'Jwtools2 contains a scheduler task for Solr to index multiple Pagetrees and a task to execute
'description' => 'Jwtools2 contains a scheduler task for Solr to index multiple Pagetrees and a task to execute
SQL-Queries. Further there are settings to enable some features in TYPO3 like showing the Page UID in Pagetree
with a simple click in extensionmanager.',
'category' => 'module',
'author' => 'Stefan Froemken, Hoja Mustaffa Abdul Latheef',
'author_email' => 'projects@jweiland.net',
'author_company' => 'jweiland.net',
'state' => 'stable',
'version' => '7.0.0',
'version' => '7.0.1',
'constraints' => [
'depends' => [
'typo3' => '12.4.9-12.4.99',
Expand Down

0 comments on commit 87f17bb

Please sign in to comment.