fixes #178, hide menu identification on identification page

+ redirect to gallery root when opening idenfication page while identified
This commit is contained in:
plegall
2017-03-02 14:25:01 +01:00
parent ea7e6d76e6
commit 4d800292c2
2 changed files with 14 additions and 1 deletions
+7
View File
@@ -30,6 +30,13 @@ include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
// +-----------------------------------------------------------------------+
check_status(ACCESS_FREE);
// but if the user is already identified, we redirect to gallery home
// instead of displaying the log in form
if (!is_a_guest())
{
redirect(get_gallery_home_url());
}
trigger_notify('loc_begin_identification');
//-------------------------------------------------------------- identification
+7 -1
View File
@@ -515,7 +515,13 @@ function register_default_menubar_blocks($menu_ref_arr)
$menu->register_block( new RegisteredBlock( 'mbTags', 'Related tags', 'piwigo'));
$menu->register_block( new RegisteredBlock( 'mbSpecials', 'Specials', 'piwigo'));
$menu->register_block( new RegisteredBlock( 'mbMenu', 'Menu', 'piwigo'));
$menu->register_block( new RegisteredBlock( 'mbIdentification', 'Identification', 'piwigo') );
// We hide the quick identification menu on the identification page. It
// would be confusing.
if (script_basename() != 'identification')
{
$menu->register_block( new RegisteredBlock( 'mbIdentification', 'Identification', 'piwigo') );
}
}
/**