Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- security fix (profile)
- les langues a la hache
- fix some copy/paste errors

git-svn-id: http://piwigo.org/svn/trunk@2268 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Mar 8, 2008
1 parent a048738 commit bf1f7c4
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 189 deletions.
13 changes: 6 additions & 7 deletions admin/group_perm.php
Expand Up @@ -47,8 +47,7 @@
}
else
{
echo l10n('group_id URL parameter is missing');
exit();
die('group_id URL parameter is missing');
}

// +-----------------------------------------------------------------------+
Expand Down Expand Up @@ -93,19 +92,19 @@
// an error (in SQL statement), so we need to know which categories are
// accesible
$authorized_ids = array();

$query = '
SELECT cat_id
FROM '.GROUP_ACCESS_TABLE.'
WHERE group_id = '.$page['group'].'
;';
$result = pwg_query($query);

while ($row = mysql_fetch_array($result))
{
array_push($authorized_ids, $row['cat_id']);
}

$inserts = array();
$to_autorize_ids = array_diff($private_uppercats, $authorized_ids);
foreach ($to_autorize_ids as $to_autorize_id)
Expand Down Expand Up @@ -144,14 +143,14 @@
'L_CAT_OPTIONS_TRUE'=>l10n('authorized'),
'L_CAT_OPTIONS_FALSE'=>l10n('forbidden'),
'L_CAT_OPTIONS_INFO'=>l10n('permuser_info'),

'F_ACTION' =>
PHPWG_ROOT_PATH.
'admin.php?page=group_perm&group_id='.
$page['group']
)
);

// only private categories are listed
$query_true = '
SELECT id,name,uppercats,global_rank
Expand Down
2 changes: 1 addition & 1 deletion comments.php
Expand Up @@ -172,7 +172,7 @@
// | page header and options |
// +-----------------------------------------------------------------------+

$title= l10n('title_comments');
$title= l10n('User comments');
$page['body_id'] = 'theCommentsPage';

