[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]