Ignore:
Timestamp:
May 21, 2011, 4:54:45 PM (13 years ago)
Author:
Eric
Message:

using conf_update_param() and pwg_db_real_escape_string()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/HistoryIPExcluder/trunk/include/dbupgrade.inc.php

    r10045 r10978  
    33/* Database upgrading functions */
    44
    5 // This wil update only current plugin version number in database
     5// This will update only current plugin version number in database
    66function global_version_update()
    77{
     
    2525 
    2626  $Newconf_HIPE['Version'] = $version;
    27  
    28   $update_conf = serialize($Newconf_HIPE);
    2927
    30   $query = '
    31 UPDATE '.CONFIG_TABLE.'
    32 SET value="'.addslashes($update_conf).'"
    33 WHERE param="HistoryIPConfig"
    34 LIMIT 1
    35 ;';
    36 
    37         pwg_query($query);
     28  conf_update_param('HistoryIPConfig', pwg_db_real_escape_string(serialize($Newconf_HIPE)));
    3829}
    3930
     
    7162  $q = '
    7263INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
    73 VALUES ("HistoryIPConfig","'.addslashes(serialize($default)).'","History IP Excluder options");
     64VALUES ("HistoryIPConfig","'.pwg_db_real_escape_string(serialize($default)).'","History IP Excluder options");
    7465';
    7566     
Note: See TracChangeset for help on using the changeset viewer.