Ignore:
Timestamp:
Oct 19, 2009, 6:22:25 PM (11 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager]

  • Bug 1195 fixed : Registration page displays now the good title
  • Some code cleaning
Location:
extensions/NBC_UserAdvManager/trunk/admin
Files:
3 edited

Legend:

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

    r3920 r4061  
    4141$page['global'] = array();
    4242$error = array();
     43$UserAdvManager_Password_Test_Score = 0;
    4344
    4445// +-----------------------------------------------------------------------+
     
    5556  case 'global':
    5657       
    57         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']) )
     58        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']))
    5859  {
    5960                $_POST['UserAdvManager_MailInfo_Text'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_MailInfo_Text']));
    6061                $_POST['UserAdvManager_ConfirmMail_Text'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_ConfirmMail_Text']));
    6162               
    62                 $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'];
     63                $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'];
    6364               
    6465                $conf['nbc_UserAdvManager'] = $newconf_nbc_UserAdvManager;
     
    7475               
    7576                array_push($page['infos'], l10n('UserAdvManager_save_config'));
     77  }
     78
     79  if (isset($_POST['PasswordTest']) and !is_adviser() and isset($_POST['UserAdvManager_Password_Test']) and !empty($_POST['UserAdvManager_Password_Test']))
     80  {
     81    $UserAdvManager_Password_Test_Score = testpassword($_POST['UserAdvManager_Password_Test']);
     82  }
     83  else if (isset($_POST['PasswordTest']) and !is_adviser() and empty($_POST['UserAdvManager_Password_Test']))
     84  {
     85    array_push($page['errors'], l10n('reg_err_login3'));
    7686  }
    7787       
     
    189199                'UserAdvManager_MAILEXCLUSION_FALSE'  => $conf_nbc_UserAdvManager[12]=='false' ?  'checked="checked"' : '' ,
    190200                'UserAdvManager_MAILEXCLUSION_LIST'   => $conf_nbc_UserAdvManager[13],
     201                'UserAdvManager_PASSWORDENF_TRUE'     => $conf_nbc_UserAdvManager[14]=='true' ?  'checked="checked"' : '' ,
     202                'UserAdvManager_PASSWORDENF_FALSE'    => $conf_nbc_UserAdvManager[14]=='false' ?  'checked="checked"' : '' ,
     203                'UserAdvManager_PASSWORD_SCORE'       => $conf_nbc_UserAdvManager[15],
     204                'UserAdvManager_PASSWORD_TEST_SCORE'  => $UserAdvManager_Password_Test_Score,
    191205    )
    192206  );
  • extensions/NBC_UserAdvManager/trunk/admin/global.tpl

    r3982 r4061  
    77        <legend>{'UserAdvManager_Title'|@translate}</legend>
    88    <ul>
    9         <li><label>{'UserAdvManager_Mail_Info'|@translate}</label><br/>
    10         <input type="radio" value="true" {$UserAdvManager_MAIL_INFO_TRUE} name="UserAdvManager_Mail_Info"/>{'UserAdvManager_Mail_Info_true'|@translate}<br>
    11         <input type="radio" value="false" {$UserAdvManager_MAIL_INFO_FALSE} name="UserAdvManager_Mail_Info"/>{'UserAdvManager_Mail_Info_false'|@translate}<br>
    12         <br>
    13         </li>
    14         <li><label>{'UserAdvManager_MailInfo_Text'|@translate}</label><br><br>
    15         <textarea name="UserAdvManager_MailInfo_Text" id="UserAdvManager_MailInfo_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILINFO_TEXT}</textarea>
    16         <br><br>
    17         </li>
    189        <li><label>{'UserAdvManager_No_Casse'|@translate}</label><br>
    1910        <input type="radio" value="true" {$UserAdvManager_NO_CASSE_TRUE} name="UserAdvManager_No_Casse"/>{'UserAdvManager_No_Casse_true'|@translate}<br>
     
    2617        <input type="radio" value="false" {$UserAdvManager_USERNAME_CHAR_FALSE} name="UserAdvManager_Username_Char"/>{'UserAdvManager_Username_Char_false'|@translate}<br>
    2718        <br>
     19        </li>
     20        <li><label>{'UserAdvManager_Password_Enforced'|@translate}</label><br/>
     21        <input type="radio" value="true" {$UserAdvManager_PASSWORDENF_TRUE} name="UserAdvManager_Password_Enforced"/>{'UserAdvManager_Password_Enforced_true'|@translate}
     22        <input type="text" name="UserAdvManager_Password_Score" value="{$UserAdvManager_PASSWORD_SCORE}" size="5" style="text-align: center;"/><br><br>
     23       
     24        <label>{'UserAdvManager_Password_Enforced_Info'|@translate}</label><br><br>
     25        {'UserAdvManager_PasswordTest'|@translate}<input type="text" name="UserAdvManager_Password_Test" value="{$UserAdvManager_PASSWORD_TEST}" size="50" style="text-align: left;"/>&nbsp;&nbsp;&nbsp;
     26        <input class="submit" type="submit" value="{'PasswordTest'|@translate}" name="PasswordTest" >&nbsp;&nbsp;&nbsp;
     27        {'UserAdvManager_ScoreTest'|@translate}{$UserAdvManager_PASSWORD_TEST_SCORE}<br><br>
     28        {if isset($PasswordTest) && empty($UserAdvManager_PASSWORD_TEST)}
     29          <label>{'reg_err_login3'|@translate}</label>
     30        {/if}
     31       
     32        <input type="radio" value="false" {$UserAdvManager_PASSWORDENF_FALSE} name="UserAdvManager_Password_Enforced"/>{'UserAdvManager_Password_Enforced_false'|@translate}<br>
     33        <br>
     34        </li>
     35        <li><label>{'UserAdvManager_Mail_Info'|@translate}</label><br/>
     36        <input type="radio" value="true" {$UserAdvManager_MAIL_INFO_TRUE} name="UserAdvManager_Mail_Info"/>{'UserAdvManager_Mail_Info_true'|@translate}<br>
     37        <input type="radio" value="false" {$UserAdvManager_MAIL_INFO_FALSE} name="UserAdvManager_Mail_Info"/>{'UserAdvManager_Mail_Info_false'|@translate}<br>
     38        <br>
     39        </li>
     40        <li><label>{'UserAdvManager_MailInfo_Text'|@translate}</label><br><br>
     41        <textarea name="UserAdvManager_MailInfo_Text" id="UserAdvManager_MailInfo_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILINFO_TEXT}</textarea>
     42        <br><br>
    2843        </li>
    2944        <li><label>{'UserAdvManager_Confirm_Mail'|@translate}</label><br>
  • extensions/NBC_UserAdvManager/trunk/admin/usermanager.tpl

    r3920 r4061  
    1818                        <td>{'Email address'|@translate}</td>
    1919                        <td>{'Groups'|@translate}</td>
    20                         <td>{'Registration'|@translate}</td>
     20                        <td>{'Registration_Date'|@translate}</td>
    2121                        </tr>
    2222                        </thead>
Note: See TracChangeset for help on using the changeset viewer.