Resolved Issue ID 0000456, 0000457, 0000459, 0000465:

o Fix bugs adviser mode



git-svn-id: http://piwigo.org/svn/trunk@1458 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub
2006-07-11 20:51:24 +00:00
parent cfcb489cfa
commit 8a7fff22b0
9 changed files with 42 additions and 14 deletions
+11 -3
View File
@@ -171,7 +171,15 @@ order by
)
);
array_push($page['infos'], sprintf(l10n('nbm_user_x_added'), $nbm_user['username'], $nbm_user['mail_address']));
array_push
(
$page['infos'],
sprintf(
l10n('nbm_user_x_added'),
$nbm_user['username'],
get_email_address_as_display_text($nbm_user['mail_address'])
)
);
}
// Insert new nbm_users
@@ -579,7 +587,7 @@ switch ($page['mode'])
: (isset($_POST['trueify']) and isset($_POST['cat_false']) and in_array($nbm_user['check_key'], $_POST['cat_false']))
) ? 'selected="selected"' : '',
'VALUE' => $nbm_user['check_key'],
'OPTION' => $nbm_user['username'].'['.$nbm_user['mail_address'].']'
'OPTION' => $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']'
));
}
@@ -621,7 +629,7 @@ switch ($page['mode'])
!in_array($nbm_user['check_key'], $_POST['send_selection']) // not selected
) ? '' : 'checked="checked"',
'USERNAME'=> $nbm_user['username'],
'EMAIL' => $nbm_user['mail_address'],
'EMAIL' => get_email_address_as_display_text($nbm_user['mail_address']),
'LAST_SEND'=> $nbm_user['last_send']
));
}
+1 -1
View File
@@ -74,7 +74,7 @@ if (isset($_GET['users']))
}
}
if (isset($_GET['del']))
if (isset($_GET['del']) and !is_adviser())
{
$del_params = urldecode( $_GET['del'] );
parse_str($del_params, $vars);
+1 -1
View File
@@ -162,7 +162,7 @@ if (isset($_GET['site']) and is_numeric($_GET['site']))
{
$page['site'] = $_GET['site'];
}
if (isset($_GET['action']) and isset($page['site']) )
if (isset($_GET['action']) and isset($page['site']) and !is_adviser())
{
$query = '
SELECT galleries_url
+2 -1
View File
@@ -111,8 +111,9 @@ if (isset($_POST['submit']))
{
$general_failure = false;
}
// shall we simulate only
if (isset($_POST['simulate']) and $_POST['simulate'] == 1)
if ((isset($_POST['simulate']) and $_POST['simulate'] == 1) or is_adviser())
{
$simulate = true;
}
+1 -1
View File
@@ -823,7 +823,7 @@ foreach ($page['filtered_users'] as $num => $local_user)
'U_PERM' => $perm_url.$local_user['id'],
'USERNAME' => $local_user['username'],
'STATUS' => $lang['user_status_'.$local_user['status']].(($local_user['adviser'] == 'true') ? ' ['.$lang['adviser'].']' : ''),
'EMAIL' => isset($local_user['email']) ? $local_user['email'] : '',
'EMAIL' => isset($local_user['email']) ? get_email_address_as_display_text($local_user['email']) : '',
'GROUPS' => $groups_string,
'PROPERTIES' => (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) ? $lang['is_high_enabled'] : $lang['is_high_disabled']
)
+1 -1
View File
@@ -195,7 +195,7 @@ while ( $row = mysql_fetch_array( $result ) )
(strlen($row['file']) > 10) ?
(substr($row['file'], 0, 10)).'...' : $row['file'],
'PREVIEW_URL_IMG'=>$preview_url,
'UPLOAD_EMAIL'=>$row['mail_address'],
'UPLOAD_EMAIL'=>get_email_address_as_display_text($row['mail_address']),
'UPLOAD_USERNAME'=>$row['username']
)
);