Add function is_webmaster (like is_admin function)

Add on ignore list the directory local/personal

git-svn-id: http://piwigo.org/svn/trunk@5272 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub 2010-03-23 05:56:50 +00:00
parent c0879165c6
commit a6c771547d
2 changed files with 10 additions and 1 deletions

View file

@ -1235,6 +1235,15 @@ function check_status($access_type, $user_status = '')
return is_autorize_status(ACCESS_ADMINISTRATOR, $user_status);
}
/*
* Return if user is, at least, a webmaster
* @return bool
*/
function is_webmaster($user_status = '')
{
return is_autorize_status(ACCESS_WEBMASTER, $user_status);
}
/*
* Return if current user is an adviser
* @return bool

View file

@ -294,7 +294,7 @@ if (isset($_POST['restore']) and !is_adviser())
// +-----------------------------------------------------------------------+
if (isset($_POST['submit']) and !is_adviser())
{
if ($user['status'] != 'webmaster')
if (!is_webmaster())
{
array_push($page['errors'], l10n('locfiledit_webmaster_only'));
}