diff --git a/admin/user_list.php b/admin/user_list.php index c1e6fac2c..101c4df7a 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -46,10 +46,10 @@ function get_filtered_user_list() global $conf, $page; $users = array(); - + // filter $filter = array(); - + if (isset($_GET['username']) and !empty($_GET['username'])) { $username = str_replace('*', '%', $_GET['username']); @@ -83,7 +83,7 @@ function get_filtered_user_list() { $order_by = $_GET['order_by']; } - + $direction = 'ASC'; if (isset($_GET['direction']) and in_array($_GET['direction'], array_keys($page['direction_items']))) @@ -140,7 +140,7 @@ SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, $user_ids[$i] = $user['id']; } $user_nums = array_flip($user_ids); - + if (count($user_ids) > 0) { $query = ' @@ -157,7 +157,7 @@ SELECT user_id, group_id ); } } - + return $users; } @@ -220,7 +220,7 @@ $page['filtered_users'] = get_filtered_user_list(); if (isset($_POST['delete']) or isset($_POST['pref_submit'])) { $collection = array(); - + switch ($_POST['target']) { case 'all' : @@ -272,7 +272,7 @@ if (isset($_POST['delete']) and count($collection) > 0) $page['infos'], sprintf( l10n('%d users deleted'), - count($collection) + count($collection) ) ); foreach ($page['filtered_users'] as $filter_key => $filter_user) @@ -299,16 +299,16 @@ if (isset($_POST['pref_submit']) and count($collection) > 0) if (-1 != $_POST['associate']) { $datas = array(); - + $query = ' SELECT user_id FROM '.USER_GROUP_TABLE.' WHERE group_id = '.$_POST['associate'].' ;'; $associated = array_from_query($query, 'user_id'); - + $associable = array_diff($collection, $associated); - + if (count($associable) > 0) { foreach ($associable as $item) @@ -317,13 +317,13 @@ SELECT user_id array('group_id'=>$_POST['associate'], 'user_id'=>$item)); } - + mass_inserts(USER_GROUP_TABLE, array('group_id', 'user_id'), $datas); } } - + if (-1 != $_POST['dissociate']) { $query = ' @@ -333,23 +333,23 @@ DELETE FROM '.USER_GROUP_TABLE.' '; pwg_query($query); } - + // properties to set for the collection (a user list) $datas = array(); $dbfields = array('primary' => array('user_id'), 'update' => array()); - + $formfields = array('nb_image_line', 'nb_line_page', 'template', 'language', 'recent_period', 'maxwidth', 'expand', 'show_nb_comments', 'maxheight', 'status', 'enabled_high'); - + $true_false_fields = array('expand', 'show_nb_comments', 'enabled_high'); if ($conf['allow_adviser']) { array_push($formfields, 'adviser'); array_push($true_false_fields, 'adviser'); } - + foreach ($formfields as $formfield) { // special for true/false fields @@ -361,23 +361,23 @@ DELETE FROM '.USER_GROUP_TABLE.' { $test = $formfield.'_action'; } - + if ($_POST[$test] != 'leave') { array_push($dbfields['update'], $formfield); } } - + // updating elements is useful only if needed... if (count($dbfields['update']) > 0) { $datas = array(); - + foreach ($collection as $user_id) { $data = array(); $data['user_id'] = $user_id; - + // TODO : verify if submited values are semanticaly correct foreach ($dbfields['update'] as $dbfield) { @@ -404,7 +404,7 @@ DELETE FROM '.USER_GROUP_TABLE.' array_push($datas, $data); } - + mass_updates(USER_INFOS_TABLE, $dbfields, $datas); } @@ -457,16 +457,12 @@ $template->assign_vars( array( 'L_AUTH_USER'=>$lang['permuser_only_private'], 'L_GROUP_ADD_USER' => $lang['group_add_user'], - 'L_SUBMIT'=>$lang['submit'], 'L_STATUS'=>$lang['user_status'], - 'L_PASSWORD' => $lang['password'], - 'L_EMAIL' => $lang['mail_address'], 'L_ORDER_BY' => $lang['order_by'], 'L_ACTIONS' => $lang['actions'], 'L_PROPERTIES' => $lang['properties'], 'L_PERMISSIONS' => $lang['permissions'], 'L_USERS_LIST' => $lang['title_liste_users'], - 'L_LANGUAGE' => $lang['language'], 'L_NB_IMAGE_LINE' => $lang['nb_image_per_row'], 'L_NB_LINE_PAGE' => $lang['nb_row_per_page'], 'L_TEMPLATE' => $lang['theme'], @@ -475,15 +471,11 @@ $template->assign_vars( 'L_SHOW_NB_COMMENTS' => $lang['show_nb_comments'], 'L_MAXWIDTH' => $lang['maxwidth'], 'L_MAXHEIGHT' => $lang['maxheight'], - 'L_YES' => $lang['yes'], - 'L_NO' => $lang['no'], - 'L_SUBMIT' => $lang['submit'], - 'L_RESET' => $lang['reset'], 'L_DELETE' => $lang['user_delete'], 'L_DELETE_HINT' => $lang['user_delete_hint'], 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=user_list', - + 'F_ADD_ACTION' => $base_url, 'F_USERNAME' => @$_GET['username'], 'F_FILTER_ACTION' => PHPWG_ROOT_PATH.'admin.php' @@ -634,7 +626,7 @@ foreach (get_pwg_themes() as $pwg_template) { $selected = ''; } - + $template->assign_block_vars( $blockname, array( @@ -660,7 +652,7 @@ foreach (get_languages() as $language_code => $language_name) { $selected = ''; } - + $template->assign_block_vars( $blockname, array( @@ -721,7 +713,7 @@ foreach ($groups as $group_id => $group_name) { $selected = ''; } - + $template->assign_block_vars( $blockname, array( @@ -752,7 +744,7 @@ foreach ($groups as $group_id => $group_name) { $selected = ''; } - + $template->assign_block_vars( $blockname, array( diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php index 5f6430ff2..d3f0c357e 100644 --- a/language/en_UK.iso-8859-1/common.lang.php +++ b/language/en_UK.iso-8859-1/common.lang.php @@ -420,14 +420,12 @@ $lang['comments'] = 'Comments'; $lang['comments_add'] = 'Add a comment'; $lang['comments_del'] = 'delete this comment'; $lang['comments_title'] = 'Comments from the users of the site'; -$lang['confirm_password_hint'] = 'You only have to confirm your new password if you wish to change it.'; $lang['created after %s (%s)'] = 'created after %s (%s)'; $lang['created before %s (%s)'] = 'created before %s (%s)'; $lang['created between %s (%s) and %s (%s)'] = 'created between %s (%s) and %s (%s)'; $lang['created on %s'] = 'created on %s'; $lang['customize'] = 'Customize'; $lang['customize_page_title'] = 'Your Gallery Customization '; -$lang['customize_title'] = 'Customization'; $lang['day'][0] = 'Sunday'; $lang['day'][1] = 'Monday'; $lang['day'][2] = 'Tuesday'; @@ -501,7 +499,6 @@ $lang['nb_line_page_error'] = 'The number of rows per page must be a not null sc $lang['nb_row_per_page'] = 'Number of rows per page'; $lang['nbm_unknown_identifier'] = 'Unknown identifier'; $lang['new_password'] = 'New password'; -$lang['new_password_hint'] = 'You only have to give a password if you wish to change it.'; $lang['new_rate'] = 'Rate this picture'; $lang['next_page'] = 'Next'; $lang['no'] = 'No'; @@ -510,8 +507,6 @@ $lang['no_rate'] = 'no rate'; $lang['notification'] = 'notification'; $lang['only_members'] = 'Only members can access this page'; $lang['password updated'] = 'password updated'; -$lang['password'] = 'Password'; -$lang['password_hint'] = 'You only have to give your password if you wish to change your e-mail'; $lang['periods_error'] = 'Recent period must be a positive integer value'; $lang['picture'] = 'picture'; $lang['picture_high'] = 'Click on the picture to see it in high definition'; @@ -529,7 +524,6 @@ $lang['recent_period'] = 'Recent period'; $lang['recent_pics_cat'] = 'Last pictures'; $lang['recent_pics_cat_hint'] = 'displays most recent pictures'; $lang['redirect_msg'] = 'Redirection...'; -$lang['reg_confirm'] = 'Confirm password'; $lang['reg_err_login1'] = 'Please, enter a login'; $lang['reg_err_login2'] = 'login mustn\'t end with a space character'; $lang['reg_err_login3'] = 'login mustn\'t start with a space character'; diff --git a/language/fr_FR.iso-8859-1/common.lang.php b/language/fr_FR.iso-8859-1/common.lang.php index 45d9025b3..de26cadce 100644 --- a/language/fr_FR.iso-8859-1/common.lang.php +++ b/language/fr_FR.iso-8859-1/common.lang.php @@ -419,14 +419,12 @@ $lang['comments'] = 'Commentaires'; $lang['comments_add'] = 'Ajouter un commentaire'; $lang['comments_del'] = 'Supprimer ce commentaire'; $lang['comments_title'] = 'Commentaires des utilisateurs'; -$lang['confirm_password_hint'] = 'Vous n\'avez à confirmer votre mot de passe que si vous désirez en changer.'; $lang['created after %s (%s)'] = 'créée après le %s (%s)'; $lang['created before %s (%s)'] = 'créée avant le %s (%s)'; $lang['created between %s (%s) and %s (%s)'] = 'créée entre le %s (%s) et le %s (%s)'; $lang['created on %s'] = 'créée le %s'; $lang['customize'] = 'Personnaliser'; $lang['customize_page_title'] = 'Personnalisation de votre affichage '; -$lang['customize_title'] = 'Personnaliser'; $lang['day'][0] = 'Dimanche'; $lang['day'][1] = 'Lundi'; $lang['day'][2] = 'Mardi'; @@ -500,7 +498,6 @@ $lang['nb_line_page_error'] = 'Le nombre de lignes par page doit $lang['nb_row_per_page'] = 'Nombre de lignes par page'; $lang['nbm_unknown_identifier'] = 'Identifiants inconnus'; $lang['new_password'] = 'Nouveau mot de passe'; -$lang['new_password_hint'] = 'Vous n\'avez à confirmer votre mot de passe que si vous désirez en changer.'; $lang['new_rate'] = 'Votez pour cette image'; $lang['next_page'] = 'Suivant'; $lang['no'] = 'Non'; @@ -509,8 +506,6 @@ $lang['no_rate'] = 'pas de note'; $lang['notification'] = 'notification'; $lang['only_members'] = 'Seuls les membres enregistrés peuvent accéder à cette page'; $lang['password updated'] = 'mot de passe mis à jour'; -$lang['password'] = 'Mot de passe'; -$lang['password_hint'] = 'Vous n\'avez à donner votre mot de passe que si vous désirez en changer.'; $lang['periods_error'] = 'La période de nouveauté doit être un entier positif'; $lang['picture'] = 'image'; $lang['picture_high'] = 'Cliquer sur l\'image pour la visualiser en haute définition'; @@ -528,7 +523,6 @@ $lang['recent_period'] = 'P $lang['recent_pics_cat'] = 'Dernières images'; $lang['recent_pics_cat_hint'] = 'afficher les images les plus récentes'; $lang['redirect_msg'] = 'Redirection...'; -$lang['reg_confirm'] = 'Confirmer le mot de passe'; $lang['reg_err_login1'] = 'S\'il vous plaît, entrer un nom utilisateur'; $lang['reg_err_login2'] = 'le nom utilisateur ne doit pas se terminer par un espace'; $lang['reg_err_login3'] = 'le nom utilisateur ne doit pas commencer par un espace'; diff --git a/profile.php b/profile.php index 7499d07f3..532964fe1 100644 --- a/profile.php +++ b/profile.php @@ -63,7 +63,7 @@ if (isset($_POST['validate'])) { array_push($errors, $lang['nb_line_page_error']); } - + if ($_POST['maxwidth'] != '' and (!preg_match($int_pattern, $_POST['maxwidth']) or $_POST['maxwidth'] < 50)) @@ -88,7 +88,7 @@ if (isset($_POST['validate'])) { array_push($errors, $mail_error); } - + if (!empty($_POST['use_new_pwd'])) { // password must be the same as its confirmation @@ -97,7 +97,7 @@ if (isset($_POST['validate'])) array_push($errors, l10n('New password confirmation does not correspond')); } - + // changing password requires old password $query = ' SELECT '.$conf['user_fields']['password'].' AS password @@ -105,18 +105,18 @@ SELECT '.$conf['user_fields']['password'].' AS password WHERE '.$conf['user_fields']['id'].' = \''.$userdata['id'].'\' ;'; list($current_password) = mysql_fetch_row(pwg_query($query)); - + if ($conf['pass_convert']($_POST['password']) != $current_password) { array_push($errors, l10n('Current password is wrong')); } } - + if (count($errors) == 0) { // mass_updates function include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); - + // update common user informations $fields = array($conf['user_fields']['email']); @@ -136,16 +136,16 @@ SELECT '.$conf['user_fields']['password'].' AS password array('primary' => array($conf['user_fields']['id']), 'update' => $fields), array($data)); - + // update user "additional" informations (specific to PhpWebGallery) $fields = array( 'nb_image_line', 'nb_line_page', 'language', 'maxwidth', 'maxheight', 'expand', 'show_nb_comments', 'recent_period', 'template' ); - + $data = array(); $data['user_id'] = $_POST['userid']; - + foreach ($fields as $field) { if (isset($_POST[$field])) @@ -156,7 +156,7 @@ SELECT '.$conf['user_fields']['password'].' AS password mass_updates(USER_INFOS_TABLE, array('primary' => array('user_id'), 'update' => $fields), array($data)); - + // redirection redirect(make_index_url()); } @@ -175,10 +175,10 @@ $url_action = PHPWG_ROOT_PATH.'profile.php'; $template->set_filenames(array('profile_body'=>'profile.tpl')); $expand = ($userdata['expand'] == 'true') ? 'EXPAND_TREE_YES':'EXPAND_TREE_NO'; - + $nb_comments = ($userdata['show_nb_comments'] == 'true') ? 'NB_COMMENTS_YES':'NB_COMMENTS_NO'; - + $template->assign_vars( array( 'USERNAME'=>$userdata['username'], @@ -189,39 +189,12 @@ $template->assign_vars( 'RECENT_PERIOD'=>$userdata['recent_period'], 'MAXWIDTH'=>@$userdata['maxwidth'], 'MAXHEIGHT'=>@$userdata['maxheight'], - + $expand=>'checked="checked"', $nb_comments=>'checked="checked"', - - 'L_TITLE' => $lang['customize_title'], - 'L_REGISTRATION_INFO' => $lang['register_title'], - 'L_PREFERENCES' => $lang['preferences'], - 'L_USERNAME' => $lang['Username'], - 'L_EMAIL' => $lang['mail_address'], - 'L_CURRENT_PASSWORD' => $lang['password'], - 'L_CURRENT_PASSWORD_HINT' => $lang['password_hint'], - 'L_NEW_PASSWORD' => $lang['new_password'], - 'L_NEW_PASSWORD_HINT' => $lang['new_password_hint'], - 'L_CONFIRM_PASSWORD' => $lang['reg_confirm'], - 'L_CONFIRM_PASSWORD_HINT' => $lang['confirm_password_hint'], - 'L_LANG_SELECT'=>$lang['language'], - 'L_NB_IMAGE_LINE'=>$lang['nb_image_per_row'], - 'L_NB_ROW_PAGE'=>$lang['nb_row_per_page'], - 'L_STYLE_SELECT'=>$lang['theme'], - 'L_RECENT_PERIOD'=>$lang['recent_period'], - 'L_EXPAND_TREE'=>$lang['auto_expand'], - 'L_NB_COMMENTS'=>$lang['show_nb_comments'], - 'L_MAXWIDTH'=>$lang['maxwidth'], - 'L_MAXHEIGHT'=>$lang['maxheight'], - 'L_YES'=>$lang['yes'], - 'L_NO'=>$lang['no'], - 'L_SUBMIT'=>$lang['submit'], - 'L_RESET'=>$lang['reset'], - 'L_RETURN' => $lang['home'], - 'L_RETURN_HINT' => $lang['home_hint'], 'U_RETURN' => make_index_url(), - + 'F_ACTION'=>$url_action, )); @@ -241,7 +214,7 @@ foreach (get_pwg_themes() as $pwg_template) { $selected = ''; } - + $template->assign_block_vars( $blockname, array( @@ -267,7 +240,7 @@ foreach (get_languages() as $language_code => $language_name) { $selected = ''; } - + $template->assign_block_vars( $blockname, array( diff --git a/template/yoga/admin/user_list.tpl b/template/yoga/admin/user_list.tpl index e6c1e81b6..fc7c26a04 100644 --- a/template/yoga/admin/user_list.tpl +++ b/template/yoga/admin/user_list.tpl @@ -9,12 +9,12 @@
{lang:Add a user} - - + +
-
+
{lang:Filter} @@ -57,7 +57,7 @@ - +
@@ -70,7 +70,7 @@   {lang:Username} {L_STATUS} - {L_EMAIL} + {lang:Email address} {lang:Groups} {L_PROPERTIES} {L_ACTIONS} @@ -122,8 +122,8 @@ / {lang:set to} - - + + @@ -174,8 +174,8 @@ / {lang:set to} - - + + @@ -223,7 +223,7 @@ - {L_LANGUAGE} + {lang:language} @@ -250,8 +250,8 @@ / {lang:set to} - - + + @@ -260,8 +260,8 @@ / {lang:set to} - - + + @@ -300,8 +300,8 @@

- - + +

diff --git a/template/yoga/identification.tpl b/template/yoga/identification.tpl index 1a474ad18..7c8f6e0c3 100644 --- a/template/yoga/identification.tpl +++ b/template/yoga/identification.tpl @@ -36,7 +36,7 @@
  • - +
  • diff --git a/template/yoga/menubar.tpl b/template/yoga/menubar.tpl index bb7bc2db2..6066d18d2 100644 --- a/template/yoga/menubar.tpl +++ b/template/yoga/menubar.tpl @@ -99,7 +99,7 @@ diff --git a/template/yoga/profile.tpl b/template/yoga/profile.tpl index cfcce030e..1b2037d71 100644 --- a/template/yoga/profile.tpl +++ b/template/yoga/profile.tpl @@ -20,7 +20,7 @@
    - {L_REGISTRATION_INFO} + {lang:register_title}
    - {L_PREFERENCES} + {lang:preferences}

    - - + +