Ignore:
Timestamp:
Nov 12, 2014, 2:34:53 PM (9 years ago)
Author:
plg
Message:

bug 3174 fixed: avoid using load_conf_from_db, use 3rd parameter updateGlobal instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/smartpocket/admin/maintain.inc.php

    r26627 r30460  
    1515    if (empty($conf['smartpocket']))
    1616    {
    17       $conf['smartpocket'] = serialize($this->default_conf);
    18       $query = "
    19   INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
    20   VALUES ('smartpocket' , '".pwg_db_real_escape_string($conf['smartpocket'])."' , 'loop#autohide');";
    21       pwg_query($query);
     17      conf_update_param('smartpocket', $this->default_conf, true);
    2218    }
    23     elseif (count(unserialize( $conf['smartpocket'] ))!=2)
     19    elseif (count(safe_unserialize($conf['smartpocket'])) != 2)
    2420    {
    25       $conff=unserialize($conf['smartpocket']);
     21      $conff = safe_unserialize($conf['smartpocket']);
     22     
    2623      $config = array(
    27         'loop'            => (!empty($conff['loop'])) ? $conff['loop'] :true,
    28         'autohide'            => (!empty($conff['autohide'])) ? $conff['autohide'] :5000,
     24        'loop' => (!empty($conff['loop'])) ? $conff['loop'] :true,
     25        'autohide' => (!empty($conff['autohide'])) ? $conff['autohide'] :5000,
    2926      );
    30       conf_update_param('smartpocket', pwg_db_real_escape_string(serialize($config)));
    31       load_conf_from_db();
     27     
     28      conf_update_param('smartpocket', $config, true);
    3229    }
    3330    $this->installed = true;
     
    3532
    3633  function deactivate()
    37   { }
     34  {
     35  }
    3836
    3937  function delete()
Note: See TracChangeset for help on using the changeset viewer.