rpms/mantis/devel mantis-1.0.0a3-nonmysql.patch,NONE,1.1

Enrico Scholz (ensc) fedora-extras-commits at redhat.com
Sat Jun 25 14:47:17 UTC 2005


Author: ensc

Update of /cvs/extras/rpms/mantis/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3273

Added Files:
	mantis-1.0.0a3-nonmysql.patch 
Log Message:
fix *one* error in upgrade process when postgresql is used


mantis-1.0.0a3-nonmysql.patch:

--- NEW FILE mantis-1.0.0a3-nonmysql.patch ---
--- mantis-1.0.0a3/admin/upgrade_inc.php.nonmysql
+++ mantis-1.0.0a3/admin/upgrade_inc.php
@@ -41,13 +41,17 @@
         exit();
 	}
 
-	# Create the upgrade table if it does not exist
-	$query = "CREATE TABLE IF NOT EXISTS $t_upgrade_table
-				  (upgrade_id char(20) NOT NULL,
-				  description char(255) NOT NULL,
-				  PRIMARY KEY (upgrade_id))";
+	if (config_get_global('db_type') === 'mysql') {
+		# Create the upgrade table if it does not exist
+		$query = "CREATE TABLE IF NOT EXISTS $t_upgrade_table
+					  (upgrade_id char(20) NOT NULL,
+					  description char(255) NOT NULL,
+					  PRIMARY KEY (upgrade_id))";
 
-	$result = db_query( $query );
+		$result = db_query( $query );
+	}
+	else
+		$result = true;
 
 	if ( false === $result ) {
 		# 0.14.0 upgrades (applied to 0.13 db)




More information about the fedora-extras-commits mailing list