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

Last change on this file since 26620 was 26620, checked in by mistic100, 11 years ago

revert file mistakenly comited in 26618

File size: 851 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'            => (isset($conff['loop'])) ? $conff['loop'] :true,
24    'autohide'            => (isset($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.