Ignore:
Timestamp:
Oct 23, 2013, 9:55:36 PM (10 years ago)
Author:
Eric
Message:

Bug 2986 rollback - The fix is not working well. A special notice is added in administration panel

File:
1 edited

Legend:

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

    r25092 r25101  
    433433
    434434  // Bug fix - We can not use "Guest" status and other are not suitable so we fix NO_CONFIRM_STATUS to "------------"
    435   $conf_UAM['NO_CONFIRM_STATUS'] == $status_options[-1];
    436 
    437   $template->assign(
    438     'No_Confirm_Status',
    439       array(
    440         'Status_options' => $status_options[-1],
    441         'Status_selected' => $status_options[-1]
    442       )
    443     );
     435//  $conf_UAM['NO_CONFIRM_STATUS'] == $status_options[-1];
     436//
     437//  $template->assign(
     438//    'No_Confirm_Status',
     439//      array(
     440//        'Status_options' => $status_options[-1],
     441//        'Status_selected' => $status_options[-1]
     442//      )
     443//    );
    444444
    445445  // Get unvalidate status values
    446446  // ----------------------------
    447 //  foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
    448 //  {
    449 //        $status_options[$status] = l10n('user_status_'.$status);
    450 //        if (isset($conf_UAM['NO_CONFIRM_STATUS']) and $conf_UAM['NO_CONFIRM_STATUS'] == $status)
    451 //        {
    452 //          $No_Valid_Status = $status;
    453 //        }
    454 //       
    455 //    // Template initialization for unvalidated users status
    456 //    // ----------------------------------------------------
    457 //    $template->assign(
    458 //      'No_Confirm_Status',
    459 //        array(
    460 //          'Status_options' => $status_options,
    461 //          'Status_selected' => $No_Valid_Status
    462 //        )
    463 //      );
    464 //  }
    465 
     447  foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
     448  {
     449          $status_options[$status] = l10n('user_status_'.$status);
     450          if (isset($conf_UAM['NO_CONFIRM_STATUS']) and $conf_UAM['NO_CONFIRM_STATUS'] == $status)
     451          {
     452            $No_Valid_Status = $status;
     453          }
     454         
     455    // Template initialization for unvalidated users status
     456    // ----------------------------------------------------
     457    $template->assign(
     458      'No_Confirm_Status',
     459        array(
     460          'Status_options' => $status_options,
     461          'Status_selected' => $No_Valid_Status
     462        )
     463      );
     464  }
     465 
    466466  // Get validate status values
    467467  // --------------------------
     
    487487
    488488  // Bug fix - We can not use "Guest" status and other are not suitable so we fix DOWNGRADE_STATUS to "------------"
    489   $conf_UAM['DOWNGRADE_STATUS'] == $status_options[-1];
    490 
    491   $template->assign(
    492     'Downgrade_Status',
    493       array(
    494         'Status_options' => $status_options[-1],
    495         'Status_selected' => $status_options[-1]
    496       )
    497     );
     489//  $conf_UAM['DOWNGRADE_STATUS'] == $status_options[-1];
     490//
     491//  $template->assign(
     492//    'Downgrade_Status',
     493//      array(
     494//        'Status_options' => $status_options[-1],
     495//        'Status_selected' => $status_options[-1]
     496//      )
     497//    );
    498498
    499499  // Get downgrade status values
    500500  // ---------------------------
    501 //  foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
    502 //  {
    503 //    $status_options[$status] = l10n('user_status_'.$status);
    504 //    if (isset($conf_UAM['DOWNGRADE_STATUS']) and $conf_UAM['DOWNGRADE_STATUS'] == $status)
    505 //    {
    506 //      $Downgrade_Status = $status;
    507 //    }
    508 //             
    509 //    // Template initialization for validated users status
    510 //    // --------------------------------------------------
    511 //    $template->assign(
    512 //      'Downgrade_Status',
    513 //        array(
    514 //          'Status_options' => $status_options,
    515 //          'Status_selected' => $Downgrade_Status
    516 //        )
    517 //      );
    518 //  }
     501  foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
     502  {
     503    $status_options[$status] = l10n('user_status_'.$status);
     504    if (isset($conf_UAM['DOWNGRADE_STATUS']) and $conf_UAM['DOWNGRADE_STATUS'] == $status)
     505    {
     506      $Downgrade_Status = $status;
     507    }
     508               
     509    // Template initialization for validated users status
     510    // --------------------------------------------------
     511    $template->assign(
     512      'Downgrade_Status',
     513        array(
     514          'Status_options' => $status_options,
     515          'Status_selected' => $Downgrade_Status
     516        )
     517      );
     518  }
    519519
    520520
Note: See TracChangeset for help on using the changeset viewer.