Rev | Line | |
---|
[25617] | 1 | <?php |
---|
| 2 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
| 3 | |
---|
[26061] | 4 | class 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 | ); |
---|
[25617] | 13 | |
---|
[26061] | 14 | function install($plugin_version, &$errors=array()) |
---|
| 15 | { |
---|
| 16 | global $conf; |
---|
[25617] | 17 | |
---|
[26061] | 18 | if (empty($conf['AdminTools'])) |
---|
| 19 | { |
---|
| 20 | $conf['AdminTools'] = serialize($this->default_conf); |
---|
| 21 | conf_update_param('AdminTools', $conf['AdminTools']); |
---|
| 22 | } |
---|
[25617] | 23 | |
---|
[26061] | 24 | $this->installed = true; |
---|
| 25 | } |
---|
[25617] | 26 | |
---|
[26061] | 27 | function activate($plugin_version, &$errors=array()) |
---|
| 28 | { |
---|
| 29 | if (!$this->installed) |
---|
| 30 | { |
---|
| 31 | $this->install($plugin_version, $errors); |
---|
| 32 | } |
---|
| 33 | } |
---|
[25617] | 34 | |
---|
[26061] | 35 | function deactivate() |
---|
| 36 | { |
---|
| 37 | } |
---|
[25617] | 38 | |
---|
[26061] | 39 | function uninstall() |
---|
| 40 | { |
---|
| 41 | conf_delete_param('AdminTools'); |
---|
| 42 | } |
---|
| 43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.