Rev | Line | |
---|
[28835] | 1 | <?php |
---|
| 2 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
| 3 | |
---|
| 4 | class bbcode_bar_maintain extends PluginMaintain |
---|
| 5 | { |
---|
| 6 | private $default_conf = array( |
---|
| 7 | 'b' => true, |
---|
| 8 | 'i' => true, |
---|
| 9 | 'u' => true, |
---|
| 10 | 's' => true, |
---|
| 11 | 'p' => true, |
---|
| 12 | 'center' => true, |
---|
| 13 | 'right' => true, |
---|
| 14 | 'quote' => true, |
---|
| 15 | 'ul' => true, |
---|
| 16 | 'ol' => true, |
---|
| 17 | 'img' => true, |
---|
| 18 | 'url' => true, |
---|
| 19 | 'email' => true, |
---|
| 20 | 'size' => true, |
---|
| 21 | 'color' => true, |
---|
| 22 | ); |
---|
| 23 | |
---|
| 24 | function install($plugin_version, &$errors=array()) |
---|
| 25 | { |
---|
| 26 | global $conf; |
---|
| 27 | |
---|
| 28 | if (!isset($conf['bbcode_bar'])) |
---|
| 29 | { |
---|
| 30 | conf_update_param('bbcode_bar', $this->default_conf, true); |
---|
| 31 | } |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | function update($old_version, $new_version, &$errors=array()) |
---|
| 35 | { |
---|
| 36 | $this->install($new_version, $errors); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | function uninstall() |
---|
| 40 | { |
---|
| 41 | conf_delete_param('bbcode_bar'); |
---|
| 42 | } |
---|
| 43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.