Index: trunk/expressoMail1_2/setup/tables_update.inc.php
===================================================================
--- trunk/expressoMail1_2/setup/tables_update.inc.php	(revision 1246)
+++ trunk/expressoMail1_2/setup/tables_update.inc.php	(revision 1247)
@@ -9,50 +9,29 @@
 	* option) any later version.                                               *
 	\**************************************************************************/
-	if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.234'){
-		$test[] = '1.234';
-		function expressoMail1_2_upgrade1_234() {
-            $oProc = $GLOBALS['phpgw_setup']->oProc;            
-            $oProc->CreateTable('phpgw_certificados',array(
-				'fd' => array(
-					'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false),
-					'chave_publica' => array( 'type' => 'text'),
-					'expirado' => array('type' => 'bool', 'default' => 'false'),
-					'revogado' => array('type' => 'bool', 'default' => 'false'),
-					'serialnumber' => array('type' => 'int', 'precision' => 8, 'nullable' => false),
-					'authoritykeyidentifier' => array( 'type' => 'text', 'nullable' => false),
-				),
-				'pk' => array('email','serialnumber','authoritykeyidentifier'),
-				'fk' => array(),
-				'ix' => array(),
-				'uc' => array()
-				)
-			);
-
-            $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.235';
-            return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
-		}
-	}
-	if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.233'){
-		$test[] = '1.233';													
-		function expressoMail1_2_upgrade1_233() {
-			$setup_info['expressoMail1_2']['currentver'] = '1.234';
-			return $setup_info['expressoMail1_2']['currentver'];
-		}
-	}	
-	if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.232'){
-		$test[] = '1.232';													
-		function expressoMail1_2_upgrade1_232() {
-			$setup_info['expressoMail1_2']['currentver'] = '1.233';
-			return $setup_info['expressoMail1_2']['currentver'];
-		}
-	}	
-	if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.231'){
-		$test[] = '1.231';													
-		function expressoMail1_2_upgrade1_231() {
-			$setup_info['expressoMail1_2']['currentver'] = '1.232';
-			return $setup_info['expressoMail1_2']['currentver'];
-		}
+	$test[] = '1.2031';
+	function expressoMail1_2_upgrade1_2031() {
+		$GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.2201';
+		return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
 	}
 	
+	$test[] = '1.2201';
+	function expressoMail1_2_upgrade1_2201() {
+		$GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.2211';
+		return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];		
+	}
+	
+	$test[] = '1.2211';
+	function expressoMail1_2_upgrade1_2211() {
+		$GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.222';
+		return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
+	}
+
+	$test[] = '1.222';
+	function expressoMail1_2_upgrade1_222() {
+		$GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.230';
+		return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
+	}
+	
+	$test[] = '1.230';
 	function expressoMail1_2_upgrade1_230() {
 		$oProc = $GLOBALS['phpgw_setup']->oProc;
@@ -70,106 +49,42 @@
 		return $setup_info['expressoMail1_2']['currentver'];
 	}		
-				
-	if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.230'){
-		$test[] = '1.230';													
-		return expressoMail1_2_upgrade1_230();
-	}
-	if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.222'){
-		$test[] = '1.222';
-		function expressoMail1_2_upgrade1_222() {
-			$oProc = $GLOBALS['phpgw_setup']->oProc;
-			$oProc->CreateTable('phpgw_expressomail_contacts',array(
-				'fd' => array(
-					'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
-					'data' => array( 'type' => 'text')
-				),
-				'pk' => array('id_owner'),
-				'fk' => array(),
-				'ix' => array(),
-				'uc' => array()
-				)
-			);
-			$oProc->CreateTable('phpgw_certificados',array(
-				'fd' => array(
-					'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false),
-					'chave_publica' => array( 'type' => 'text'),
-					'expirado' => array('type' => 'bool', 'default' => 'false')
-				),
-				'pk' => array('email'),
-				'fk' => array(),
-				'ix' => array(),
-				'uc' => array()
-				)
-			);
-			$GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223';
-			return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
-        }
-	}
-	if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2211'){
-		$test[] = '1.2211';
-		function expressoMail1_2_upgrade1_2211() {
-			$oProc = $GLOBALS['phpgw_setup']->oProc;
-			$oProc->CreateTable('phpgw_expressomail_contacts',array(
-				'fd' => array(
-					'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
-					'data' => array( 'type' => 'text')
-				),
-				'pk' => array('id_owner'),
-				'fk' => array(),
-				'ix' => array(),
-				'uc' => array()
-				)
-			);
-			$oProc->CreateTable('phpgw_certificados',array(
-				'fd' => array(
-					'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false),
-					'chave_publica' => array( 'type' => 'text'),
-					'expirado' => array('type' => 'bool', 'default' => 'false')
-				),
-				'pk' => array('email'),
-				'fk' => array(),
-				'ix' => array(),
-				'uc' => array()
-				)
-			);
-			$GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223';
-			return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
-        }
-	}
-	if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2201'){
-		$test[] = '1.2201';
-		function expressoMail1_2_upgrade1_2201() {return expressoMail1_2_upgrade1_230();}
+	$test[] = '1.231';													
+	function expressoMail1_2_upgrade1_231() {
+		$setup_info['expressoMail1_2']['currentver'] = '1.232';
+		return $setup_info['expressoMail1_2']['currentver'];
 	}
 	
-	if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2031'){
-		$test[] = '1.2031';
-		function expressoMail1_2_upgrade1_2031() {
-			$oProc = $GLOBALS['phpgw_setup']->oProc;
-			$oProc->CreateTable('phpgw_expressomail_contacts',array(
-				'fd' => array(
-					'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
-					'data' => array( 'type' => 'text')
-				),
-				'pk' => array('id_owner'),
-				'fk' => array(),
-				'ix' => array(),
-				'uc' => array()
-				)
-			);
-			$oProc->CreateTable('phpgw_certificados',array(
-				'fd' => array(
-					'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false),
-					'chave_publica' => array( 'type' => 'text'),
-					'expirado' => array('type' => 'bool', 'default' => 'false')
-				),
-				'pk' => array('email'),
-				'fk' => array(),
-				'ix' => array(),
-				'uc' => array()
-				)
-			);
-			$GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223';
-			return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
-        }
+	$test[] = '1.232';
+	function expressoMail1_2_upgrade1_232() {
+		$setup_info['expressoMail1_2']['currentver'] = '1.233';
+		return $setup_info['expressoMail1_2']['currentver'];
+	}
+	
+	$test[] = '1.233';
+	function expressoMail1_2_upgrade1_233() {
+		$setup_info['expressoMail1_2']['currentver'] = '1.234';
+		return $setup_info['expressoMail1_2']['currentver'];
+	}
+	
+	$test[] = '1.234';
+	function expressoMail1_2_upgrade1_234() {
+    	$oProc = $GLOBALS['phpgw_setup']->oProc;            
+            $oProc->CreateTable('phpgw_certificados',array(
+			'fd' => array(
+				'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false),
+				'chave_publica' => array( 'type' => 'text'),
+				'expirado' => array('type' => 'bool', 'default' => 'false'),
+				'revogado' => array('type' => 'bool', 'default' => 'false'),
+				'serialnumber' => array('type' => 'int', 'precision' => 8, 'nullable' => false),
+				'authoritykeyidentifier' => array( 'type' => 'text', 'nullable' => false),
+			),
+			'pk' => array('email','serialnumber','authoritykeyidentifier'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+			)
+		);
+		$GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.235';
+        return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
 	}	
 ?>
