Changeset 14903


Ignore:
Timestamp:
May 11, 2012, 5:19:44 PM (9 years ago)
Author:
Eric
Message:

merge r10977 from trunk : using conf_update_param() and pwg_db_real_escape_string()

Location:
extensions/Register_FluxBB/branches/2.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Register_FluxBB/branches/2.4/admin/admin.php

    r8842 r14903  
    597597      if (!function_exists('FindAvailableConfirmMailID'))
    598598      {
    599       $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0';
     599      $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.pwg_db_real_escape_string($_POST['FluxBB_admin']).';'.pwg_db_real_escape_string($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0';
    600600      }
    601601      elseif (function_exists('FindAvailableConfirmMailID'))
     
    605605        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')
    606606        {
    607           $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'];
     607          $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.pwg_db_real_escape_string($_POST['FluxBB_admin']).';'.pwg_db_real_escape_string($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';'.$_POST['FluxBB_UAM'].';'.$_POST['FluxBB_group'];
    608608        }
    609609        else
    610610        {
    611           $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0';
     611          $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.pwg_db_real_escape_string($_POST['FluxBB_admin']).';'.pwg_db_real_escape_string($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0';
    612612        }
    613613      }
    614614
    615       $query = '
    616 UPDATE '.CONFIG_TABLE.'
    617 SET value="'.$conf['Register_FluxBB'].'"
    618 WHERE param="Register_FluxBB"
    619 LIMIT 1
    620 ;';
    621 
    622       pwg_query($query);
     615      conf_update_param('Register_FluxBB', $conf['Register_FluxBB']);
    623616     
    624617      array_push($page['infos'], l10n('save_config'));
  • extensions/Register_FluxBB/branches/2.4/maintain.inc.php

    r9984 r14903  
    4848  {
    4949    $upgrade_RFBB = $conf_Register_FluxBB[0].';'.$conf_Register_FluxBB[1].';'.$conf_Register_FluxBB[2].';'.$conf_Register_FluxBB[3].';'.$conf_Register_FluxBB[4].';'.$conf_Register_FluxBB[5].';false;0';
    50                
    51     $query = '
    52 UPDATE '.CONFIG_TABLE.'
    53 SET value="'.$upgrade_RFBB.'"
    54 WHERE param="Register_FluxBB"
    55 LIMIT 1
    56 ;';
    57                 pwg_query($query);
     50
     51    conf_update_param('Register_FluxBB', pwg_db_real_escape_string($upgrade_RFBB));
    5852  }
    5953}
Note: See TracChangeset for help on using the changeset viewer.