2002/css-validator/org/w3c/css/index IndexGenerator.java,1.5,1.6 validator.vm,1.3,1.4

Update of /sources/public/2002/css-validator/org/w3c/css/index
In directory hutz:/tmp/cvs-serv11172/2002/css-validator/org/w3c/css/index

Modified Files:
	IndexGenerator.java validator.vm 
Log Message:
reverting to pre no-profile

Index: validator.vm
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/index/validator.vm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- validator.vm	26 Sep 2007 09:39:59 -0000	1.3
+++ validator.vm	27 Sep 2007 08:46:45 -0000	1.4
@@ -12,11 +12,11 @@
       
       <label for="profile_direct">$profile :</label>
       <select id="profile_direct" name="profile">
-        <option selected="selected" value="none">$no_special_profile</option>
-        <option value="css21">$css21</option>
-        <option value="css3">$css3</option>
-        <option value="css2">$css2</option>
+        <option value="none">$no_special_profile</option>
         <option value="css1">$css1</option>
+        <option value="css2">$css2</option>
+        <option selected="selected" value="css21">$css21</option>
+        <option value="css3">$css3</option>
         <option value="svg">$SVG</option>
         <option value="svgbasic">$SVG_basic</option>
         <option value="svgtiny">$SVG_tiny</option>  

Index: IndexGenerator.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/index/IndexGenerator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- IndexGenerator.java	19 Sep 2007 15:33:55 -0000	1.5
+++ IndexGenerator.java	27 Sep 2007 08:46:45 -0000	1.6
@@ -39,6 +39,7 @@
 	public static VelocityContext vc = new VelocityContext();
 	private static String template_name = "validator.vm";
 	private static String html_files_path = "../../../../";
+	private static boolean done = false;
 
 	/**
 	 * @param args
@@ -53,7 +54,10 @@
 	 * @param servlet, if this method is called from the servlet,
 	 * the path is a bit different and need to be changed.
 	 */
-	public synchronized static void generatesIndex(boolean servlet) {
+	public static synchronized void generatesIndex(boolean servlet) {
+		if (done)
+			return;
+		
 		String default_lang = "en", k, name, path;
 		ApplContext ac_default = new ApplContext(default_lang);
 		File tmpFile;
@@ -131,6 +135,7 @@
 				}
 			}
 			Velocity.getLog().info("IndexGenerator : " + count + " index file(s) created or modified");
+			done = true;
 		} catch (ResourceNotFoundException e) {
 			e.printStackTrace();
 		} catch (ParseErrorException e) {
@@ -143,6 +148,8 @@
 			e1.printStackTrace();
 		} catch (Exception e) {
 			e.printStackTrace();
+		} finally {
+			done = true;
 		}
 	}
 

Received on Thursday, 27 September 2007 08:46:55 UTC