- bug 173 fixed: due to phpBB user identifiers management, the method to
find the next user identifier has changer to MAX+1. - improvement: information message when new user added - bug fixed: language item "Username" used instead of "login". git-svn-id: http://piwigo.org/svn/trunk@906 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
56f29767a8
commit
11615fcba6
6 changed files with 41 additions and 10 deletions
|
@ -188,6 +188,17 @@ $page['filtered_users'] = get_filtered_user_list();
|
|||
if (isset($_POST['submit_add']))
|
||||
{
|
||||
$page['errors'] = register_user($_POST['login'], $_POST['password'], '');
|
||||
|
||||
if (count($page['errors']) == 0)
|
||||
{
|
||||
array_push(
|
||||
$page['infos'],
|
||||
sprintf(
|
||||
l10n('user "%s" added'),
|
||||
$_POST['login']
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
@ -409,7 +420,6 @@ $template->assign_vars(
|
|||
'L_GROUP_ADD_USER' => $lang['group_add_user'],
|
||||
'L_SUBMIT'=>$lang['submit'],
|
||||
'L_STATUS'=>$lang['user_status'],
|
||||
'L_USERNAME' => $lang['login'],
|
||||
'L_PASSWORD' => $lang['password'],
|
||||
'L_EMAIL' => $lang['mail_address'],
|
||||
'L_ORDER_BY' => $lang['order_by'],
|
||||
|
|
|
@ -1,10 +1,21 @@
|
|||
2005-10-22 Pierrick LE GALL
|
||||
|
||||
* bug 173 fixed: due to phpBB user identifiers management, the
|
||||
method to find the next user identifier has changer to MAX+1.
|
||||
|
||||
* improvement: information message when new user added
|
||||
|
||||
* bug fixed: language item "Username" used instead of "login".
|
||||
|
||||
2005-10-20 chrisaga
|
||||
|
||||
* bug 176 fixed: need a javascript to handle transparent PNG background in IE
|
||||
(tribute to Bob Osola http://homepage.ntlworld.com/bobosola/index.htm
|
||||
* bug 176 fixed: need a javascript to handle transparent PNG
|
||||
background in IE (tribute to Bob Osola
|
||||
http://homepage.ntlworld.com/bobosola/index.htm)
|
||||
|
||||
* display: fixed another IE childselector bug in Categories Management admin page
|
||||
and improved display of this page in all browsers too.
|
||||
* display: fixed another IE childselector bug in Categories
|
||||
Management admin page and improved display of this page in all
|
||||
browsers too.
|
||||
|
||||
2005-10-18 Pierrick LE GALL
|
||||
|
||||
|
|
|
@ -76,8 +76,16 @@ function register_user($login, $password, $mail_address)
|
|||
// if no error until here, registration of the user
|
||||
if (count($errors) == 0)
|
||||
{
|
||||
// what will be the inserted id ?
|
||||
$query = '
|
||||
SELECT MAX('.$conf['user_fields']['id'].') + 1
|
||||
FROM '.USERS_TABLE.'
|
||||
;';
|
||||
list($next_id) = mysql_fetch_array(pwg_query($query));
|
||||
|
||||
$insert =
|
||||
array(
|
||||
$conf['user_fields']['id'] => $next_id,
|
||||
$conf['user_fields']['username'] => mysql_escape_string($login),
|
||||
$conf['user_fields']['password'] => $conf['pass_convert']($password),
|
||||
$conf['user_fields']['email'] => $mail_address
|
||||
|
@ -86,9 +94,9 @@ function register_user($login, $password, $mail_address)
|
|||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
mass_inserts(USERS_TABLE, array_keys($insert), array($insert));
|
||||
|
||||
create_user_infos(mysql_insert_id());
|
||||
create_user_infos($next_id);
|
||||
}
|
||||
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
|
|
|
@ -354,6 +354,7 @@ $lang['update_used_metadata'] = 'Used metadata';
|
|||
$lang['update_wrong_dirname_info'] = 'The name of directories and files must be composed of letters, figures, "-", "_" or "."';
|
||||
$lang['update_wrong_dirname_short'] = 'wrong filename';
|
||||
$lang['upload'] = 'Upload';
|
||||
$lang['user "%s" added'] = 'user "%s" added';
|
||||
$lang['user_delete'] = 'Delete user';
|
||||
$lang['user_delete_hint'] = 'Click here to delete this user. Warning! This operation cannot be undone!';
|
||||
$lang['user_id URL parameter is missing'] = 'user_id URL parameter is missing';
|
||||
|
|
|
@ -352,6 +352,7 @@ $lang['update_used_metadata'] = 'M
|
|||
$lang['update_wrong_dirname_info'] = 'Le nom des répertoires et des fichiers ne doit être constitué que de lettres, de chiffres, de "-", "_" et "."';
|
||||
$lang['update_wrong_dirname_short'] = 'nom de fichier erroné';
|
||||
$lang['upload'] = 'Ajout';
|
||||
$lang['user "%s" added'] = 'utilisateur "%s" ajouté';
|
||||
$lang['user_delete'] = 'Supprimer utilisateur';
|
||||
$lang['user_delete_hint'] = 'Cliquer ici pour supprimer cet utilisateur. Attention : cette opération ne peut pas être annulée !';
|
||||
$lang['user_id URL parameter is missing'] = 'le paramètre d\'URL "user_id" manque';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<form class="filter" method="post" name="add_user" action="{F_ADD_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{lang:Add a user}</legend>
|
||||
<label>{L_USERNAME} <input type="text" name="login" maxlength="50" size="20" /></label>
|
||||
<label>{lang:Username} <input type="text" name="login" maxlength="50" size="20" /></label>
|
||||
<label>{L_PASSWORD} <input type="text" name="password" /></label>
|
||||
<input type="submit" name="submit_add" value="{L_SUBMIT}" />
|
||||
</fieldset>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<legend>{lang:Filter}</legend>
|
||||
|
||||
|
||||
<label>{lang:username} <input type="text" name="username" value="{F_USERNAME}" /></label>
|
||||
<label>{lang:Username} <input type="text" name="username" value="{F_USERNAME}" /></label>
|
||||
|
||||
<label>
|
||||
{lang:status}
|
||||
|
@ -76,7 +76,7 @@
|
|||
<table class="table2">
|
||||
<tr class="throw">
|
||||
<th> </th>
|
||||
<th>{L_USERNAME}</th>
|
||||
<th>{lang:Username}</th>
|
||||
<th>{L_STATUS}</th>
|
||||
<th>{L_EMAIL}</th>
|
||||
<th>{lang:Groups}</th>
|
||||
|
|
Loading…
Add table
Reference in a new issue