Ignore:
Timestamp:
May 25, 2010, 6:11:02 PM (14 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager]

  • Bug 1687 fixed: Case sensitivity function removed because intégrated Piwigo's core
File:
1 edited

Legend:

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

    r6251 r6354  
    102102  case 'global':
    103103
    104         if (isset($_POST['submit']) and !is_adviser() and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_No_Casse']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']))
     104        if (isset($_POST['submit']) and !is_adviser() and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']))
    105105  {
    106106
     
    122122                $newconf_UAM = array(
    123123      $_POST['UAM_Mail_Info'],
    124       $_POST['UAM_No_Casse'],
    125124      $_POST['UAM_Confirm_Mail'],
    126125      (isset($_POST['UAM_No_Confirm_Group'])?$_POST['UAM_No_Confirm_Group']:''),
     
    220219    $groups[$row['id']] = $row['name'];
    221220/* configuration value for unvalidated users */
     221    if (isset($conf_UAM[2]) and $conf_UAM[2] == $row['id'])
     222    {
     223                $No_Valid = $row['id'];
     224                }
     225/* configuration value for validated users */
    222226    if (isset($conf_UAM[3]) and $conf_UAM[3] == $row['id'])
    223     {
    224                 $No_Valid = $row['id'];
    225                 }
    226 /* configuration value for validated users */
    227     if (isset($conf_UAM[4]) and $conf_UAM[4] == $row['id'])
    228227                {
    229228                $Valid = $row['id'];
     
    257256  {
    258257          $status_options[$status] = l10n('user_status_'.$status);
    259           if (isset($conf_UAM[9]) and $conf_UAM[9] == $status)
     258          if (isset($conf_UAM[8]) and $conf_UAM[8] == $status)
    260259          {
    261260            $No_Valid_Status = $status;
     
    276275  {
    277276          $status_options[$status] = l10n('user_status_'.$status);
    278           if (isset($conf_UAM[5]) and $conf_UAM[5] == $status)
     277          if (isset($conf_UAM[4]) and $conf_UAM[4] == $status)
    279278                {
    280279                  $Valid_Status = $status;
     
    305304                'UAM_MAIL_INFO_TRUE'             => $conf_UAM[0]=='true' ?  'checked="checked"' : '' ,
    306305                'UAM_MAIL_INFO_FALSE'            => $conf_UAM[0]=='false' ?  'checked="checked"' : '' ,
    307                 'UAM_MAILINFO_TEXT'              => $conf_UAM[10],
    308                 'UAM_NO_CASSE_TRUE'              => $conf_UAM[1]=='true' ?  'checked="checked"' : '' ,
    309                 'UAM_NO_CASSE_FALSE'             => $conf_UAM[1]=='false' ?  'checked="checked"' : '' ,
    310                 'UAM_USERNAME_CHAR_TRUE'         => $conf_UAM[7]=='true' ?  'checked="checked"' : '' ,
    311                 'UAM_USERNAME_CHAR_FALSE'        => $conf_UAM[7]=='false' ?  'checked="checked"' : '' ,
    312                 'UAM_USERNAME_CHAR_LIST'         => $conf_UAM[8],
    313                 'UAM_CONFIRM_MAIL_TRUE'          => $conf_UAM[2]=='true' ?  'checked="checked"' : '' ,
    314                 'UAM_CONFIRM_MAIL_FALSE'         => $conf_UAM[2]=='false' ?  'checked="checked"' : '' ,
    315                 'UAM_CONFIRMMAIL_TEXT'           => $conf_UAM[11],
    316                 'UAM_No_Confirm_Group'           => $conf_UAM[3],
    317                 'UAM_Validated_Group'            => $conf_UAM[4],
    318                 'UAM_No_Confirm_Status'          => $conf_UAM[9],
    319                 'UAM_Validated_Status'           => $conf_UAM[5],
    320                 'UAM_NO_COMMENT_ANO_TRUE'        => $conf_UAM[6]=='true' ?  'checked="checked"' : '' ,
    321                 'UAM_NO_COMMENT_ANO_FALSE'       => $conf_UAM[6]=='false' ?  'checked="checked"' : '' ,
    322                 'UAM_MAILEXCLUSION_TRUE'         => $conf_UAM[12]=='true' ?  'checked="checked"' : '' ,
    323                 'UAM_MAILEXCLUSION_FALSE'        => $conf_UAM[12]=='false' ?  'checked="checked"' : '' ,
    324                 'UAM_MAILEXCLUSION_LIST'         => $conf_UAM[13],
    325                 'UAM_PASSWORDENF_TRUE'           => $conf_UAM[14]=='true' ?  'checked="checked"' : '' ,
    326                 'UAM_PASSWORDENF_FALSE'          => $conf_UAM[14]=='false' ?  'checked="checked"' : '' ,
    327                 'UAM_PASSWORD_SCORE'             => $conf_UAM[15],
    328     'UAM_ADMINPASSWENF_TRUE'         => $conf_UAM[16]=='true' ?  'checked="checked"' : '' ,
    329                 'UAM_ADMINPASSWENF_FALSE'        => $conf_UAM[16]=='false' ?  'checked="checked"' : '' ,
    330     'UAM_GHOSTRACKER_TRUE'           => $conf_UAM[17]=='true' ?  'checked="checked"' : '' ,
    331                 'UAM_GHOSTRACKER_FALSE'          => $conf_UAM[17]=='false' ?  'checked="checked"' : '' ,
    332     'UAM_GHOSTRACKER_DAYLIMIT'       => $conf_UAM[18],
    333     'UAM_GHOSTRACKER_REMINDERTEXT'   => $conf_UAM[19],
    334     'UAM_ADDLASTVISIT_TRUE'          => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
    335     'UAM_ADDLASTVISIT_FALSE'         => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
    336     'UAM_ADMINCONFMAIL_TRUE'         => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
    337     'UAM_ADMINCONFMAIL_FALSE'        => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
     306                'UAM_MAILINFO_TEXT'              => $conf_UAM[9],
     307                'UAM_USERNAME_CHAR_TRUE'         => $conf_UAM[6]=='true' ?  'checked="checked"' : '' ,
     308                'UAM_USERNAME_CHAR_FALSE'        => $conf_UAM[6]=='false' ?  'checked="checked"' : '' ,
     309                'UAM_USERNAME_CHAR_LIST'         => $conf_UAM[7],
     310                'UAM_CONFIRM_MAIL_TRUE'          => $conf_UAM[1]=='true' ?  'checked="checked"' : '' ,
     311                'UAM_CONFIRM_MAIL_FALSE'         => $conf_UAM[1]=='false' ?  'checked="checked"' : '' ,
     312                'UAM_CONFIRMMAIL_TEXT'           => $conf_UAM[10],
     313                'UAM_No_Confirm_Group'           => $conf_UAM[2],
     314                'UAM_Validated_Group'            => $conf_UAM[3],
     315                'UAM_No_Confirm_Status'          => $conf_UAM[8],
     316                'UAM_Validated_Status'           => $conf_UAM[4],
     317                'UAM_NO_COMMENT_ANO_TRUE'        => $conf_UAM[5]=='true' ?  'checked="checked"' : '' ,
     318                'UAM_NO_COMMENT_ANO_FALSE'       => $conf_UAM[5]=='false' ?  'checked="checked"' : '' ,
     319                'UAM_MAILEXCLUSION_TRUE'         => $conf_UAM[11]=='true' ?  'checked="checked"' : '' ,
     320                'UAM_MAILEXCLUSION_FALSE'        => $conf_UAM[11]=='false' ?  'checked="checked"' : '' ,
     321                'UAM_MAILEXCLUSION_LIST'         => $conf_UAM[12],
     322                'UAM_PASSWORDENF_TRUE'           => $conf_UAM[13]=='true' ?  'checked="checked"' : '' ,
     323                'UAM_PASSWORDENF_FALSE'          => $conf_UAM[13]=='false' ?  'checked="checked"' : '' ,
     324                'UAM_PASSWORD_SCORE'             => $conf_UAM[14],
     325    'UAM_ADMINPASSWENF_TRUE'         => $conf_UAM[15]=='true' ?  'checked="checked"' : '' ,
     326                'UAM_ADMINPASSWENF_FALSE'        => $conf_UAM[15]=='false' ?  'checked="checked"' : '' ,
     327    'UAM_GHOSTRACKER_TRUE'           => $conf_UAM[16]=='true' ?  'checked="checked"' : '' ,
     328                'UAM_GHOSTRACKER_FALSE'          => $conf_UAM[16]=='false' ?  'checked="checked"' : '' ,
     329    'UAM_GHOSTRACKER_DAYLIMIT'       => $conf_UAM[17],
     330    'UAM_GHOSTRACKER_REMINDERTEXT'   => $conf_UAM[18],
     331    'UAM_ADDLASTVISIT_TRUE'          => $conf_UAM[19]=='true' ?  'checked="checked"' : '' ,
     332    'UAM_ADDLASTVISIT_FALSE'         => $conf_UAM[19]=='false' ?  'checked="checked"' : '' ,
     333    'UAM_ADMINCONFMAIL_TRUE'         => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
     334    'UAM_ADMINCONFMAIL_FALSE'        => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
    338335                'UAM_PASSWORD_TEST_SCORE'        => $UAM_Password_Test_Score,
    339336    'UAM_ERROR_REPORTS4'             => $UAM_Exclusionlist_Error,
     
    355352               
    356353/* username insensible a la casse */
    357     if (isset($conf_UAM[3]) and $conf_UAM[3] == 'true')
     354    if (isset($conf_UAM[2]) and $conf_UAM[2] == 'true')
    358355          {
    359356                        $query = "
     
    379376               
    380377/* Username without forbidden keys */
    381     if ( isset($conf_UAM[7]) and $conf_UAM[7] == 'true' )
     378    if ( isset($conf_UAM[6]) and $conf_UAM[6] == 'true' )
    382379          {
    383380                        $query = "
     
    398395               
    399396/* Email without forbidden domain */
    400     if ( isset($conf_UAM[12]) and $conf_UAM[12] == 'true' )
     397    if ( isset($conf_UAM[11]) and $conf_UAM[11] == 'true' )
    401398          {
    402399                        $query = "
     
    409406                  while($row = pwg_db_fetch_assoc($result))
    410407                  {
    411                           $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[13]);
     408                          $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[12]);
    412409                          for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++)
    413410                          {
     
    467464  $conf_UAM = unserialize($conf['UserAdvManager']);
    468465 
    469   if (isset($conf_UAM[20]) and $conf_UAM[20]=='true')
     466  if (isset($conf_UAM[19]) and $conf_UAM[19]=='true')
    470467  {
    471468// +-----------------------------------------------------------------------+
     
    555552      $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
    556553     
    557       if (isset($conf_UAM[17]) and $conf_UAM[17]=='true' and $conf_UAM[18] <> '')
     554      if (isset($conf_UAM[16]) and $conf_UAM[16]=='true' and $conf_UAM[17] <> '')
    558555      {
    559         if ($deltadays <= ($conf_UAM[18]/2))
     556        if ($deltadays <= ($conf_UAM[17]/2))
    560557        {
    561558          $display = 'green';
    562559        }
    563560       
    564         if (($deltadays > ($conf_UAM[18]/2)) and ($deltadays < $conf_UAM[18]))
     561        if (($deltadays > ($conf_UAM[17]/2)) and ($deltadays < $conf_UAM[17]))
    565562        {
    566563          $display = 'orange';
    567564        }
    568565       
    569         if ($deltadays >= $conf_UAM[18])
     566        if ($deltadays >= $conf_UAM[17])
    570567        {
    571568          $display = 'red';
     
    629626  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
    630627       
    631   if (isset($conf_UAM[2]) and $conf_UAM[2]=='true' and ((isset($conf_UAM[3]) and $conf_UAM[3] <> '-1') or (isset($conf_UAM[9]) and $conf_UAM[9] <> '-1')) and isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0]=='true')
     628  if (isset($conf_UAM[1]) and $conf_UAM[1]=='true' and ((isset($conf_UAM[2]) and $conf_UAM[2] <> '-1') or (isset($conf_UAM[8]) and $conf_UAM[8] <> '-1')) and isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0]=='true')
    632629  {
    633630// +-----------------------------------------------------------------------+
     
    11811178  $conf_UAM = unserialize($conf['UserAdvManager']);
    11821179       
    1183   if (isset($conf_UAM[17]) and $conf_UAM[17]=='true')
     1180  if (isset($conf_UAM[16]) and $conf_UAM[16]=='true')
    11841181  {
    11851182// +-----------------------------------------------------------------------+
Note: See TracChangeset for help on using the changeset viewer.