mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #1780 automatically switch to the old album manager
This commit is contained in:
@@ -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 |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
@@ -226,7 +226,7 @@ $template->assign(
|
||||
'U_ADD_PHOTOS_ALBUM' => $base_url.'photos_add&album='.$category['id'],
|
||||
'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'],
|
||||
'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_modify',
|
||||
'U_MOVE' => $base_url.'albums#cat-'.$category['id'],
|
||||
'U_MOVE' => $base_url.'albums&parent_id='.$category['id'].'#cat-'.$category['id'],
|
||||
|
||||
'F_ACTION' => $form_action,
|
||||
)
|
||||
|
||||
@@ -98,6 +98,9 @@ $conf['newcat_default_status'] = 'public';
|
||||
// newcat_default_position : at creation, should the album appear at the first or last position ?
|
||||
$conf['newcat_default_position'] = 'first';
|
||||
|
||||
// above which number of albums should Piwigo use the lighter album manager
|
||||
$conf['light_album_manager_threshold'] = 2000;
|
||||
|
||||
// level_separator : character string used for separating a category level
|
||||
// to the sub level. Suggestions : ' / ', ' » ', ' → ', ' - ',
|
||||
// ' >'
|
||||
|
||||
Reference in New Issue
Block a user