Index: extensions/AddUsersNotes/main.inc.php
===================================================================
--- extensions/AddUsersNotes/main.inc.php	(revision 28380)
+++ extensions/AddUsersNotes/main.inc.php	(revision 29854)
@@ -19,5 +19,4 @@
 define('USERNOTES_ID', basename(dirname(__FILE__)));
 define('USERNOTES_PATH', PHPWG_PLUGINS_PATH.USERNOTES_ID.'/');
-define('USERNOTES_VERSION', 'auto');
 
 // init the plugin
@@ -31,9 +30,4 @@
 function usernotes_init()
 {
-  // apply upgrade if needed
-  include_once(USERNOTES_PATH.'maintain.inc.php');
-  $maintain = new AddUsersNotes_maintain(USERNOTES_ID);
-  $maintain->autoUpdate(USERNOTES_VERSION, 'install');
-  
   // load plugin language file
   load_language('plugin.lang', USERNOTES_PATH);
Index: extensions/AddUsersNotes/maintain.class.php
===================================================================
--- extensions/AddUsersNotes/maintain.class.php	(revision 29854)
+++ extensions/AddUsersNotes/maintain.class.php	(revision 29854)
@@ -0,0 +1,66 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+class AddUsersNotes_maintain extends PluginMaintain
+{
+  private $installed = false;
+
+  function __construct($plugin_id)
+  {
+    parent::__construct($plugin_id);
+  }
+
+  function install($plugin_version, &$errors=array())
+  {
+    global $prefixeTable;
+    
+    // add a new column to existing table
+    $result = pwg_query('SHOW COLUMNS FROM `'.USER_INFOS_TABLE.'` LIKE "usernotes";');
+    if (!pwg_db_num_rows($result))
+    {
+      pwg_query('ALTER TABLE `' . USER_INFOS_TABLE . '` ADD `usernotes` VARCHAR(255) DEFAULT NULL;');
+    }
+
+    // if we find the old table, we copy notes
+    $result = pwg_query('SHOW TABLES LIKE "'.$prefixeTable.'user_notes";');
+    if (pwg_db_num_rows($result))
+    {
+      $query = '
+UPDATE
+    '.USER_INFOS_TABLE.' AS ui,
+    '.$prefixeTable.'user_notes AS un
+  SET ui.usernotes = un.note
+  WHERE ui.user_id = un.user_id
+    AND LENGTH(note) > 0
+;';
+      pwg_query($query);
+
+      pwg_query('DROP TABLE '.$prefixeTable.'user_notes;');
+    }
+    
+    $this->installed = true;
+  }
+
+  function activate($plugin_version, &$errors=array())
+  {
+    if (!$this->installed)
+    {
+      $this->install($plugin_version, $errors);
+    }
+  }
+
+  function update($old_version, $new_version, &$errors=array())
+  {
+    $this->install($new_version, $errors);
+  }
+  
+  function deactivate()
+  {
+  }
+
+  function uninstall()
+  {
+    pwg_query('ALTER TABLE `'. USER_INFOS_TABLE .'` DROP `usernotes`;');
+  }
+}
+?>
Index: extensions/AddUsersNotes/maintain.inc.php
===================================================================
--- extensions/AddUsersNotes/maintain.inc.php	(revision 28380)
+++ 	(revision )
@@ -1,61 +1,0 @@
-<?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-class AddUsersNotes_maintain extends PluginMaintain
-{
-  private $installed = false;
-
-  function __construct($plugin_id)
-  {
-    parent::__construct($plugin_id);
-  }
-
-  function install($plugin_version, &$errors=array())
-  {
-    global $prefixeTable;
-    
-    // add a new column to existing table
-    $result = pwg_query('SHOW COLUMNS FROM `'.USER_INFOS_TABLE.'` LIKE "usernotes";');
-    if (!pwg_db_num_rows($result))
-    {
-      pwg_query('ALTER TABLE `' . USER_INFOS_TABLE . '` ADD `usernotes` VARCHAR(255) DEFAULT NULL;');
-    }
-
-    // if we find the old table, we copy notes
-    $result = pwg_query('SHOW TABLES LIKE "'.$prefixeTable.'user_notes";');
-    if (pwg_db_num_rows($result))
-    {
-      $query = '
-UPDATE
-    '.USER_INFOS_TABLE.' AS ui,
-    '.$prefixeTable.'user_notes AS un
-  SET ui.usernotes = un.note
-  WHERE ui.user_id = un.user_id
-    AND LENGTH(note) > 0
-;';
-      pwg_query($query);
-
-      pwg_query('DROP TABLE '.$prefixeTable.'user_notes;');
-    }
-    
-    $this->installed = true;
-  }
-
-  function activate($plugin_version, &$errors=array())
-  {
-    if (!$this->installed)
-    {
-      $this->install($plugin_version, $errors);
-    }
-  }
-
-  function deactivate()
-  {
-  }
-
-  function uninstall()
-  {
-    pwg_query('ALTER TABLE `'. USER_INFOS_TABLE .'` DROP `usernotes`;');
-  }
-}
-?>
