Ignore:
Timestamp:
Nov 22, 2009, 5:11:24 PM (11 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager]

  • Bug 1259 fixed - PHP notice on user addition by admin in user_list page
  • 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).
Location:
extensions/NBC_UserAdvManager/trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php

    r4316 r4340  
    5353$UserAdvManager_ConfirmMail_Error_Txt1 = false;
    5454$UserAdvManager_ConfirmMail_Error_Txt2 = false;
     55$UserAdvManager_Exclusionlist_Error = false;
    5556
    5657// +-----------------------------------------------------------------------+
     
    9899     
    99100      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;
    100108    }
    101109               
     
    251259    'UserAdvManager_ERROR_REPORTS2'           => $UserAdvManager_ConfirmMail_Error_Txt,
    252260    'UserAdvManager_ERROR_REPORTS3'           => $UserAdvManager_Reminder_Error_Txt,
     261    'UserAdvManager_ERROR_REPORTS4'           => $UserAdvManager_Exclusionlist_Error,
    253262    )
    254263  );
     
    314323                  while($row = mysql_fetch_assoc($result))
    315324                  {
    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]);
    318326                          for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
    319327                          {
  • extensions/NBC_UserAdvManager/trunk/admin/global.tpl

    r4316 r4340  
    4545        </li>
    4646
    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}
    4853        <li><label>{'UserAdvManager_MailExclusion_List'|@translate}</label><br>
    4954        <textarea name="UserAdvManager_MailExclusion_List" id="UserAdvManager_MailExclusion_List" rows="3" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILEXCLUSION_LIST}</textarea><br><br>
    5055        </li>
     56  {/if}
    5157{else}
    5258        <li><label>{'UserAdvManager_MailExclusion_List'|@translate}</label><br>
Note: See TracChangeset for help on using the changeset viewer.