Index: /extensions/bbcode_bar/admin.php
===================================================================
--- /extensions/bbcode_bar/admin.php	(revision 28834)
+++ /extensions/bbcode_bar/admin.php	(revision 28835)
@@ -12,5 +12,5 @@
   }
   
-  conf_update_param('bbcode_bar', serialize($conf['bbcode_bar']));
+  conf_update_param('bbcode_bar', $conf['bbcode_bar']);
   $page['infos'][] = l10n('Information data registered in database');
 }
Index: /extensions/bbcode_bar/main.inc.php
===================================================================
--- /extensions/bbcode_bar/main.inc.php	(revision 28834)
+++ /extensions/bbcode_bar/main.inc.php	(revision 28835)
@@ -10,9 +10,7 @@
 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
 
-define('BBCODE_ID' ,    basename(dirname(__FILE__)));
-define('BBCODE_PATH' ,    PHPWG_PLUGINS_PATH . BBCODE_ID . '/');
-define('BBCODE_ADMIN',    get_root_url() . 'admin.php?page=plugin-' . BBCODE_ID);
-define('BBCODE_VERSION',  'auto');
-
+define('BBCODE_ID' ,   basename(dirname(__FILE__)));
+define('BBCODE_PATH' , PHPWG_PLUGINS_PATH . BBCODE_ID . '/');
+define('BBCODE_ADMIN', get_root_url() . 'admin.php?page=plugin-' . BBCODE_ID);
 
 include_once(BBCODE_PATH.'include/functions.inc.php');
@@ -39,9 +37,5 @@
   global $conf;
   
-  include_once(BBCODE_PATH . 'maintain.inc.php');
-  $maintain = new bbcode_bar_maintain(BBCODE_ID);
-  $maintain->autoUpdate(BBCODE_VERSION, 'install');
-  
-  $conf['bbcode_bar'] = unserialize($conf['bbcode_bar']);
+  $conf['bbcode_bar'] = safe_unserialize($conf['bbcode_bar']);
   $conf['bbcode_bar_codes'] = array('b','i','u','s','p','center','right','quote','ul','ol','img','url','email','size','color');
   
Index: /extensions/bbcode_bar/maintain.class.php
===================================================================
--- /extensions/bbcode_bar/maintain.class.php	(revision 28835)
+++ /extensions/bbcode_bar/maintain.class.php	(revision 28835)
@@ -0,0 +1,43 @@
+<?php
+defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
+
+class bbcode_bar_maintain extends PluginMaintain
+{
+  private $default_conf = array(
+    'b' => true,
+    'i' => true,
+    'u' => true,
+    's' => true,
+    'p' => true,
+    'center' => true,
+    'right' => true,
+    'quote' => true,
+    'ul' => true,
+    'ol' => true,
+    'img' => true,
+    'url' => true,
+    'email' => true,
+    'size' => true,
+    'color' => true,
+    );
+
+  function install($plugin_version, &$errors=array())
+  {
+    global $conf;
+    
+    if (!isset($conf['bbcode_bar']))
+    {
+      conf_update_param('bbcode_bar', $this->default_conf, true);
+    }
+  }
+
+  function update($old_version, $new_version, &$errors=array())
+  {
+    $this->install($new_version, $errors);
+  }
+
+  function uninstall()
+  {
+    conf_delete_param('bbcode_bar');
+  }
+}
Index: tensions/bbcode_bar/maintain.inc.php
===================================================================
--- /extensions/bbcode_bar/maintain.inc.php	(revision 28834)
+++ 	(revision )
@@ -1,56 +1,0 @@
-<?php
-defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
-
-class bbcode_bar_maintain extends PluginMaintain
-{
-  private $installed = false;
-  
-  private $default_conf = array(
-    'b' => true,
-    'i' => true,
-    'u' => true,
-    's' => true,
-    'p' => true,
-    'center' => true,
-    'right' => true,
-    'quote' => true,
-    'ul' => true,
-    'ol' => true,
-    'img' => true,
-    'url' => true,
-    'email' => true,
-    'size' => true,
-    'color' => true,
-    );
-
-  function install($plugin_version, &$errors=array())
-  {
-    global $conf;
-    
-    if (!isset($conf['bbcode_bar']))
-    {
-      $conf['bbcode_bar'] = serialize($this->default_conf);
-
-      conf_update_param('bbcode_bar', $conf['bbcode_bar']);
-    }
-    
-    $this->installed = true;
-  }
-
-  function activate($plugin_version, &$errors=array())
-  {
-    if (!$this->installed)
-    {
-      $this->install($plugin_version, $errors);
-    }
-  }
-
-  function deactivate()
-  {
-  }
-
-  function uninstall()
-  {
-    conf_delete_param('bbcode_bar');
-  }
-}
