Author: brushed
Date: Sat Apr  5 07:25:47 2008
New Revision: 645107

URL: http://svn.apache.org/viewvc?rev=645107&view=rev
Log:
2.7.0-svn-5: [JSPWIKI-230] Make TimeZone configuration more user-friendly. 

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/preferences/Preferences.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/TemplateManager.java
    incubator/jspwiki/trunk/src/webdocs/templates/default/AttachmentTab.jsp
    incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp
    incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp

Modified: incubator/jspwiki/trunk/ChangeLog
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=645107&r1=645106&r2=645107&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sat Apr  5 07:25:47 2008
@@ -1,5 +1,12 @@
 2007-3-05  Dirk Frederickx <[EMAIL PROTECTED]>
 
+        * 2.7.0-svn-5
+        
+        * [JSPWIKI-230] Make TimeZone configuration more user-friendly. 
Adjusted all jsp time-formatting
+        to take timezone setting into account. 
+        
+2007-3-05  Dirk Frederickx <[EMAIL PROTECTED]>
+
         * Commit related JIRA id's
         
 2007-3-05  Dirk Frederickx <[EMAIL PROTECTED]>

Modified: incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl?rev=645107&r1=645106&r2=645107&view=diff
==============================================================================
--- incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl (original)
+++ incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl Sat Apr  5 07:25:47 2008
@@ -257,9 +257,7 @@
 #
 jspwiki.defaultprefs.template.skinname =PlainVanilla
 jspwiki.defaultprefs.template.dateformat =dd-MMM-yyyy HH:mm
-# default timezone expressed in time in milliseconds added to UTC 
-# by default, the default timezone is read from the server
-# jspwiki.defaultprefs.template.timezone =3600000
+jspwiki.defaultprefs.template.timezone =GMT+01:00
 jspwiki.defaultprefs.template.orientation =fav-left
 jspwiki.defaultprefs.template.editor =plain
 
@@ -288,12 +286,6 @@
 jspwiki.defaultprefs.timeformat.23=MMMM dd, yyyy hh:mm a
 jspwiki.defaultprefs.timeformat.24=MMMM, EEE dd,yyyy hh:mm a
 jspwiki.defaultprefs.timeformat.25=MMMM, EEEE dd,yyyy hh:mm a
-jspwiki.defaultprefs.timeformat.26=dd.MM.yyyy
-jspwiki.defaultprefs.timeformat.27=dd.MM.yyyy, HH:mm
-jspwiki.defaultprefs.timeformat.28=dd.MM.yyyy, HH:mm zz
-jspwiki.defaultprefs.timeformat.29=EEEE, dd.MM.yyyy
-jspwiki.defaultprefs.timeformat.30=EE, dd.MM.yyyy, HH:mm zz
-jspwiki.defaultprefs.timeformat.31=EEEE, d. MMMM yyyy, HH:mm zz
 
 #
 #  The name of the front page.  This is the page that gets loaded if no
@@ -446,66 +438,42 @@
 #
 #  For users looking to get started quickly, the default settings below
 #  should work fine. In addition to the properties below, you may also
-#  want to modify the security policy file WEB-INF/jspwiki.policy. See
-#  the policy file for more details.
+#  want to set the following JRE runtime properties when running JSPWiki
+#  or the servlet container it runs in:
 #
-#  AUTHENTICATION
+#     java.security.auth.login.config==/path-to/jspwiki.jass
+#     java.security.policy=/path-to/jspwiki.policy
 #
+#  See the jspwiki.properties and jspwiki.jaas files for more details on
+#  how to do this. These files contain addition configuration options
+#  for the JSPWiki security policy and authentication, respectively, although
+#  the defaults should work fine. If you don't set the JRE properties,
+#  JSPWiki will use default versions from the WEB-INF directory.
+
+#  AUTHENTICATION
 #  For authentication, JSPWiki uses JAAS (Java Authentication and Authorization