$template->set_filenames(array('comments'=>'comments.tpl'));
Expand Down
9 changes: 4 additions & 5 deletions include/functions_user.inc.php
Expand Up @@ -96,7 +96,7 @@ function register_user($login, $password, $mail_address,
$errors = trigger_event('register_user_check',
$errors,
array(
'login'=>$login,
'username'=>$login,
'password'=>$password,
'email'=>$mail_address,
)
Expand Down Expand Up @@ -159,21 +159,20 @@ function register_user($login, $password, $mail_address,
if ($with_notification and $conf['email_admin_on_new_user'])
{
include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
$username = $_POST['login'];
$admin_url = get_absolute_root_url()
.'admin.php?page=user_list&username='.$username;
.'admin.php?page=user_list&username='.$login;

$keyargs_content = array
(
get_l10n_args('User: %s', $username),
get_l10n_args('User: %s', $login),
get_l10n_args('Email: %s', $_POST['mail_address']),
get_l10n_args('', ''),
get_l10n_args('Admin: %s', $admin_url)
);

pwg_mail_notification_admins
(
get_l10n_args('Registration of %s', $username),
get_l10n_args('Registration of %s', $login),
$keyargs_content
);
}
Expand Down
48 changes: 13 additions & 35 deletions language/en_UK/admin.lang.php
Expand Up @@ -137,7 +137,6 @@
$lang['Operating system'] = 'Operating system';
$lang['Options'] = 'Options';
$lang['Order alphanumerically'] = 'Order alphanumerically';
$lang['Order by'] = 'Order by';
$lang['Other private categories'] = 'Other private categories';
$lang['Page banner'] = 'Page banner';
$lang['Parent category'] = 'Parent category';
Expand Down Expand Up @@ -203,8 +202,6 @@
$lang['You cannot delete your account'] = "You cannot delete your account";
$lang['You cannot move a category in its own sub category'] = 'You cannot move a category in its own sub category';
$lang['You need to confirm deletion'] = 'You need to confirm deletion';
$lang['actions'] = 'Actions';
$lang['add keywords'] = 'add keywords';
$lang['add tags'] = 'add tags';
$lang['adviser'] = 'Adviser';
$lang['associate to category'] = 'associate to category';
Expand Down Expand Up @@ -239,10 +236,8 @@
$lang['dissociate from category'] = 'dissociate from category';
$lang['dissociate from group'] = 'dissociate from group';
$lang['edit category permissions'] = 'edit category permissions';
$lang['edit'] = 'Edit';
$lang['editcat_confirm'] = 'Category informations updated successfully.';
$lang['editcat_uploadable'] = 'Authorize upload';
$lang['elements per line'] = 'elements per line';
$lang['elements per page'] = 'elements per page';
$lang['elements'] = 'elements';
$lang['enabled_high'] = 'High definition enabled';
Expand All @@ -258,7 +253,6 @@
$lang['group'] = 'group';
$lang['group_add_error1'] = 'The name of a group must not contain " or \' or be empty.';
$lang['group_add_error2'] = 'This name is already used by another group.';
$lang['group_id URL parameter is missing'] = 'group_id URL parameter is missing';
$lang['groups'] = 'Groups';
$lang['history'] = 'History';
$lang['instructions'] = 'Instructions';
Expand All @@ -274,9 +268,6 @@
$lang['manage'] = 'Manage';
$lang['maximum height'] = 'maximum height';
$lang['maximum width'] = 'maximum width';
$lang['metadata_basic'] = 'basic';
$lang['metadata_exif'] = 'EXIF';
$lang['metadata_iptc'] = 'IPTC';
$lang['name'] = 'name';
$lang['nbm_background_treatment_redirect_second'] = 'Execution time is out, treatment must be continue [Estmated time: %d second].';
$lang['nbm_background_treatment_redirect_seconds'] = 'Execution time is out, treatment must be continue [Estmated time: %d seconds].';
Expand Down Expand Up @@ -324,15 +315,13 @@
$lang['nbm_param_mode'] = 'Parameter';
$lang['nbm_redirect_msg'] = 'Processing treatment.'."\n\n".'Please wait...';
$lang['nbm_repost_submit'] = 'Continue processing treatment';
$lang['nbm_send_check_all'] = 'Check All';
$lang['nbm_send_complementary_mail_content'] = 'Complementary mail content';
$lang['nbm_send_detailed_content'] = 'Add detailed content';
$lang['nbm_send_mail_as'] = 'Send mail as';
$lang['nbm_send_mail_to_users'] = 'Send mail to users';
$lang['nbm_send_mode'] = 'Send';
$lang['nbm_send_options'] = 'Options';
$lang['nbm_send_submit'] = 'Send';
$lang['nbm_send_uncheck_all'] = 'Uncheck All';
$lang['nbm_subscribe_col'] = 'Subscribed';
$lang['nbm_subscribe_mode'] = 'Subscribe';
$lang['nbm_title_param'] = 'Parameters';
Expand Down Expand Up @@ -376,7 +365,6 @@
$lang['remote_site_test'] = 'test';
$lang['remote_site_test_hint'] = 'test this remote site';
$lang['remote_site_uncorrect_url'] = 'Remote site url must start by http or https and must only contain characters among "/", "a-zA-Z0-9", "-" or "_"';
$lang['remove keyword'] = 'remove keyword';
$lang['remove tags'] = 'remove tags';
$lang['repair and optimize database'] = 'Repair and optimize database';
$lang['selection'] = 'selection';
Expand Down Expand Up @@ -406,9 +394,8 @@
$lang['title_configuration'] = 'PhpWebGallery configuration';
$lang['title_default'] = 'PhpWebGallery administration';
$lang['title_edit_cat'] = 'Edit a category';
$lang['title_groups'] = 'Groups management';
$lang['title_history'] = 'History';
$lang['title_liste_users'] = 'Users list';
$lang['title_groups'] = 'Group management';
$lang['title_liste_users'] = 'User list';
$lang['title_picmod'] = 'Modify informations about a picture';
$lang['title_thumbnails'] = 'Thumbnail creation';
$lang['title_update'] = 'Database synchronization with files';
Expand Down Expand Up @@ -487,19 +474,13 @@
$lang['username'] = 'username';
$lang['users'] = 'Users';
$lang['virtual_category'] = 'Virtual category';
$lang['visitors'] = 'Visitors';
$lang['w_day'] = 'Day';
$lang['waiting'] = 'Waiting';
$lang['is_default_group'] = 'default';
$lang['toggle_is_default_group'] = 'Toggle \'default group\' property';
$lang['Advanced_features'] = 'Advanced features';
$lang['Elements_not_linked'] = 'Not linked elements';
$lang['web_services'] = 'Web services ';
$lang['title_wscheck'] = ' Access management ';
$lang['ws_set_status'] = ' Environment ';
$lang['ws_enable'] = ' Enable ';
$lang['ws_disable'] = ' Disable ';
$lang['ws set to'] = ' Environment temporary set ';
$lang['ws_failed_upd'] = ' -> <strong>Uncompleted demand</strong> ';
$lang['ws_success_upd'] = ' -> Successfully completed ';
$lang['ws_adding_legend'] = ' Add a new partner access to Web Services ';
Expand All @@ -514,7 +495,6 @@
$lang['ws_Limit'] = ' Limit ';
$lang['ws_Comment'] = ' Comment ';
$lang['Modify End from Now +'] = 'Modify End from Now + ';
$lang['Confirmation'] = ' Confirmation ';
$lang['Delete'] = ' Remove ';
$lang['Confidential partner key'] = 'Confidential partner key';
$lang['Basis of access key calculation'] = 'Basis of access key calculation';
Expand Down Expand Up @@ -545,12 +525,10 @@
$lang['Day'] = 'Day';
$lang['Pages seen'] = 'Pages seen';
$lang['Pictures'] = 'Pictures';
$lang['High quality'] = 'High quality';
$lang['time'] = 'time';
$lang['user'] = 'user';
$lang['IP'] = 'IP';
$lang['image'] = '';
$lang['high quality'] = 'high quality';
$lang['section'] = 'section';
$lang['tags'] = 'tags';
$lang['conf_history_guest'] = 'Save page visits by guests';
Expand Down Expand Up @@ -593,20 +571,20 @@
$lang['c13y_Correction_applied_success'] = 'Correction applied with success';
$lang['c13y_Correction_applied_error'] = 'Correction applied with error';
$lang['c13y_anomaly_count'] = '%d anomaly has been detected.';
$lang['c13y_anomalies_count'] = '%d anomalies has been detected.';
$lang['c13y_anomalies_count'] = '%d anomalies have been detected.';
$lang['c13y_anomaly_corrected_count'] = '%d anomaly has been corrected.';
$lang['c13y_anomalies_corrected_count'] = '%d anomalies has been detected corrected.';
$lang['c13y_anomaly_not_corrected_count'] = '%d anomaly hasn\'t been corrected.';
$lang['c13y_anomalies_not_corrected_count'] = '%d anomalies hasn\'t been corrected.';
$lang['c13y_anomalies_corrected_count'] = '%d anomalies have been detected corrected.';
$lang['c13y_anomaly_not_corrected_count'] = '%d anomaly has not been corrected.';
$lang['c13y_anomalies_not_corrected_count'] = '%d anomalies have not been corrected.';
$lang['c13y_more_info'] = 'Go to %s or %s for more informations';
$lang['c13y_more_info_forum'] = 'the forum';
$lang['c13y_more_info_wiki'] = 'the wiki';
$lang['c13y_exif_anomaly'] = '%s value is not correct file because exif are not supported';
$lang['c13y_exif_correction'] = '%s must be to set to false in your config_local.inc.php file';
$lang['c13y_guest_non_existent'] = 'Main "guest" user don\'t exist any more';
$lang['c13y_guest_non_existent'] = 'Main "guest" user does not exist';
$lang['c13y_bad_guest_status'] = 'Main "guest" user status is incorrect';
$lang['c13y_default_non_existent'] = 'Default user don\'t exist any more';
$lang['c13y_webmaster_non_existent'] = 'Main "webmaster" user don\'t exist any more';
$lang['c13y_default_non_existent'] = 'Default user does not exist';
$lang['c13y_webmaster_non_existent'] = 'Main "webmaster" user does not exist';
$lang['c13y_bad_webmaster_status'] = 'Main "webmaster" user status is incorrect';
$lang['c13y_user_created'] = 'User "%s" created with "%s" like password';
$lang['c13y_user_status_updated'] = 'Status of user "%s" updated';
Expand All @@ -625,16 +603,16 @@
$lang['Level 4'] = 'Family';
$lang['Level 8'] = 'Admins';
$lang['c13y_maintenance'] = 'Reinitialize check integrity';
$lang['c13y_check_all'] = 'Check all';
$lang['c13y_uncheck_all'] = 'Uncheck all';
$lang['Check all'] = 'Check all';
$lang['Uncheck all'] = 'Uncheck all';
$lang['c13y_check_auto'] = 'Check automatic corrections';
$lang['c13y_submit_correction'] = 'Apply selected corrections';
$lang['c13y_submit_ignore'] = 'Ignore selected anomalies';
$lang['c13y_submit_refresh'] = 'Refresh';
$lang['c13y_ignore_msg1'] = 'The anomaly will be ignored until next application version';
$lang['c13y_ignore_msg2'] = 'Correction the anomaly will cancel the fact that it\'s ignored';
$lang['c13y_anomaly_ignored_count'] = '%d anomaly has been ignored.';
$lang['c13y_anomalies_ignored_count'] = '%d anomalies has been ignored.';
$lang['c13y_anomalies_ignored_count'] = '%d anomalies have been ignored.';

$lang['plugins_need_update'] = 'Plugins which need upgrade';
$lang['plugins_dontneed_update'] = 'Plugins up to date';
Expand All @@ -645,7 +623,7 @@
$lang['plugins_auto_install'] = 'Automatic installation';
$lang['plugins_download'] = 'Download file';
$lang['plugins_description'] = '<b>Version:</b> %s<br><br><b>Date:</b> %s<br><br>%s';
$lang['plugins_tab_list'] = 'Plugins list';
$lang['plugins_tab_list'] = 'Plugin list';
$lang['plugins_tab_update'] = 'Check for updates';
$lang['plugins_tab_new'] = 'Other plugins';
$lang['plugins_delete'] = 'Delete';
Expand Down
4 changes: 0 additions & 4 deletions language/en_UK/common.lang.php
Expand Up @@ -275,8 +275,6 @@
$lang['reg_err_mail_address'] = 'mail address must be like xxx@yyy.eee (example : jack@altern.org)';
$lang['reg_err_pass'] = 'please enter your password again';
$lang['register'] = 'register';
$lang['register_page_title'] = 'Registration';
$lang['register_title'] = 'Registration';
$lang['remember_me'] = 'Auto login';
$lang['remove this tag'] = 'remove this tag from the list';
$lang['representative'] = 'representative';
Expand Down Expand Up @@ -312,7 +310,6 @@
$lang['the beginning'] = 'the beginning';
$lang['theme'] = 'Interface theme';
$lang['thumbnails'] = 'Thumbnails';
$lang['title_comments'] = 'Users comments';
$lang['title_menu'] = 'Menu';
$lang['title_send_mail'] = 'A comment on your site';
$lang['today'] = 'today';
Expand All @@ -336,7 +333,6 @@
$lang['upload_title'] = 'Upload a picture';
$lang['useful when password forgotten'] = 'useful when password forgotten';
/* DEPRECATED TO REMOVE AFTER ALL TEMPLATE CHANGE USE 'Yes' */ $lang['yes'] = 'yes';
$lang['page_end'] = 'Page bottom';
$lang['qsearch'] = 'Quick search';
$lang['Connected user: %s'] = 'Connected user: %s';
$lang['IP: %s'] = 'IP: %s';
Expand Down

0 comments on commit bf1f7c4

Please sign in to comment.