Changeset 4340
- Timestamp:
- Nov 22, 2009, 5:11:24 PM (15 years ago)
- Location:
- extensions/NBC_UserAdvManager/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php
r4316 r4340 53 53 $UserAdvManager_ConfirmMail_Error_Txt1 = false; 54 54 $UserAdvManager_ConfirmMail_Error_Txt2 = false; 55 $UserAdvManager_Exclusionlist_Error = false; 55 56 56 57 // +-----------------------------------------------------------------------+ … … 98 99 99 100 array_push($page['errors'], l10n('mail_text_error')); 101 } 102 103 /* Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them */ 104 if (preg_match('/^[\s]+/', $_POST['UserAdvManager_MailExclusion_List'])) 105 { 106 array_push($page['errors'], l10n('mail_exclusionlist_error')); 107 $UserAdvManager_Exclusionlist_Error = true; 100 108 } 101 109 … … 251 259 'UserAdvManager_ERROR_REPORTS2' => $UserAdvManager_ConfirmMail_Error_Txt, 252 260 'UserAdvManager_ERROR_REPORTS3' => $UserAdvManager_Reminder_Error_Txt, 261 'UserAdvManager_ERROR_REPORTS4' => $UserAdvManager_Exclusionlist_Error, 253 262 ) 254 263 ); … … 314 323 while($row = mysql_fetch_assoc($result)) 315 324 { 316 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 317 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 325 $conf_nbc_MailExclusion = preg_split("/[\s,]+/",$conf_nbc_UserAdvManager[13]); 318 326 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 319 327 { -
extensions/NBC_UserAdvManager/trunk/admin/global.tpl
r4316 r4340 45 45 </li> 46 46 47 {if $UserAdvManager_MAILEXCLUSION_TRUE} 47 {if $UserAdvManager_MAILEXCLUSION_TRUE} 48 {if $UserAdvManager_ERROR_REPORTS4} 49 <li><label>{'UserAdvManager_MailExclusion_List'|@translate}</label><br> 50 <textarea name="UserAdvManager_MailExclusion_List" id="UserAdvManager_MailExclusion_List" rows="3" cols="80" style="color: red" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILEXCLUSION_LIST}</textarea><br><br> 51 </li> 52 {else} 48 53 <li><label>{'UserAdvManager_MailExclusion_List'|@translate}</label><br> 49 54 <textarea name="UserAdvManager_MailExclusion_List" id="UserAdvManager_MailExclusion_List" rows="3" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILEXCLUSION_LIST}</textarea><br><br> 50 55 </li> 56 {/if} 51 57 {else} 52 58 <li><label>{'UserAdvManager_MailExclusion_List'|@translate}</label><br> -
extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php
r4316 r4340 609 609 if (isset($username)) 610 610 { 611 $usercase = strtolower($username); 611 612 $query = " 612 613 SELECT ".$conf['user_fields']['username']." 613 614 FROM ".USERS_TABLE." 614 WHERE LOWER(". $conf['user_fields']['username'].") = '".strtolower($username)."'615 ;"; 616 list($user name) = mysql_fetch_row(pwg_query($query));617 618 return isset($username) ? stripslashes($user name) : '';615 WHERE LOWER(".stripcslashes($conf['user_fields']['username']).") = '".$usercase."' 616 ;"; 617 list($usercase) = mysql_fetch_row(pwg_query($query)); 618 619 return isset($username) ? stripslashes($usercase) : ''; 619 620 } 620 621 } … … 653 654 { 654 655 $ncsemail = strtolower($email); 655 $conf_nbc_MailExclusion = preg_split( '/,/',$conf_nbc_UserAdvManager[13]);656 $conf_nbc_MailExclusion = preg_split("/[\s,]+/",$conf_nbc_UserAdvManager[13]); 656 657 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 657 658 { -
extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php
r4316 r4340 175 175 /* TODO */$lang['mail_text_error'] = '<b>Warning!</b> - Semicolons (;) are not allowed in addtionnal email text. This Character have been automatically replaced by a dot (.). For information, the amended text(s) is(are) shown in red in the corresponding field(s). Please, check it(them) out.'; 176 176 // --------- End: New or revised $lang ---- from version 2.12.7 177 // --------- Starting below: New or revised $lang ---- from version 2.12.8 178 /* TODO */$lang['mail_exclusionlist_error'] = 'Warning! You have entered a new line (CR-LF) at the begining of email exclusion list (shown in red below). Although this new line is not visible, it is still present and may cause malfunction of the plugin. Please re-type in your exclusion list in a manner that does not begin with a newline.'; 179 // --------- End: New or revised $lang ---- from version 2.12.8 177 180 178 181 -
extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php
r4316 r4340 176 176 $lang['mail_text_error'] = '<b>Warning!</b> - Semicolons (;) are not allowed in addtionnal email text. This Character have been automatically replaced by a dot (.). For information, the amended text(s) is(are) shown in red in the corresponding field(s). Please, check it(them) out.'; 177 177 // --------- End: New or revised $lang ---- from version 2.12.7 178 // --------- Starting below: New or revised $lang ---- from version 2.12.8 179 $lang['mail_exclusionlist_error'] = 'Warning! You have entered a new line (CR-LF) at the begining of email exclusion list (shown in red below). Although this new line is not visible, it is still present and may cause malfunction of the plugin. Please re-type in your exclusion list in a manner that does not begin with a newline.'; 180 // --------- End: New or revised $lang ---- from version 2.12.8 178 181 179 182 -
extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php
r4316 r4340 176 176 /* TODO */$lang['mail_text_error'] = '<b>Warning!</b> - Semicolons (;) are not allowed in addtionnal email text. This Character have been automatically replaced by a dot (.). For information, the amended text(s) is(are) shown in red in the corresponding field(s). Please, check it(them) out.'; 177 177 // --------- End: New or revised $lang ---- from version 2.12.7 178 // --------- Starting below: New or revised $lang ---- from version 2.12.8 179 /* TODO */$lang['mail_exclusionlist_error'] = 'Warning! You have entered a new line (CR-LF) at the begining of email exclusion list (shown in red below). Although this new line is not visible, it is still present and may cause malfunction of the plugin. Please re-type in your exclusion list in a manner that does not begin with a newline.'; 180 // --------- End: New or revised $lang ---- from version 2.12.8 178 181 179 182 -
extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
r4316 r4340 175 175 $lang['mail_text_error'] = '<b>Attention!</b> - Le point-virgule (;) n\'est pas autorisé dans le texte additionnel des emails. Ce caractère a été automatiquement remplacé par un point (.). Pour information, le(s) texte(s) modifié(s) est(sont) affiché(s) en rouge dans le(s) champ(s) correspondant(s). Veuillez le(s) vérifier.'; 176 176 // --------- End: New or revised $lang ---- from version 2.12.7 177 // --------- Starting below: New or revised $lang ---- from version 2.12.8 178 $lang['mail_exclusionlist_error'] = 'Attention ! Vous avez saisi un retour à la ligne en début de liste d\'exclusion des domaines de messagerie (affichée en rouge ci-dessous). Bien que ce retour à la ligne ne soit pas visible, il est tout de même présent et est susceptible de provoquer des dysfonctionnements du plugin. Veuillez resaisir votre liste d\'exclusion en veillant à ne pas commencer par un retour à la ligne.'; 179 // --------- End: New or revised $lang ---- from version 2.12.8 177 180 178 181 -
extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php
r4316 r4340 176 176 /* TODO */$lang['mail_text_error'] = '<b>Warning!</b> - Semicolons (;) are not allowed in addtionnal email text. This Character have been automatically replaced by a dot (.). For information, the amended text(s) is(are) shown in red in the corresponding field(s). Please, check it(them) out.'; 177 177 // --------- End: New or revised $lang ---- from version 2.12.7 178 // --------- Starting below: New or revised $lang ---- from version 2.12.8 179 /* TODO */$lang['mail_exclusionlist_error'] = 'Warning! You have entered a new line (CR-LF) at the begining of email exclusion list (shown in red below). Although this new line is not visible, it is still present and may cause malfunction of the plugin. Please re-type in your exclusion list in a manner that does not begin with a newline.'; 180 // --------- End: New or revised $lang ---- from version 2.12.8 178 181 179 182 -
extensions/NBC_UserAdvManager/trunk/main.inc.php
r4316 r4340 2 2 /* 3 3 Plugin Name: NBC UserAdvManager 4 Version: 2.12. 74 Version: 2.12.8 5 5 Description: Renforcer les possibilités de gestion des utilisateurs - Enforce users management 6 6 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216 … … 77 77 78 78 -- 2.12.0 : Bug 1206 fixed : All plugin functionnalities work in user's profile page 79 80 81 79 Plugin's core code and admin panel refactoring 80 Password control and enforcement : A complexity score is computed on user registration. If this score is less than the goal set by admin, the password choosen is rejected. 81 Feature 1194 "Ghost Tracker" added : New plugin tab displays users who don't comes back to the gallery since x days. Ability to send email reminders and to delete reminded but "dead" users. It's the reason why this feature is called "Ghost Tracker". 82 82 83 83 -- 2.12.1 : Rollback on admin panel improvement (it was a bad idea) … … 105 105 Bug 1250 fixed - Email provider didn't work after the third exclusion in list 106 106 Escaping all special characters typed in login name and recover them 107 108 -- 2.12.8 : Bug 1259 fixed - PHP notice on user addition by admin in user_list page 109 Bug 1257 fixed - If email exclusion list begins with a CR-LF, an informative warning message is displayed (I was unable to delete automatically this CR-LF). 110 Bug 1260 107 111 */ 108 112 … … 270 274 { 271 275 return l10n('reg_err_login5'); 272 }273 274 if (script_basename() == 'admin' and isset($_GET['page']) and $_GET['page'] == 'user_list') /* not the same email variable if we are on users registration page or on admin's user registration page*/275 {276 /* ***************************** */277 /* Standard Piwigo's email check */278 /* ***************************** */279 $atom = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; // before arobase280 $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name281 $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';282 283 if (!preg_match($regex, $_POST['email']))284 {285 return l10n('reg_err_mail_address');286 }287 288 if (!empty($_POST['email']))289 {290 $query = '291 select count(*)292 from '.USERS_TABLE.'293 where upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['email'].'\');';294 list($count) = mysql_fetch_assoc(pwg_query($query));295 if ($count != 0)296 {297 return l10n('reg_err_mail_address_dbl');298 }299 }300 276 } 301 277 /* ****************************************** */
Note: See TracChangeset
for help on using the changeset viewer.