Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /* Lors de l'activation */ |
---|
4 | function theme_activate($id, $version, &$errors) |
---|
5 | { |
---|
6 | global $prefixeTable, $conf; |
---|
7 | |
---|
8 | if (!isset($conf['Sobre'])) |
---|
9 | { |
---|
10 | $config = array( |
---|
11 | 'home' => true, |
---|
12 | 'categories' => true, |
---|
13 | 'picture' => false, |
---|
14 | 'other' => true, |
---|
15 | ); |
---|
16 | |
---|
17 | $query = ' |
---|
18 | INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) |
---|
19 | VALUES ("Sobre" , "'.pwg_db_real_escape_string(serialize($config)).'" , "Sobre parameters");'; |
---|
20 | |
---|
21 | pwg_query($query); |
---|
22 | } |
---|
23 | } |
---|
24 | |
---|
25 | /* Lors de la désactivation */ |
---|
26 | function theme_deactivate() |
---|
27 | { |
---|
28 | global $prefixeTable; |
---|
29 | |
---|
30 | $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="Sobre" LIMIT 1;'; |
---|
31 | pwg_query($query); |
---|
32 | } |
---|
33 | |
---|
34 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.