Changeset 25774
- Timestamp:
- Dec 1, 2013, 11:01:27 PM (10 years ago)
- Location:
- extensions/LCAS
- Files:
-
- 71 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LCAS/branch/2.2/CHANGELOG.txt
r10692 r25774 1 2011-27-04 2.2.4 2 Compatibility with version 2.6 of Piwigo: remove usage of 3 get_email_address_as_display_text() which is removed from 4 functions_user.inc.php 5 6 2012-10-01 2.2.3 7 Bug 2757 fixed : Notice when LCAS set to option 0 and admin 8 tries to create a user already present, 9 and cosmetic changes on language keys 10 1 11 2011-27-04 2.2.2 2 12 Bug 2285 fixed : Compliance with Piwigo 2.1 and 2.2 -
extensions/LCAS/branch/2.2/admin/LCAS_admin.php
r10549 r25774 22 22 23 23 load_language('plugin.lang', LCAS_PATH); 24 load_language('help /plugin.lang', LCAS_PATH);24 load_language('help.lang', LCAS_PATH); 25 25 26 26 $error = array(); … … 46 46 $_POST['LCAS_MailText']); 47 47 48 $conf['LoginCaseAccentsSensitivity'] = serialize($newconf_LCAS); 49 50 $query = ' 51 UPDATE '.CONFIG_TABLE.' 52 SET value="'.addslashes($conf['LoginCaseAccentsSensitivity']).'" 53 WHERE param="LoginCaseAccentsSensitivity" 54 LIMIT 1 55 ;'; 56 57 pwg_query($query); 48 conf_update_param('LoginCaseAccentsSensitivity', pwg_db_real_escape_string(serialize($newconf_LCAS))); 58 49 59 50 array_push($page['infos'], l10n('LCAS_save_config')); … … 123 114 $query = ' 124 115 UPDATE '.USERS_TABLE.' 125 SET username="'. addslashes($_POST['user-'.$lcas_UserToUpdate]).'"116 SET username="'.pwg_db_real_escape_string($_POST['user-'.$lcas_UserToUpdate]).'" 126 117 WHERE id='.$lcas_UserToUpdate.' 127 118 LIMIT 1 … … 180 171 'USERNAME' => stripslashes($local_user['username']), 181 172 'COMPARE' => stripslashes($local_user['transformed']), 182 'EMAIL' => 183 get_email_address_as_display_text($local_user['email']), 173 'EMAIL' => $local_user['email'], 184 174 'DISPLAY' => $display, 185 175 ) -
extensions/LCAS/branch/2.2/include/admin_search.inc.php
r10549 r25774 281 281 ? '<br>['.l10n('default values').']' : ''), 282 282 'STATUS' => l10n('user_status_'.$local_user['status']), 283 'EMAIL' => get_email_address_as_display_text($local_user['email']),283 'EMAIL' => $local_user['email'], 284 284 'GROUPS' => $groups_string, 285 285 'PROPERTIES' => implode( ', ', $properties), -
extensions/LCAS/branch/2.2/main.inc.php
r10692 r25774 2 2 /* 3 3 Plugin Name: LCAS 4 Version: 2.2. 24 Version: 2.2.4 5 5 Description: Allow to disable login/register name to be sensible to the case/accents 6 6 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=513 -
extensions/LCAS/trunk/CHANGELOG.txt
r18391 r25774 1 2011-27-04 2.2.4 2 Compatibility with version 2.6 of Piwigo: remove usage of 3 get_email_address_as_display_text() which is removed from 4 functions_user.inc.php 5 1 6 2012-10-01 2.2.3 2 7 Bug 2757 fixed : Notice when LCAS set to option 0 and admin -
extensions/LCAS/trunk/admin/LCAS_admin.php
r12206 r25774 171 171 'USERNAME' => stripslashes($local_user['username']), 172 172 'COMPARE' => stripslashes($local_user['transformed']), 173 'EMAIL' => 174 get_email_address_as_display_text($local_user['email']), 173 'EMAIL' => $local_user['email'], 175 174 'DISPLAY' => $display, 176 175 ) -
extensions/LCAS/trunk/include/admin_search.inc.php
r10549 r25774 281 281 ? '<br>['.l10n('default values').']' : ''), 282 282 'STATUS' => l10n('user_status_'.$local_user['status']), 283 'EMAIL' => get_email_address_as_display_text($local_user['email']),283 'EMAIL' => $local_user['email'], 284 284 'GROUPS' => $groups_string, 285 285 'PROPERTIES' => implode( ', ', $properties), -
extensions/LCAS/trunk/main.inc.php
r18391 r25774 2 2 /* 3 3 Plugin Name: LCAS 4 Version: 2.2. 34 Version: 2.2.4 5 5 Description: Allow to disable login/register name to be sensible to the case/accents 6 6 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=513 … … 80 80 if (isset($_POST['username']) and isset($conf_LCAS[0])) 81 81 { 82 $new_username = 83 LCAS_SearchCaseUsername($_POST['username'], $conf_LCAS[0]); 84 $_POST['username'] = ($new_username == '') ? 85 $_POST['username'] : $new_username; 82 $new_username = LCAS_SearchCaseUsername($_POST['username'],$conf_LCAS[0]); 83 $_POST['username'] = $new_username == '' ? $_POST['username'] : $new_username; 86 84 } 87 85 } 88 86 89 // Add tooltips on register and identification page 90 $sb = script_basename(); $fn = ''; 91 if ($sb == 'register' or $sb == 'identification') 92 $fn = ($sb == 'register') ? 93 'LCAS_add_tooltips_prefilter_register' : 94 'LCAS_add_tooltips_prefilter_identification'; 95 if ($fn != '') { 87 // Add tooltips on register page 88 if (script_basename() == 'register') { 96 89 $template->assign(array( 97 'LCAS_username_tooltip' => 98 $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[0])], 99 'LCAS_password_tooltip' => 100 $lang['LCAS_tooltip_password_register'], 90 'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[0])], 91 'LCAS_password_tooltip' => $lang['LCAS_tooltip_password_register'], 101 92 )); 102 $template->set_prefilter( $sb, $fn);93 $template->set_prefilter('register', 'LCAS_add_tooltips_prefilter_register'); 103 94 } 104 95 } … … 126 117 } 127 118 128 function LCAS_add_tooltips_prefilter_identification($content, &$smarty) {129 $search = 'for="username"';130 $replacement = 'for="username" title="{$LCAS_username_tooltip}"';131 $content = str_replace($search, $replacement, $content);132 $search = 'name="username"';133 $replacement = 'name="username" title="{$LCAS_username_tooltip}"';134 $content = str_replace($search, $replacement, $content);135 $search = 'for="password"';136 $replacement = 'for="password" title="{$LCAS_password_tooltip}"';137 $content = str_replace($search, $replacement, $content);138 $search = 'name="password"';139 $replacement = 'name="password" title="{$LCAS_password_tooltip}"';140 $content = str_replace($search, $replacement, $content);141 return $content;142 }143 144 119 // Check users registration 145 120 // Returns error … … 157 132 $NewPostLogin = LCAS_SearchCaseUsername($_POST['login'], $conf_LCAS[0]); 158 133 159 if (isset($NewPostLogin) and get_userid($NewPostLogin) and (intval($conf_LCAS[0]) != 0))134 if (isset($NewPostLogin) and get_userid($NewPostLogin)) 160 135 $errors[] = $lang['LCAS_error'][intval($conf_LCAS[0])]; 161 136
Note: See TracChangeset
for help on using the changeset viewer.