labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r760946 - /labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/Dispatch.java
Date Wed, 01 Apr 2009 16:12:52 GMT
Author: simoneg
Date: Wed Apr  1 16:12:50 2009
New Revision: 760946

URL: http://svn.apache.org/viewvc?rev=760946&view=rev
Log:
LABS-331 : default template to default template is not a switch, no need to reparse it

Modified:
    labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/Dispatch.java

Modified: labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/Dispatch.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/Dispatch.java?rev=760946&r1=760945&r2=760946&view=diff
==============================================================================
--- labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/Dispatch.java
(original)
+++ labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/Dispatch.java
Wed Apr  1 16:12:50 2009
@@ -211,11 +211,14 @@
 		t.parse();
 		
 		if (!validTemplate && t.wasMain()) {
-			t = getDefaultTemplate();
-			t.setCurrent(producer);
-			t.setPrevious(null);
-			t.setForceMain(true);
-			t.parse();
+			Template defaultTemplate = getDefaultTemplate();
+			if (!defaultTemplate.getClass().equals(t.getClass())) {
+				t = defaultTemplate; 
+				t.setCurrent(producer);
+				t.setPrevious(null);
+				t.setForceMain(true);
+				t.parse();
+			}
 		}
 
 		t.produce(Cycle.get().getRewriting());



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message