Ignore:
Timestamp:
Aug 28, 2010, 10:20:24 PM (14 years ago)
Author:
Eric
Message:

bug 1434 fixed : Bridge between Register_FluxBB and UAM for users registration control

  • Language files updated (FR and EN are OK. DE is to do)
  • Admin page small refactory
  • Database upgrade process updated for new plugin version
  • Version 2.3.0 hard coded
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Register_FluxBB/trunk/admin/admin.php

    r5635 r6815  
    572572        case 'manage':
    573573 
    574   if ( isset($_POST['submit']) and !is_adviser() and isset($_POST['FluxBB_prefix']) and isset($_POST['FluxBB_admin']) and isset($_POST['FluxBB_guest']) and isset($_POST['FluxBB_del_pt']) and isset($_POST['FluxBB_confirm']) and isset($_POST['FluxBB_details']) )
    575   {
    576     $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'];
     574  if (isset($_POST['submit']) and !is_adviser() and isset($_POST['FluxBB_prefix']) and isset($_POST['FluxBB_admin']) and isset($_POST['FluxBB_guest']) and isset($_POST['FluxBB_del_pt']) and isset($_POST['FluxBB_confirm']) and isset($_POST['FluxBB_details']))
     575  {
     576    $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';'.$_POST['FluxBB_UAM'].';'.$_POST['FluxBB_group'];
    577577
    578578    $query = '
     
    598598      'FluxBB_ADMIN'         => stripslashes($conf_Register_FluxBB[1]),
    599599      'FluxBB_GUEST'         => stripslashes($conf_Register_FluxBB[2]),
    600       'FluxBB_DEL_PT_TRUE'   => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'true') ? 'checked="checked"' : '' ,
    601       'FluxBB_DEL_PT_FALSE'  => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'false') ? 'checked="checked"' : '' ,
    602       'FluxBB_CONFIRM_TRUE'  => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'true') ? 'checked="checked"' : '' ,
    603       'FluxBB_CONFIRM_FALSE' => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'false') ? 'checked="checked"' : '' ,
    604       'FluxBB_DETAILS_TRUE'  => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'true') ? 'checked="checked"' : '' ,
    605       'FluxBB_DETAILS_FALSE' => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'false') ? 'checked="checked"' : '' ,
     600      'FluxBB_DEL_PT_TRUE'   => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'true') ? 'checked="checked"' : '',
     601      'FluxBB_DEL_PT_FALSE'  => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'false') ? 'checked="checked"' : '',
     602      'FluxBB_CONFIRM_TRUE'  => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'true') ? 'checked="checked"' : '',
     603      'FluxBB_CONFIRM_FALSE' => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'false') ? 'checked="checked"' : '',
     604      'FluxBB_DETAILS_TRUE'  => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'true') ? 'checked="checked"' : '',
     605      'FluxBB_DETAILS_FALSE' => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'false') ? 'checked="checked"' : '',
     606    )
     607  );
     608
     609// If UAM exists and if UAM ConfirmMail is set, we can set this feature
     610  if (function_exists('FindAvailableConfirmMailID'))
     611  { 
     612    $conf_UAM = unserialize($conf['UserAdvManager']);
     613    $UAM_bridge = false;
     614   
     615    if (isset($conf_UAM[1]) and ($conf_UAM[1] == 'true' or $conf_UAM[1] == 'local') and isset($conf_UAM[2]) and $conf_UAM[2] != '-1')
     616    {
     617      $UAM_bridge = true;
     618    }
     619  }
     620 
     621  $template->assign(
     622    array
     623    (
     624      'UAM_BRIDGE'            => $UAM_bridge,
     625      'FluxBB_UAM_LINK_TRUE'  => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '',
     626      'FluxBB_UAM_LINK_FALSE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '',
     627      'FluxBB_GROUP'          => $conf_Register_FluxBB[7],
    606628    )
    607629  );
Note: See TracChangeset for help on using the changeset viewer.