[evolvis-commits] r17594: merge from theme-evolvis; pending merges:↵ Thorsten Glaser 2011-10-19 add database entry for new theme “Evolvis 5” directory “evolvis5x”

mirabilos at evolvis.org mirabilos at evolvis.org
Wed Oct 19 10:02:52 CEST 2011


Author: mirabilos
Date: 2011-10-19 10:02:52 +0200 (Wed, 19 Oct 2011)
New Revision: 17594

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/deb-specific/db-upgrade.pl
Log:
merge from theme-evolvis; pending merges:
  Thorsten Glaser 2011-10-19 add database entry for new theme “Evolvis 5” directory “evolvis5x”


Modified: trunk/gforge_base/evolvisforge-5.1/src/deb-specific/db-upgrade.pl
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/deb-specific/db-upgrade.pl	2011-10-19 08:02:48 UTC (rev 17593)
+++ trunk/gforge_base/evolvisforge-5.1/src/deb-specific/db-upgrade.pl	2011-10-19 08:02:52 UTC (rev 17594)
@@ -2265,6 +2265,34 @@
     &update_with_sql("20111007-fti-aggregate-functions","5.1-9");
     &update_with_sql("20111007-add-fti-for-task-messages","5.1-10");
 
+    $version = &get_db_version;
+    $target = "5.1-10+evolvis-1";
+    if (&is_lesser($version, $target)) {
+        &debug("Updating available themes");
+
+	my %new_themes = (
+		'evolvis5x'	=> 'Evolvis 5'
+	    );
+
+	foreach my $dir (sort keys %new_themes) {
+	    $query = "INSERT INTO themes (dirname, fullname, enabled) VALUES ('$dir', '$new_themes{$dir}', true)";
+	    push @reqlist, $query;
+	}
+
+	foreach my $s (@reqlist) {
+	    $query = $s;
+	    # &debug($query);
+	    $sth = $dbh->prepare($query);
+	    $sth->execute();
+	    $sth->finish();
+	}
+	@reqlist = ();
+
+        &update_db_version($target);
+        &debug("Committing.");
+        $dbh->commit();
+    }
+
     ########################### INSERT HERE #################################
 
     # There should be a commit at the end of every block above.



More information about the evolvis-commits mailing list