-#  Service) in combination with a servlet filter that picks up any credentials
-#  set by the servlet container. The Authentication system is configured below.
-#
-#  You must choose either (A) Container or (B) Custom authentication. (B) is 
the default.
-#
-#  A) CONTAINER AUTHENTICATION 
-#  JSPWiki will always (passively) collect credentials supplied by your servlet
-#  container, via HttpServletRequest.getUserPrincipal/getRemote user. You do 
not
-#  need to do anything to enable this. In addition, you can cause JSPWiki users
-#  to log in to the web container by uncommenting the the <security-constraint>
-#  elements in WEB-INF/web.xml.
-#
-#  B) CUSTOM AUTHENTICATION
-#  If you do not wish to use container-managed authentication, you can use 
JSPWiki's
-#  own custom authentication system. This uses a JAAS LoginModule (supplied 
below)
-#  to log in the user. You can use any JAAS LoginModule you want.
-#  The default class is com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule,
-#  which compares the supplied username and hashed password with the values 
stored
-#  in the configured UserDatabase (see USER DATABASE below).
-#
-#  Supply the JAAS LoginModule class used for custom authentication here.
-#  The implementation MUST have a zero-argument constructor (as noted in the
-#  javax.security.auth.spi.LoginModule Javadocs).
-jspwiki.loginModule.class = 
com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule
-#
-# JAAS LoginContext parameters used to initialize the LoginModule. Note that 
'param1'
-#  etc. should be replaced with the actual parameter names. The parameter 
names and
-# values will be loaded to a Map and passed to the LoginModule as the 
'options' parameter
-# when its initialize() method is called. The default UserDatabaseLoginModule 
class does
-# not need any options.
-#jspwiki.loginModule.options.param1 = value1
-#jspwiki.loginModule.options.param2 = value2
-#
-#
-#  AUTHORIZATION
+#  Service). The Authentication system is configured in the jspwiki.jaas
+#  file; by default it will attempt to leverage your servlet container's
+#  authentication services, if present. JSPWiki also can use its own
+#  authentication system, which is separate from the container.
+#
+#  JSPWiki will try to detect whether you are using container authentication
+#  To use container authentication, you must uncomment
+#  the <security-constraint> elements in WEB-INF/web.xml.
 #
+#  AUTHORIZATION (EXTERNAL)
 #  For authorization, JSPWiki has a two-tier system. When we want to
 #  determine whether a user has permission to perform a certain action,
-#  we first consult (A) an external "authorizer" to determine if the user
-#  is a member of the required role. In addition to checking its external
-#  authorizer, it also checks (B) its GroupManager for wiki-managed groups.
-#
-#  A) EXTERNAL AUTHORIZATION
-#  By default, JSPWiki uses the servlet container's authorization service
-#  for to check what roles the user belongs to (that is, it calls
-#  HttpServletRequest.isUserInRole(String)). After the user authenticates,
-#  the default Authorizer (WebContainerAuthorizer) checks to see if the user
-#  belongs to the roles listed in web.xml using <security-role>/<role-name> or
-#  <auth-constraint>/<role-name> elements. However, you can use another
-#  Authorizer if you wish; specify that class here.
+#  we first consult an external "authorizer" to determine if the user
+#  is a member of the required role. By default, JSPWiki uses the
+#  servlet container's authorization service for this (that is, it
+#  calls HttpServletRequest.isUserInRole(String) ).
+#  However, you can use another Authorizer if you wish; specify that
+#  class here.
 
 jspwiki.authorizer = com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer
 
-#  B) GROUPS
+#  AUTHORIZATION (GROUPS)
 #  As an additional source of authorization, users can belong to discretionary
 #  "wiki groups" that the users manage themselves. Wiki groups are stored in a
 #  GroupDatabase. The default group database uses an XML file for persistent
@@ -568,7 +536,7 @@
 #  markup. For example: "[{ALLOW edit Charlie}]". If using a custom
 #  ACL manager, specify the AclManager implementation class here:
 
-jspwiki.aclManager = com.ecyrd.jspwiki.auth.acl.DefaultAclManager
+jspwiki.aclManager          = com.ecyrd.jspwiki.auth.acl.DefaultAclManager
 
 #############################################################################
 #
@@ -736,33 +704,25 @@
 #  (recommended, and the default), or a stand-alone factory whose properties
 #  are configured with mail.* properties in this file (below).
 #
