mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-11 03:03:01 +02:00
fixes #1392 improve performances to find related albums
* new conf setting related_albums_maximum_items_to_compute (1000 by default). Beyond this number of photos in current set, do not try to find related albums. * new conf setting related_albums_display_limit : only display the heaviest (most related) albums.
This commit is contained in:
@@ -104,7 +104,12 @@ function initialize_menu()
|
||||
//------------------------------------------------------------ related categories
|
||||
$block = $menu->get_block('mbRelatedCategories');
|
||||
|
||||
if ($block != null and !empty($page['items']))
|
||||
if (
|
||||
isset($page['items'])
|
||||
and count($page['items']) < $conf['related_albums_maximum_items_to_compute']
|
||||
and $block != null
|
||||
and !empty($page['items'])
|
||||
)
|
||||
{
|
||||
$exclude_cat_ids = array();
|
||||
if (isset($page['category']))
|
||||
|
||||
Reference in New Issue
Block a user