Rev | Line | |
---|
[5544] | 1 | <?php |
---|
| 2 | |
---|
[5855] | 3 | /* Lors de l'activation */ |
---|
[5544] | 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, |
---|
[5855] | 15 | 'nbItemsMB' => 4, |
---|
[5544] | 16 | ); |
---|
| 17 | |
---|
| 18 | $query = ' |
---|
| 19 | INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) |
---|
| 20 | VALUES ("Sobre" , "'.addslashes(serialize($config)).'" , "Sobre parameters");'; |
---|
| 21 | |
---|
| 22 | pwg_query($query); |
---|
| 23 | } |
---|
| 24 | } |
---|
| 25 | |
---|
[5855] | 26 | /* Lors de la désactivation */ |
---|
[5544] | 27 | function theme_deactivate() |
---|
| 28 | { |
---|
| 29 | global $prefixeTable; |
---|
| 30 | |
---|
| 31 | $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="Sobre" LIMIT 1;'; |
---|
| 32 | pwg_query($query); |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.