-
-#  A. Configure the address from which the email appears to come.
-#     If you're going to use a mail session obtained via JNDI, this setting
-#     will only be used if it hasn't already been configured in the obtained
-#     session itself. If you comment it out, JSPWiki will use its internal
-#     default value.
-#     If you're going to use a stand-alone mail session, you will surely want
-#     to configure it, otherwise the internal default value will be used.
-#
-mail.from = @mail.from@
-
-#  B. JNDI Resource Factory Configuration. JSPWiki will try this first.
+#  A. JNDI Resource Factory Configuration. JSPWiki will try this first.
 #     You will need to configure your container to provide a JavaMail
 #     resource factory. See your container documentation, or check our
 #     fairly complete documentation (with examples for Tomcat) in
 #     the JavaDocs for com.ecyrd.jspwiki.util.MailUtil.
 #
-#  JNDI resource name. The commented-out value is the default.
+#  JNDI resource name. The commented-out value is the default
 #jspwiki.mail.jndiname = mail/Session
 
-#  C. Stand-alone Resource Factory. JSPWiki will use these values if JNDI 
fails.
+#  B. Stand-alone Resource Factory. JSPWiki will use these values if JNDI 
fails.
 #
 #  Your SMTP host (i.e. the one which sends email)
 mail.smtp.host = @mail.smtp.host@
 
 # If for some reason the standard smtp port (25) is blocked, you can change it 
here
 #mail.smtp.port = @mail.smtp.port@
+
+#  The address from which the email appears to come
+mail.from = @mail.from@
 
 # If you are using a webserver that is publically accessible it usually
 # doesn't allow you to send mail anonymously

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java?rev=645107&r1=645106&r2=645107&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java Sat Apr  5 
07:25:47 2008
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "4";
+    public static final String     BUILD         = "5";
     
     /**
      *  This is the generic version string you should use

Modified: 
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/preferences/Preferences.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/preferences/Preferences.java?rev=645107&r1=645106&r2=645107&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/preferences/Preferences.java 
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/preferences/Preferences.java 
Sat Apr  5 07:25:47 2008
@@ -85,9 +85,14 @@
         
         prefs.put("SkinName", TextUtil.getStringProperty( props, 
"jspwiki.defaultprefs.template.skinname", "PlainVanilla" ) );
         prefs.put("DateFormat", TextUtil.getStringProperty( props, 
"jspwiki.defaultprefs.template.dateformat", "dd-MMM-yyyy HH:mm" ) );
+
+        prefs.put("TimeZone", TextUtil.getStringProperty( props, 
"jspwiki.defaultprefs.template.timezone", 
+                                                          
java.util.TimeZone.getDefault().getID() ) );
+  /*
         prefs.put("TimeZone", TextUtil.getStringProperty( props, 
"jspwiki.defaultprefs.template.timezone", 
                                                           Integer.toString( 
java.util.TimeZone.getDefault().getRawOffset() )
                                                         ) );
+  */
         prefs.put("Orientation", TextUtil.getStringProperty( props, 
"jspwiki.defaultprefs.template.orientation", "fav-left" ) );
         
         // FIXME: "editor" property does not get registered, may be related 
with http://bugs.jspwiki.org/show_bug.cgi?id=117
@@ -210,8 +215,9 @@
 
         try
         {
-            TimeZone tz = TimeZone.getDefault();
-            tz.setRawOffset(Integer.parseInt(prefTimeZone));
+            TimeZone tz = TimeZone.getTimeZone(prefTimeZone);
+            //TimeZone tz = TimeZone.getDefault();
+            //tz.setRawOffset(Integer.parseInt(prefTimeZone));
 
             SimpleDateFormat fmt = new SimpleDateFormat(prefDateFormat, 
clientLocale);
             fmt.setTimeZone(tz);

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/TemplateManager.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/TemplateManager.java?rev=645107&r1=645106&r2=645107&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/TemplateManager.java 
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/TemplateManager.java Sat 
Apr  5 07:25:47 2008
@@ -508,15 +508,15 @@
         }
 
         String prefTimeZone = Preferences.getPreference( context, "TimeZone" );
-        TimeZone tz = TimeZone.getDefault();
-        try
+        //TimeZone tz = TimeZone.getDefault();
+        TimeZone tz = TimeZone.getTimeZone(prefTimeZone);
+        /*try
         {
             tz.setRawOffset(Integer.parseInt(prefTimeZone));
         }
         catch (Exception e)
         {
-            /* dont care */
-        }
+        }*/
 
         Date d = new Date(); // current date
         try
