Changeset 30460 for trunk/themes/smartpocket/admin/maintain.inc.php
- Timestamp:
- Nov 12, 2014, 2:34:53 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/smartpocket/admin/maintain.inc.php
r26627 r30460 15 15 if (empty($conf['smartpocket'])) 16 16 { 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); 22 18 } 23 elseif (count( unserialize( $conf['smartpocket'] ))!=2)19 elseif (count(safe_unserialize($conf['smartpocket'])) != 2) 24 20 { 25 $conff=unserialize($conf['smartpocket']); 21 $conff = safe_unserialize($conf['smartpocket']); 22 26 23 $config = array( 27 'loop' 28 'autohide' 24 'loop' => (!empty($conff['loop'])) ? $conff['loop'] :true, 25 'autohide' => (!empty($conff['autohide'])) ? $conff['autohide'] :5000, 29 26 ); 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); 32 29 } 33 30 $this->installed = true; … … 35 32 36 33 function deactivate() 37 { } 34 { 35 } 38 36 39 37 function delete()
Note: See TracChangeset
for help on using the changeset viewer.