source: extensions/sobre/admin/maintain.inc.php @ 6252

Last change on this file since 6252 was 6252, checked in by Gotcha, 10 years ago

Conversion in UT8 without BOM

File size: 693 bytes
Line 
1<?php
2
3/* Lors de l'activation */
4function 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 = '
19INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
20VALUES ("Sobre" , "'.addslashes(serialize($config)).'" , "Sobre parameters");';
21
22    pwg_query($query);
23  }
24}
25
26/* Lors de la désactivation */
27function 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.