|
Revision 6252, 0.7 KB
(checked in by Gotcha, 3 years ago)
|
|
Conversion in UT8 without BOM
|
| 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 | 'nbItemsMB' => 4, |
|---|
| 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 | |
|---|
| 26 | /* Lors de la désactivation */ |
|---|
| 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 | ?> |
|---|