Index: /extensions/meta/admin/admin.php
===================================================================
--- /extensions/meta/admin/admin.php	(revision 7538)
+++ /extensions/meta/admin/admin.php	(revision 7539)
@@ -12,120 +12,4 @@
 
 //-------------------------------------------------------- sections definitions
-
-//Gestion MAJ2
-$majm2='meta 2.1.0';
-$query = '
-select param,value
-	FROM ' . CONFIG_TABLE . '
-  WHERE param = \''.$majm2.'\'
-	;';
-$result = pwg_query($query);
-
-$row = mysql_fetch_array($result);
-$majparam2=$row['param'];
-$majvalue2=$row['value'];
-
-if (!$majvalue2==1 and !is_adviser())
-	{
-$template->delete_compiled_templates(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
-$maj = 'maj';
-$template->assign(
-	$maj,
-	array(
-	  'meta'=>l10n('meta_name'),
-	  ));
-if (isset($_POST['maj']) and !is_adviser())
-		{
-
-	
-	//Gestion MAJ1
-$majm1='meta 2.0.5';
-$query = '
-select param,value
-	FROM ' . CONFIG_TABLE . '
-  WHERE param = \''.$majm1.'\'
-	;';
-$result = pwg_query($query);
-
-$row = mysql_fetch_array($result);
-$majparam1=$row['param'];
-$majvalue1=$row['value'];
-
-if (!$majvalue1==1)
-	{
-    global $prefixeTable;
-if (!defined('meta_img_TABLE')) define('meta_img_TABLE', $prefixeTable.'meta_img');
-	$query = "CREATE TABLE IF NOT EXISTS ". meta_img_TABLE ." (
-id SMALLINT( 5 ) UNSIGNED NOT NULL ,
-metaKeyimg VARCHAR( 255 ) NOT NULL ,
-PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
-	$result = pwg_query($query);
-
-if (!defined('meta_cat_TABLE')) define('meta_cat_TABLE', $prefixeTable.'meta_cat');	
-	$query = "CREATE TABLE IF NOT EXISTS ". meta_cat_TABLE ." (
-id SMALLINT( 5 ) UNSIGNED NOT NULL ,
-metaKeycat VARCHAR( 255 ) NOT NULL ,
-PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
-	$result = pwg_query($query);
-
-	$query = '
-select id
-  FROM ' . CATEGORIES_TABLE . '
-  ORDER BY id DESC;';
-$result = pwg_query($query);
-$row = mysql_fetch_array($result);
-
-$comp=$row['id']+1;	
-$i=1;
-
-	while($i < $comp)
-{
-	$query = '
-select id,metaKeywords
-  FROM ' . CATEGORIES_TABLE . '
-  WHERE id = \''.$i.'\'';
-$result = pwg_query($query);
-$row = mysql_fetch_array($result);
-
-		if(!$row['id']==0 and !$row['metaKeywords']==0)
-		{
-	$query = '
-INSERT INTO ' . $prefixeTable . 'meta_cat(id,metaKeycat)VALUES ('.$row['id'].',"'.$row['metaKeywords'].'");';
-	$result = pwg_query($query);
-		}
-	++$i;
-}
-	
-	$query = ' ALTER TABLE '. CATEGORIES_TABLE .' DROP COLUMN `metaKeywords`';
-    pwg_query($query);
-	
-	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("'.$majm1.'",1,"MAJ meta");';
-    pwg_query($query);
-	$majvalue1==1;
-	$maj =0;
-	}
-	
-		
-	  $q = '
-ALTER TABLE '.meta_cat_TABLE.' ADD COLUMN metadescat VARCHAR( 255 ) NOT NULL ';
-  pwg_query($q);
-  
-  	  $q = '
-ALTER TABLE '.meta_img_TABLE.' ADD COLUMN metadesimg VARCHAR( 255 ) NOT NULL ';
-  pwg_query($q);
-	
-	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("'.$majm2.'",1,"MAJ meta");';
-    pwg_query($query);
-
-    $template->delete_compiled_templates(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
-
-	array_push($page['infos'], l10n('meta_majt'));
-	
-	$majvalue2==1;
-	$maj =0;
-		}
-	
-	}
-	else{
 
 // Gestion des onglets
@@ -415,5 +299,5 @@
 	
 } 
-}
+
 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
Index: /extensions/meta/admin/admin.tpl
===================================================================
--- /extensions/meta/admin/admin.tpl	(revision 7538)
+++ /extensions/meta/admin/admin.tpl	(revision 7539)
@@ -2,11 +2,4 @@
   <h2>meta</h2>
 </div>
-{if isset ($maj)}
-		<form method="post" >
-			<div style="text-align:center;">
-				<input class="submit" name="maj" type="submit" value="{'meta_maj'|@translate}" {$TAG_INPUT_ENABLED} />
-			</div>
-		</form>
-{/if}
 {if isset ($gestionA)}
 		  <h3>{'meta_desh3'|@translate}</h3>
Index: /extensions/meta/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/meta/language/en_UK/plugin.lang.php	(revision 7538)
+++ /extensions/meta/language/en_UK/plugin.lang.php	(revision 7539)
@@ -58,8 +58,3 @@
 none : Prevent the robot from pursuing the indexation of the site<br>
 ';
-
-//upgrade
-$lang['meta_maj'] = 'Upgrade';
-$lang['meta_majt'] = 'Upgrade Complete<br>Please click on the menu meta to return to management plugin';
-
 ?>
Index: /extensions/meta/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/meta/language/es_ES/plugin.lang.php	(revision 7538)
+++ /extensions/meta/language/es_ES/plugin.lang.php	(revision 7539)
@@ -59,7 +59,3 @@
 ';
 
-//upgrade
-$lang['meta_maj'] = 'Actualización';
-$lang['meta_majt'] = 'Actualización acabada <br> haga clic en el menu meta para volver a la gestión del plugin';
-
 ?>
Index: /extensions/meta/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/meta/language/fr_FR/plugin.lang.php	(revision 7538)
+++ /extensions/meta/language/fr_FR/plugin.lang.php	(revision 7539)
@@ -58,8 +58,3 @@
 none : Empêche le robot de poursuivre l\'indexation du site<br>
 ';
-
-//upgrade
-$lang['meta_maj'] = 'Mise à jour';
-$lang['meta_majt'] = 'Mise à jour terminée<br> Faites un clic sur le menu meta pour revenir à la gestion du plugin';
-
 ?>
Index: /extensions/meta/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/meta/language/hu_HU/plugin.lang.php	(revision 7538)
+++ /extensions/meta/language/hu_HU/plugin.lang.php	(revision 7539)
@@ -58,8 +58,3 @@
 none : Tiltja a robotoknak, hogy indexeljék a weboldalt<br>
 ';
-
-//upgrade
-$lang['meta_maj'] = 'Frissítés';
-$lang['meta_majt'] = 'Frissítés sikeres<br>Kérjük kattintson a menüre a meta kezelő bővítményhez történő visszatéréshez';
-
 ?>
Index: /extensions/meta/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/meta/language/it_IT/plugin.lang.php	(revision 7538)
+++ /extensions/meta/language/it_IT/plugin.lang.php	(revision 7539)
@@ -59,7 +59,3 @@
 ';
 
-//upgrade
-$lang['meta_maj'] = 'Aggiornamento';
-$lang['meta_majt'] = 'Aggiornamento completato<br> Cliccare sul menu Meta per ritornare alla pagina di gestione del plugin';
-
 ?>
Index: /extensions/meta/maintain.inc.php
===================================================================
--- /extensions/meta/maintain.inc.php	(revision 7538)
+++ /extensions/meta/maintain.inc.php	(revision 7539)
@@ -2,4 +2,114 @@
 
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+function plugin_activate()
+{
+	    global $prefixeTable, $template;
+		define('meta_DIR' , basename(dirname(__FILE__)));
+		define('meta_PATH' , PHPWG_PLUGINS_PATH . meta_DIR . '/');
+		define('meta_TABLE' , $prefixeTable . 'meta');
+		define('meta_img_TABLE' , $prefixeTable . 'meta_img');
+		define('meta_cat_TABLE' , $prefixeTable . 'meta_cat');
+		
+//Gestion MAJ2
+$majm2='meta 2.1.0';
+$query = '
+select param,value
+	FROM ' . CONFIG_TABLE . '
+  WHERE param = \''.$majm2.'\'
+	;';
+$result = pwg_query($query);
+
+$row = mysql_fetch_array($result);
+$majparam2=$row['param'];
+$majvalue2=$row['value'];
+
+if (!$majvalue2==1 and !is_adviser())
+ {
+
+//Gestion MAJ1
+$majm1='meta 2.0.5';
+$query = '
+select param,value
+	FROM ' . CONFIG_TABLE . '
+  WHERE param = \''.$majm1.'\'
+	;';
+$result = pwg_query($query);
+
+$row = mysql_fetch_array($result);
+$majparam1=$row['param'];
+$majvalue1=$row['value'];
+
+if (!$majvalue1==1)
+	{
+if (!defined('meta_img_TABLE')) define('meta_img_TABLE', $prefixeTable.'meta_img');
+	$query = "CREATE TABLE IF NOT EXISTS ". meta_img_TABLE ." (
+id SMALLINT( 5 ) UNSIGNED NOT NULL ,
+metaKeyimg VARCHAR( 255 ) NOT NULL ,
+PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
+	$result = pwg_query($query);
+
+if (!defined('meta_cat_TABLE')) define('meta_cat_TABLE', $prefixeTable.'meta_cat');	
+	$query = "CREATE TABLE IF NOT EXISTS ". meta_cat_TABLE ." (
+id SMALLINT( 5 ) UNSIGNED NOT NULL ,
+metaKeycat VARCHAR( 255 ) NOT NULL ,
+PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
+	$result = pwg_query($query);
+
+	$query = '
+select id
+  FROM ' . CATEGORIES_TABLE . '
+  ORDER BY id DESC;';
+$result = pwg_query($query);
+$row = mysql_fetch_array($result);
+
+$comp=$row['id']+1;	
+$i=1;
+
+	while($i < $comp)
+		{
+	$query = '
+select id,metaKeywords
+  FROM ' . CATEGORIES_TABLE . '
+  WHERE id = \''.$i.'\'';
+$result = pwg_query($query);
+$row = mysql_fetch_array($result);
+
+		if(!$row['id']==0 and !$row['metaKeywords']==0)
+			{
+	$query = '
+INSERT INTO ' . $prefixeTable . 'meta_cat(id,metaKeycat)VALUES ('.$row['id'].',"'.$row['metaKeywords'].'");';
+	$result = pwg_query($query);
+			}
+	++$i;
+		}
+	
+	$query = ' ALTER TABLE '. CATEGORIES_TABLE .' DROP COLUMN `metaKeywords`';
+    pwg_query($query);
+	
+	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("'.$majm1.'",1,"MAJ meta");';
+    pwg_query($query);
+	$majvalue1==1;
+	$maj =0;
+	}
+	
+		
+	  $q = '
+ALTER TABLE '.meta_cat_TABLE.' ADD COLUMN metadescat VARCHAR( 255 ) NOT NULL ';
+  pwg_query($q);
+  
+  	  $q = '
+ALTER TABLE '.meta_img_TABLE.' ADD COLUMN metadesimg VARCHAR( 255 ) NOT NULL ';
+  pwg_query($q);
+	
+	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("'.$majm2.'",1,"MAJ meta");';
+    pwg_query($query);
+
+    $template->delete_compiled_templates(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
+	
+	$majvalue2==1;
+	$maj =0;
+ }
+}
 
 function plugin_install()
