(cp 7f00155) fixes #1780 automatically switch to the old album manager

This commit is contained in:
plegall
2022-11-08 12:18:12 +01:00
parent 10699b89f2
commit d8f3763fe6
3 changed files with 23 additions and 1 deletions
+19
View File
@@ -13,6 +13,25 @@ if (!defined('PHPWG_ROOT_PATH'))
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
$query = '
SELECT
COUNT(*)
FROM '.CATEGORIES_TABLE.'
;';
list($albums_counter) = pwg_db_fetch_row(pwg_query($query));
if ($albums_counter > $conf['light_album_manager_threshold'])
{
$url = get_root_url().'admin.php?page=cat_list';
if (isset($_GET['parent_id']))
{
$url.= '&parent_id='.$_GET['parent_id'];
}
redirect($url);
}
// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok |
// +-----------------------------------------------------------------------+