- new feature : use Apache authentication. If $conf['apache_authentication']
is set true : if no user matches $_SERVER['REMOTE_USER'] in "users" table, PWG automatically creates one. This way, users can customize the behaviour of the application. - template : new organisation of identification menu (category.php). Simplification is required for Apache authentication (no logout link even if user is externally logged in) - new : usernames can contain quotes (required because Apache authentication authorized quotes in usernames) git-svn-id: http://piwigo.org/svn/trunk@804 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
eb189de800
commit
e96510957c
7 changed files with 117 additions and 50 deletions
27
category.php
27
category.php
|
|
@ -254,21 +254,32 @@ $template->assign_block_vars(
|
|||
));
|
||||
//--------------------------------------------------------------------- summary
|
||||
|
||||
if ( !$user['is_the_guest'] )
|
||||
if ($user['is_the_guest'])
|
||||
{
|
||||
$template->assign_block_vars('logout',array());
|
||||
// administration link
|
||||
if ( $user['status'] == 'admin' )
|
||||
$template->assign_block_vars('register', array());
|
||||
$template->assign_block_vars('login', array());
|
||||
|
||||
$template->assign_block_vars('quickconnect', array());
|
||||
if ($conf['authorize_remembering'])
|
||||
{
|
||||
$template->assign_block_vars('logout.admin', array());
|
||||
$template->assign_block_vars('quickconnect.remember_me', array());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_block_vars('login',array());
|
||||
if ($conf['authorize_remembering'])
|
||||
$template->assign_block_vars('hello', array());
|
||||
$template->assign_block_vars('profile', array());
|
||||
|
||||
// the logout link has no meaning with Apache authentication : it is not
|
||||
// possible to logout with this kind of authentication.
|
||||
if (!$conf['apache_authentication'])
|
||||
{
|
||||
$template->assign_block_vars('login.remember_me',array());
|
||||
$template->assign_block_vars('logout', array());
|
||||
}
|
||||
|
||||
if ('admin' == $user['status'])
|
||||
{
|
||||
$template->assign_block_vars('admin', array());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue