source: extensions/AdminTools/maintain.inc.php @ 28145

Last change on this file since 28145 was 26061, checked in by mistic100, 11 years ago

add configuration page

File size: 815 bytes
Line 
1<?php
2defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
3
4class AdminTools_maintain extends PluginMaintain
5{
6  private $installed = false;
7 
8  private $default_conf = array(
9    'default_open' => true,
10    'closed_position' => 'left',
11    'public_quick_edit' => true,
12    );
13
14  function install($plugin_version, &$errors=array())
15  {
16    global $conf;
17
18    if (empty($conf['AdminTools']))
19    {
20      $conf['AdminTools'] = serialize($this->default_conf);
21      conf_update_param('AdminTools', $conf['AdminTools']);
22    }
23
24    $this->installed = true;
25  }
26
27  function activate($plugin_version, &$errors=array())
28  {
29    if (!$this->installed)
30    {
31      $this->install($plugin_version, $errors);
32    }
33  }
34
35  function deactivate()
36  {
37  }
38
39  function uninstall()
40  {
41    conf_delete_param('AdminTools');
42  }
43}
Note: See TracBrowser for help on using the repository browser.