Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | function theme_activate($id, $version, &$errors) |
---|
4 | { |
---|
5 | global $conf; |
---|
6 | |
---|
7 | include_once( dirname(dirname(__FILE__)).'/functions.inc.php'); |
---|
8 | $default_conf = modus_get_default_config(); |
---|
9 | |
---|
10 | $my_conf = @$conf['modus_theme']; |
---|
11 | $my_conf = @unserialize($my_conf); |
---|
12 | if (empty($my_conf)) |
---|
13 | $my_conf = $default_conf; |
---|
14 | |
---|
15 | $my_conf = array_merge($default_conf, $my_conf); |
---|
16 | $my_conf = array_intersect_key($my_conf, $default_conf); |
---|
17 | conf_update_param('modus_theme', addslashes(serialize($my_conf)) ); |
---|
18 | } |
---|
19 | |
---|
20 | function theme_delete() |
---|
21 | { |
---|
22 | $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="modus_theme"'; |
---|
23 | pwg_query($query); |
---|
24 | } |
---|
25 | |
---|
26 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.