@@ -557,43 +557,53 @@
     {
         LinkedHashMap resultMap = new LinkedHashMap();
 
-        String[][] tzs = { { "-43200000", "(UTC-12) Enitwetok, Kwajalien" },
-                          { "-39600000", "(UTC-11) Nome, Midway Island, Samoa" 
}, { "-36000000", "(UTC-10) Hawaii" },
-                          { "-32400000", "(UTC-9) Alaska" }, { "-28800000", 
"(UTC-8) Pacific Time" },
-                          { "-25200000", "(UTC-7) Mountain Time" }, { 
"-21600000", "(UTC-6) Central Time, Mexico City" },
-                          { "-18000000", "(UTC-5) Eastern Time, Bogota, Lima, 
Quito" },
-                          { "-14400000", "(UTC-4) Atlantic Time, Caracas, La 
Paz" }, { "-12600000", "(UTC-3:30) Newfoundland" },
-                          { "-10800000", "(UTC-3) Brazil, Buenos Aires, 
Georgetown, Falkland Is." },
-                          { "-7200000", "(UTC-2) Mid-Atlantic, Ascention Is., 
St Helena" },
-                          { "-3600000", "(UTC-1) Azores, Cape Verde Islands" },
-                          { "0", "(UTC) Casablanca, Dublin, Edinburgh, London, 
Lisbon, Monrovia" },
-                          { "3600000", "(UTC+1) Berlin, Brussels, Copenhagen, 
Madrid, Paris, Rome" },
-                          { "7200000", "(UTC+2) Helsinki, Athens, Kaliningrad, 
South Africa, Warsaw" },
-                          { "10800000", "(UTC+3) Baghdad, Riyadh, Moscow, 
Nairobi" }, { "12600000", "(UTC+3.30) Tehran" },
-                          { "14400000", "(UTC+4) Adu Dhabi, Baku, Muscat, 
Tbilisi" }, { "16200000", "(UTC+4:30) Kabul" },
-                          { "18000000", "(UTC+5) Islamabad, Karachi, Tashkent" 
},
-                          { "19800000", "(UTC+5:30) Bombay, Calcutta, Madras, 
New Delhi" },
-                          { "21600000", "(UTC+6) Almaty, Colomba, Dhakra" }, { 
"25200000", "(UTC+7) Bangkok, Hanoi, Jakarta" },
-                          { "28800000", "(UTC+8) Beijing, Hong Kong, Perth, 
Singapore, Taipei" },
-                          { "32400000", "(UTC+9) Osaka, Sapporo, Seoul, Tokyo, 
Yakutsk" },
-                          { "34200000", "(UTC+9:30) Adelaide, Darwin" },
-                          { "36000000", "(UTC+10) Melbourne, Papua New Guinea, 
Sydney, Vladivostok" },
-                          { "39600000", "(UTC+11) Magadan, New Caledonia, 
Solomon Islands" },
-                          { "43200000", "(UTC+12) Auckland, Wellington, Fiji, 
Marshall Island" } };
+        String[][] tzs = { { "GMT-12", "Enitwetok, Kwajalien" },
+                          { "GMT-11", "Nome, Midway Island, Samoa" }, 
+                          { "GMT-10", "Hawaii" },
+                          { "GMT-9", "Alaska" }, 
+                          { "GMT-8", "Pacific Time" },
+                          { "GMT-7", "Mountain Time" }, 
+                          { "GMT-6", "Central Time, Mexico City" },
+                          { "GMT-5", "Eastern Time, Bogota, Lima, Quito" },
+                          { "GMT-4", "Atlantic Time, Caracas, La Paz" }, 
+                          { "GMT-3:30", "Newfoundland" },
+                          { "GMT-3", "Brazil, Buenos Aires, Georgetown, 
Falkland Is." },
+                          { "GMT-2", "Mid-Atlantic, Ascention Is., St Helena" 
},
+                          { "GMT-1", "Azores, Cape Verde Islands" },
+                          { "GMT", "Casablanca, Dublin, Edinburgh, London, 
Lisbon, Monrovia" },
+                          { "GMT+1", "Berlin, Brussels, Copenhagen, Madrid, 
Paris, Rome" },
+                          { "GMT+2", "Helsinki, Athens, Kaliningrad, South 
Africa, Warsaw" },
+                          { "GMT+3", "Baghdad, Riyadh, Moscow, Nairobi" }, 
+                          { "GMT+3:30", "Tehran" },
+                          { "GMT+4", "Adu Dhabi, Baku, Muscat, Tbilisi" }, 
+                          { "GMT+4:30", "Kabul" },
+                          { "GMT+5", "Islamabad, Karachi, Tashkent" },
+                          { "GMT+5:30", "Bombay, Calcutta, Madras, New Delhi" 
},
+                          { "GMT+6", "Almaty, Colomba, Dhakra" }, 
+                          { "GMT+7", "Bangkok, Hanoi, Jakarta" },
+                          { "GMT+8", "Beijing, Hong Kong, Perth, Singapore, 
Taipei" },
+                          { "GMT+9", "Osaka, Sapporo, Seoul, Tokyo, Yakutsk" },
+                          { "GMT+9:30", "Adelaide, Darwin" },
+                          { "GMT+10", "Melbourne, Papua New Guinea, Sydney, 
Vladivostok" },
+                          { "GMT+11", "Magadan, New Caledonia, Solomon 
Islands" },
+                          { "GMT+12", "Auckland, Wellington, Fiji, Marshall 
Island" } };
 
-        String servertz = 
Integer.toString(java.util.TimeZone.getDefault().getRawOffset());
+        java.util.TimeZone servertz = java.util.TimeZone.getDefault();
 
-        for (int i = 0; i < tzs.length; i++)
+        for( int i = 0; i < tzs.length; i++ )
         {
+            String tzID = tzs[i][0];
+            java.util.TimeZone tz = java.util.TimeZone.getTimeZone(tzID);
+            
             String serverTimeZone = "";
 
-            if (servertz.equals(tzs[i][0]))
+            if( servertz.getRawOffset() == tz.getRawOffset() )
             {
                 serverTimeZone = 
LocaleSupport.getLocalizedMessage(pageContext, I18NSERVER_TIMEZONE);
+                tzID = servertz.getID(); 
             }
 
-            resultMap.put(tzs[i][0], tzs[i][1] + " " + serverTimeZone);
-
+            resultMap.put(tzID, "(" + tzs[i][0] + ") "+tzs[i][1] + " " + 
serverTimeZone);            
         }
 
         return resultMap;

Modified: 
incubator/jspwiki/trunk/src/webdocs/templates/default/AttachmentTab.jsp
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/AttachmentTab.jsp?rev=645107&r1=645106&r2=645107&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/AttachmentTab.jsp 
(original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/AttachmentTab.jsp Sat 
Apr  5 07:25:47 2008
@@ -107,7 +107,7 @@
       <td style="text-align:center;">
         <a href="<wiki:PageInfoLink format='url' />" title="<fmt:message 
key='attach.moreinfo.title'/>"><wiki:PageVersion /></a>
       </td>
-         <td style="white-space:nowrap;"><fmt:formatDate value="<%= 
att.getLastModified() %>" pattern="${prefs['DateFormat']}" /></td>
+         <td style="white-space:nowrap;"><fmt:formatDate value="<%= 
att.getLastModified() %>" pattern="${prefs.DateFormat}" 
timeZone="${prefs.TimeZone}" /></td>
       <td><wiki:Author /></td>
       <wiki:Permission permission="delete">
       <td>

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp?rev=645107&r1=645106&r2=645107&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp 
(original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp Sat 
Apr  5 07:25:47 2008
@@ -66,7 +66,7 @@
     <fmt:param>
       <a href="<wiki:DiffLink format='url' version='latest' 
newVersion='previous' />"
         title="<fmt:message key='info.pagediff.title' />" >
-        <fmt:formatDate value="<%= wikiPage.getLastModified() %>" 
pattern="${prefs['DateFormat']}" />
+        <fmt:formatDate value="<%= wikiPage.getLastModified() %>" 
pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
       </a>
     </fmt:param>
     <fmt:param><wiki:Author /></fmt:param>
@@ -87,7 +87,7 @@
     <fmt:message key='info.createdon'>
       <fmt:param>
         <wiki:Link version="1">
-          <fmt:formatDate value="<%= firstPage.getLastModified() %>" 
pattern="${prefs['DateFormat']}" />
+          <fmt:formatDate value="<%= firstPage.getLastModified() %>" 
pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
         </wiki:Link>
       </fmt:param>
       <fmt:param><%= creationAuthor %></fmt:param>
@@ -183,7 +183,7 @@
           </wiki:LinkTo>
         </td>
 
-        <td><fmt:formatDate value="<%= currentPage.getLastModified() %>" 
pattern="${prefs['DateFormat']}" /></td>
+        <td><fmt:formatDate value="<%= currentPage.getLastModified() %>" 
pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" /></td>
         <td>
           <%--<fmt:formatNumber 
value='<%=Double.toString(currentPage.getSize()/1000.0)%>' groupingUsed='false' 
maxFractionDigits='1' minFractionDigits='1'/>&nbsp;Kb--%>
           <wiki:PageSize />
@@ -343,7 +343,7 @@
       <td style="white-space:nowrap;text-align:right;">
         <fmt:formatNumber value='<%=Double.toString(att.getSize()/1000.0) %>' 
groupingUsed='false' maxFractionDigits='1' 
minFractionDigits='1'/>&nbsp;<fmt:message key="info.kilobytes"/>
       </td>
-         <td style="white-space:nowrap;"><fmt:formatDate value="<%= 
att.getLastModified() %>" pattern="${prefs['DateFormat']}" /></td>
+         <td style="white-space:nowrap;"><fmt:formatDate value="<%= 
att.getLastModified() %>" pattern="${prefs.DateFormat}" 
timeZone="${prefs.TimeZone}" /></td>
       <td><wiki:Author /></td>
       <%--
       // FIXME: This needs to be added, once we figure out what is going on.

Modified: 
incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp?rev=645107&r1=645106&r2=645107&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp 
(original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp 
Sat Apr  5 07:25:47 2008
@@ -108,8 +108,8 @@
   <td><label for="prefOrientation"><fmt:message 
key="prefs.user.orientation"/></label></td>
   <td>
   <select id="prefOrientation" name="prefOrientation" 
onclick="Wiki.changeOrientation();">
-      <option value='fav-left' <c:if test='${"fav-left" == 
prefs["Orientation"]}'>selected="selected"</c:if> ><fmt:message 
key="prefs.user.orientation.left"/></option>
-      <option value='fav-right' <c:if test='${"fav-right" == 
prefs["Orientation"]}'>selected="selected"</c:if> ><fmt:message 
key="prefs.user.orientation.right"/></option>
+      <option value='fav-left' <c:if test='${"fav-left" == 
prefs.Orientation}'>selected="selected"</c:if> ><fmt:message 
key="prefs.user.orientation.left"/></option>
+      <option value='fav-right' <c:if test='${"fav-right" == 
prefs.Orientation}'>selected="selected"</c:if> ><fmt:message 
key="prefs.user.orientation.right"/></option>
   </select>
   </td>
   </tr>
@@ -119,7 +119,7 @@
   <td>
   <select id="prefTimeFormat" name="prefTimeFormat" >
     <c:forEach items='${timeformats}' var='tf' >
-      <option value='<c:out value="${tf.key}"/>' <c:if test='${tf.key == 
prefs["DateFormat"]}'>selected="selected"</c:if> ><c:out 
value="${tf.value}"/></option>
+      <option value='<c:out value="${tf.key}"/>' <c:if test='${tf.key == 
prefs.DateFormat}'>selected="selected"</c:if> ><c:out 
value="${tf.value}"/></option>
     </c:forEach>
   </select>
   </td>
@@ -129,8 +129,7 @@
   <td><label for="prefTimeZone"><fmt:message 
key="prefs.user.timezone"/></label></td>
   <td>
   <select id='prefTimeZone' name='prefTimeZone'>
-    <c:forEach items='${timezones}' var='tz'>
-      <option value='<c:out value="${tz.key}"/>' <c:if test='${tz.key == 
prefs["TimeZone"]}'>selected="selected"</c:if> ><c:out 
value="${tz.value}"/></option>
+    <c:forEach items='${timezones}' var='tz      <option value='<c:out 
value="${tz.key}"/>' <c:if test='${tz.key == 
prefs.TimeZone}'>selected="selected"</c:if> ><c:out 
value="${tz.value}"/></option>
     </c:forEach>
   </select>
   </td>


Reply via email to