Ignore:
Timestamp:
Nov 19, 2009, 10:51:47 PM (11 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager]
Bug 1238 fixed - Simple custom email text wasn't send when Extended Description plugin wasn't set
Bug 1245 fixed - Semicolons (;) are no longer allowed in text areas (mail info text, ConfirmMail text, reminder text,...). They'll be replaced by dots (.).
Bug 1248 fixed - Php notice on user registration with a forbidden email domain
Bug 1250 fixed - Email provider didn't work after the third exclusion in list

Location:
extensions/NBC_UserAdvManager/trunk/admin
Files:
3 edited

Legend:

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

    r4290 r4316  
    4545$error = array();
    4646$UserAdvManager_Password_Test_Score = 0;
     47$pattern = '/;/';
     48$replacement = '.';
     49
     50$UserAdvManager_MailInfo_Error_Txt = false;
     51$UserAdvManager_ConfirmMail_Error_Txt = false;
     52$UserAdvManager_Reminder_Error_Txt = false;
     53$UserAdvManager_ConfirmMail_Error_Txt1 = false;
     54$UserAdvManager_ConfirmMail_Error_Txt2 = false;
    4755
    4856// +-----------------------------------------------------------------------+
     
    6068       
    6169        if (isset($_POST['submit']) and !is_adviser() and isset($_POST['UserAdvManager_Mail_Info']) and isset($_POST['UserAdvManager_No_Casse']) and isset($_POST['UserAdvManager_Username_Char']) and isset($_POST['UserAdvManager_Confirm_Mail']) and isset($_POST['UserAdvManager_No_Comment_Anonymous']) and isset($_POST['UserAdvManager_Password_Enforced']) and isset($_POST['UserAdvManager_AdminPassword_Enforced']) and isset($_POST['UserAdvManager_GhostUser_Tracker']))
    62   {
     70  { 
    6371                $_POST['UserAdvManager_MailInfo_Text'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_MailInfo_Text']));
     72   
    6473                $_POST['UserAdvManager_ConfirmMail_Text'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_ConfirmMail_Text']));
    6574
    66   $_POST['UserAdvManager_GhostTracker_ReminderText'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_GhostTracker_ReminderText']));
     75    $_POST['UserAdvManager_GhostTracker_ReminderText'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_GhostTracker_ReminderText']));
     76
     77
     78/* Control of semicolons - Replaced by dots - Warning message is displayed */   
     79    if ((preg_match($pattern, $_POST['UserAdvManager_MailInfo_Text'])) or (preg_match($pattern, $_POST['UserAdvManager_GhostTracker_ReminderText'])) or (preg_match($pattern, $_POST['UserAdvManager_ConfirmMail_Text'])))
     80    {
     81      if (preg_match($pattern, $_POST['UserAdvManager_MailInfo_Text']))
     82      {
     83        $_POST['UserAdvManager_MailInfo_Text'] = preg_replace($pattern, $replacement, $_POST['UserAdvManager_MailInfo_Text']);
     84        $UserAdvManager_MailInfo_Error_Txt = true;
     85      }
     86     
     87      if (preg_match($pattern, $_POST['UserAdvManager_ConfirmMail_Text']))
     88      {
     89        $_POST['UserAdvManager_ConfirmMail_Text'] = preg_replace($pattern, $replacement, $_POST['UserAdvManager_ConfirmMail_Text']);
     90        $UserAdvManager_ConfirmMail_Error_Txt = true;
     91      }
     92     
     93      if (preg_match($pattern, $_POST['UserAdvManager_GhostTracker_ReminderText']))
     94      {
     95        $_POST['UserAdvManager_GhostTracker_ReminderText'] = preg_replace($pattern, $replacement, $_POST['UserAdvManager_GhostTracker_ReminderText']);
     96        $UserAdvManager_Reminder_Error_Txt = true;
     97      }
     98     
     99      array_push($page['errors'], l10n('mail_text_error'));
     100    }
    67101               
    68102                $newconf_nbc_UserAdvManager = $_POST['UserAdvManager_Mail_Info'].';'.$_POST['UserAdvManager_No_Casse'].';'.$_POST['UserAdvManager_Confirm_Mail'].';'.(isset($_POST['UserAdvManager_No_Confirm_Group'])?$_POST['UserAdvManager_No_Confirm_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Group'])?$_POST['UserAdvManager_Validated_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Status'])?$_POST['UserAdvManager_Validated_Status']:'').';'.$_POST['UserAdvManager_No_Comment_Anonymous'].';'.$_POST['UserAdvManager_Username_Char'].';'.$_POST['UserAdvManager_Username_List'].';'.(isset($_POST['UserAdvManager_No_Confirm_Status'])?$_POST['UserAdvManager_No_Confirm_Status']:'').';'.$_POST['UserAdvManager_MailInfo_Text'].';'.$_POST['UserAdvManager_ConfirmMail_Text'].';'.$_POST['UserAdvManager_MailExclusion'].';'.$_POST['UserAdvManager_MailExclusion_List'].';'.$_POST['UserAdvManager_Password_Enforced'].';'.$_POST['UserAdvManager_Password_Score'].';'.$_POST['UserAdvManager_AdminPassword_Enforced'].';'.$_POST['UserAdvManager_GhostUser_Tracker'].';'.$_POST['UserAdvManager_GhostTracker_DayLimit'].';'.$_POST['UserAdvManager_GhostTracker_ReminderText'];
     
    214248    'UserAdvManager_GHOSTRACKER_REMINDERTEXT' => $conf_nbc_UserAdvManager[19],
    215249                'UserAdvManager_PASSWORD_TEST_SCORE'      => $UserAdvManager_Password_Test_Score,
     250    'UserAdvManager_ERROR_REPORTS1'           => $UserAdvManager_MailInfo_Error_Txt,
     251    'UserAdvManager_ERROR_REPORTS2'           => $UserAdvManager_ConfirmMail_Error_Txt,
     252    'UserAdvManager_ERROR_REPORTS3'           => $UserAdvManager_Reminder_Error_Txt,
    216253    )
    217254  );
     
    340377                {
    341378                $_POST['UserAdvManager_ConfirmMail_ReMail_Txt1'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_ConfirmMail_ReMail_Txt1']));
     379
    342380                $_POST['UserAdvManager_ConfirmMail_ReMail_Txt2'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_ConfirmMail_ReMail_Txt2']));
     381
     382/* Control of semicolons - Replaced by dots - Warning message displayed */
     383    if ((preg_match($pattern, $_POST['UserAdvManager_ConfirmMail_ReMail_Txt1'])) or (preg_match($pattern, $_POST['UserAdvManager_ConfirmMail_ReMail_Txt2'])))
     384    {
     385      if ((preg_match($pattern, $_POST['UserAdvManager_ConfirmMail_ReMail_Txt1'])))
     386      {
     387        $_POST['UserAdvManager_ConfirmMail_ReMail_Txt1'] = preg_replace($pattern, $replacement, $_POST['UserAdvManager_ConfirmMail_ReMail_Txt1']);
     388        $UserAdvManager_ConfirmMail_Error_Txt1 = true;
     389      }
     390     
     391      if ((preg_match($pattern, $_POST['UserAdvManager_ConfirmMail_ReMail_Txt2'])))
     392      {
     393        $_POST['UserAdvManager_ConfirmMail_ReMail_Txt2'] = preg_replace($pattern, $replacement, $_POST['UserAdvManager_ConfirmMail_ReMail_Txt2']);
     394       
     395        $UserAdvManager_ConfirmMail_Error_Txt2 = true;
     396      }
     397     
     398      array_push($page['errors'], l10n('mail_text_error'));
     399    }
    343400                 
    344401                $newconf_nbc_UserAdvManager_ConfirmMail = $_POST['UserAdvManager_ConfirmMail_TimeOut'].';'.$_POST['UserAdvManager_ConfirmMail_Delay'].';'.$_POST['UserAdvManager_ConfirmMail_ReMail_Txt1'].';'.$_POST['UserAdvManager_ConfirmMail_Remail'].';'.$_POST['UserAdvManager_ConfirmMail_ReMail_Txt2'];
     
    371428    'UserAdvManager_CONFIRMMAIL_REMAIL_TXT1'            => $conf_nbc_UserAdvManager_ConfirmMail[2],
    372429    'UserAdvManager_CONFIRMMAIL_REMAIL_TXT2'            => $conf_nbc_UserAdvManager_ConfirmMail[4],
     430    'UserAdvManager_ERROR_REPORTS1'             => $UserAdvManager_ConfirmMail_Error_Txt1,
     431    'UserAdvManager_ERROR_REPORTS2'             => $UserAdvManager_ConfirmMail_Error_Txt2,
    373432        )
    374433          );           
  • extensions/NBC_UserAdvManager/trunk/admin/confirmmail.tpl

    r4159 r4316  
    2121   
    2222{if $UserAdvManager_CONFIRMMAIL_REMAIL_TRUE}
     23  {if $UserAdvManager_ERROR_REPORTS1}
     24                <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt1'|@translate}</label><br>
     25                <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt1" id="UserAdvManager_ConfirmMail_ReMail_Txt1" rows="10" cols="80" style="color: red" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT1}</textarea><br><br>
     26          </li>
     27  {else}
    2328                <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt1'|@translate}</label><br>
    2429                <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt1" id="UserAdvManager_ConfirmMail_ReMail_Txt1" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT1}</textarea><br><br>
    2530          </li>
    26                
    27     <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt2'|@translate}</label><br>
    28                 <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt2" id="UserAdvManager_ConfirmMail_ReMail_Txt2" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT2}</textarea><br>
    29           </li>
     31  {/if}
    3032{else}
    3133                <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt1'|@translate}</label><br>
    3234                <textarea  name="UserAdvManager_ConfirmMail_ReMail_Txt1" id="UserAdvManager_ConfirmMail_ReMail_Txt1" rows="10" cols="80" readonly{$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT1}</textarea><br><br>
    3335          </li>
    34                
     36{/if}
     37
     38{if $UserAdvManager_CONFIRMMAIL_REMAIL_TRUE}
     39  {if $UserAdvManager_ERROR_REPORTS2}
     40    <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt2'|@translate}</label><br>
     41                <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt2" id="UserAdvManager_ConfirmMail_ReMail_Txt2" rows="10" cols="80" style="color: red" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT2}</textarea><br>
     42          </li>
     43  {else}               
     44    <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt2'|@translate}</label><br>
     45                <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt2" id="UserAdvManager_ConfirmMail_ReMail_Txt2" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT2}</textarea><br>
     46          </li>
     47  {/if}
     48{else}
    3549    <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt2'|@translate}</label><br>
    3650                <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt2" id="UserAdvManager_ConfirmMail_ReMail_Txt2" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT2}</textarea><br>
  • extensions/NBC_UserAdvManager/trunk/admin/global.tpl

    r4159 r4316  
    6969     
    7070{if $UserAdvManager_GHOSTRACKER_TRUE}
     71  {if $UserAdvManager_ERROR_REPORTS3}
     72        <li><label>{'UserAdvManager_GhostTracker_ReminderText'|@translate}</label><br><br>
     73        <textarea name="UserAdvManager_GhostTracker_ReminderText" id="UserAdvManager_GhostTracker_ReminderText" rows="10" cols="80" style="color: red" {$TAG_INPUT_ENABLED}>{$UserAdvManager_GHOSTRACKER_REMINDERTEXT}</textarea><br><br>
     74        </li>
     75  {else}
    7176        <li><label>{'UserAdvManager_GhostTracker_ReminderText'|@translate}</label><br><br>
    7277        <textarea name="UserAdvManager_GhostTracker_ReminderText" id="UserAdvManager_GhostTracker_ReminderText" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_GHOSTRACKER_REMINDERTEXT}</textarea><br><br>
    7378        </li>
     79  {/if}
    7480{else}
    7581        <li><label>{'UserAdvManager_GhostTracker_ReminderText'|@translate}</label><br><br>
     
    9096        </li>
    9197
    92 {if $UserAdvManager_MAIL_INFO_TRUE}     
     98{if $UserAdvManager_MAIL_INFO_TRUE}
     99  {if $UserAdvManager_ERROR_REPORTS1}     
     100        <li><label>{'UserAdvManager_MailInfo_Text'|@translate}</label><br><br>
     101        <textarea name="UserAdvManager_MailInfo_Text" id="UserAdvManager_MailInfo_Text" rows="10" cols="80" style="color: red"  {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILINFO_TEXT}</textarea><br><br>
     102        </li>
     103  {else}
    93104        <li><label>{'UserAdvManager_MailInfo_Text'|@translate}</label><br><br>
    94105        <textarea name="UserAdvManager_MailInfo_Text" id="UserAdvManager_MailInfo_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILINFO_TEXT}</textarea><br><br>
    95106        </li>
     107  {/if}
    96108{else}
    97109        <li><label>{'UserAdvManager_MailInfo_Text'|@translate}</label><br><br>
     
    105117        </li>
    106118
    107 {if $UserAdvManager_CONFIRM_MAIL_TRUE}     
     119{if $UserAdvManager_CONFIRM_MAIL_TRUE}
     120  {if $UserAdvManager_ERROR_REPORTS2}     
     121        <li><label>{'UserAdvManager_ConfirmMail_Text'|@translate}</label><br><br>
     122        <textarea name="UserAdvManager_ConfirmMail_Text" id="UserAdvManager_ConfirmMail_Text" rows="10" cols="80" style="color: red" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_TEXT}</textarea><br><br>
     123        </li>
     124  {else}
    108125        <li><label>{'UserAdvManager_ConfirmMail_Text'|@translate}</label><br><br>
    109126        <textarea name="UserAdvManager_ConfirmMail_Text" id="UserAdvManager_ConfirmMail_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_TEXT}</textarea><br><br>
    110127        </li>
     128  {/if}
    111129{else}
    112130        <li><label>{'UserAdvManager_ConfirmMail_Text'|@translate}</label><br><br>
Note: See TracChangeset for help on using the changeset viewer.