source: trunk/themes/smartpocket/admin/upgrade.inc.php @ 26627

Last change on this file since 26627 was 26627, checked in by flop25, 10 years ago

smartpocket: Thememaintain class used in maintain.inc.php-> no more issue on 2.6 installation (tested)

File size: 853 bytes
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5global $prefixeTable, $conf;
6
7if (!isset($conf['smartpocket']))
8{
9  $config = array(
10    'loop'            => true,//true - false
11    'autohide'            => 5000,//5000 - 0
12  );
13  $query = "
14INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
15VALUES ('smartpocket' , '".pwg_db_real_escape_string(serialize($config))."' , 'loop#autohide');";
16  pwg_query($query);
17  load_conf_from_db();
18}
19elseif (count(unserialize( $conf['smartpocket'] ))!=2)
20{
21  $conff=unserialize($conf['smartpocket']);
22  $config = array(
23    'loop'            => (!empty($conff['loop'])) ? $conff['loop'] :true,
24    'autohide'            => (!empty($conff['autohide'])) ? $conff['autohide'] :5000,
25  );
26  conf_update_param('smartpocket', pwg_db_real_escape_string(serialize($config)));
27  load_conf_from_db();
28}
29?>
Note: See TracBrowser for help on using the repository browser.