Author: jalkanen
Date: Sat Jun 14 11:15:55 2008
New Revision: 667861
URL: http://svn.apache.org/viewvc?rev=667861&view=rev
Log:
Created default_jspwiki.properties and moved some more obscure settings into it.
Added:
incubator/jspwiki/trunk/etc/ini/default_jspwiki.properties
Modified:
incubator/jspwiki/trunk/ChangeLog
incubator/jspwiki/trunk/build.xml
incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/PropertyReader.java
Modified: incubator/jspwiki/trunk/ChangeLog
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=667861&r1=667860&r2=667861&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sat Jun 14 11:15:55 2008
@@ -15,6 +15,12 @@
* JSPWIKI-246: All new (and faster) IndexPlugin as the old one
couldn't be
converted to Apache.
+ * Updated Finnish translation.
+
+ * Added etc/ini/default_jspwiki.properties to hold all sorts of stuff
that
+ you normally want to enable in jspwiki.properties, but most people
don't
+ really want to touch.
+
2007-06-14 Dirk Frederickx <[EMAIL PROTECTED]>
* 2.7.0-svn-41 Many template fixes, added ajaxed edit preview,
improved IE6/IE7 compat.
Modified: incubator/jspwiki/trunk/build.xml
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/build.xml?rev=667861&r1=667860&r2=667861&view=diff
==============================================================================
--- incubator/jspwiki/trunk/build.xml (original)
+++ incubator/jspwiki/trunk/build.xml Sat Jun 14 11:15:55 2008
@@ -304,7 +304,7 @@
<fileset dir="${code.src}" includes="com/**/*.properties" />
<fileset dir="${code.src}" includes="templates/**/*.properties" />
<fileset dir="${code.i18n}" />
- <fileset dir="etc" includes="ini/*.xml" />
+ <fileset dir="etc" includes="ini/*.xml ini/*.properties" />
</jar>
</target>
Added: incubator/jspwiki/trunk/etc/ini/default_jspwiki.properties
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/ini/default_jspwiki.properties?rev=667861&view=auto
==============================================================================
--- incubator/jspwiki/trunk/etc/ini/default_jspwiki.properties (added)
+++ incubator/jspwiki/trunk/etc/ini/default_jspwiki.properties Sat Jun 14
11:15:55 2008
@@ -0,0 +1,78 @@
+#
+# This file contains a number of default properties for JSPWiki. Anything
+# can be overridden in the actual jspwiki.properties file.
+#
+
+#
+# Preferences for default template
+#
+jspwiki.defaultprefs.template.skinname =PlainVanilla
+jspwiki.defaultprefs.template.dateformat =dd-MMM-yyyy HH:mm
+# by default, the default timezone is read from the server
+# jspwiki.defaultprefs.template.timezone =GMT+01:00
+jspwiki.defaultprefs.template.orientation =fav-left
+jspwiki.defaultprefs.template.editor =plain
+
+jspwiki.defaultprefs.timeformat.01=d/MM
+jspwiki.defaultprefs.timeformat.02=d/MM/yy
+jspwiki.defaultprefs.timeformat.03=d/MM/yyyy
+jspwiki.defaultprefs.timeformat.04=dd/MM/yy
+jspwiki.defaultprefs.timeformat.05=dd/MM/yyyy
+jspwiki.defaultprefs.timeformat.06=EEE, dd/MM/yyyy
+jspwiki.defaultprefs.timeformat.07=EEE, dd/MM/yyyy, Z
+jspwiki.defaultprefs.timeformat.08=EEE, dd/MM/yyyy, zzzz
+jspwiki.defaultprefs.timeformat.09=d/MM/yy HH:mm
+jspwiki.defaultprefs.timeformat.10=d/MM/yy hh:mm a
+jspwiki.defaultprefs.timeformat.11=d/MM/yy hh:mm a, Z
+jspwiki.defaultprefs.timeformat.12=dd-MMM
+jspwiki.defaultprefs.timeformat.13=dd-MMM-yy
+jspwiki.defaultprefs.timeformat.14=dd-MMM-yyyy
+jspwiki.defaultprefs.timeformat.15=EEE, dd-MMM-yyyy
+jspwiki.defaultprefs.timeformat.16=EEE, dd-MMM-yyyy, Z
+jspwiki.defaultprefs.timeformat.17=EEE, dd-MMM-yyyy, zzzz
+jspwiki.defaultprefs.timeformat.18=dd-MMM-yyyy HH:mm
+jspwiki.defaultprefs.timeformat.19=dd-MMM-yyyy hh:mm a
+jspwiki.defaultprefs.timeformat.20=dd-MMM-yyyy hh:mm a, Z
+jspwiki.defaultprefs.timeformat.21=MMMM dd, yyyy
+jspwiki.defaultprefs.timeformat.22=MMMM dd, yyyy HH:mm
+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
+jspwiki.defaultprefs.timeformat.32=yyyy-MM-dd, HH:mm zz
+jspwiki.defaultprefs.timeformat.33=yyyy-MM-dd, EEEE
+
+###########################################################################
+#
+# Determine how certain file commands are run. They have been
+# commented out, since most likely you want to use the defaults.
+# Be warned, making mistakes with these may well ruin your entire
+# Wiki collection!
+#
+# The command to run diff:
+# NOTE! If you do not specify this, an internal "diff" routine is used.
+# In most cases, you really should not touch this.
+#
+#jspwiki.diffCommand = diff -u %s1 %s2
+
+# The command for RCS checkin
+#jspwiki.rcsFileProvider.checkinCommand = ci -q -mx -l -t-none %s
+
+# The command for RCS checkout of the newest version
+#jspwiki.rcsFileProvider.checkoutCommand = co -l %s
+
+# The command for checking out a specific version (%v = version number)
+#jspwiki.rcsFileProvider.checkoutVersionCommand = co -p -r1.%v %s
+
+# The command for RCS log headers
+# If you have a version of RCS that does not support the "-z" flag, then
+# you can try this one out without it. It should work.
+#jspwiki.rcsFileProvider.logCommand = rlog -zLT -h %s
+
+# The command for getting the entire modification history
+#jspwiki.rcsFileProvider.fullLogCommand = rlog -zLT %s
Modified: incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl?rev=667861&r1=667860&r2=667861&view=diff
==============================================================================
--- incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl (original)
+++ incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl Sat Jun 14 11:15:55 2008
@@ -247,49 +247,6 @@
#
jspwiki.templateDir = default
-#
-# Preferences for default template
-#
-jspwiki.defaultprefs.template.skinname =PlainVanilla
-jspwiki.defaultprefs.template.dateformat =dd-MMM-yyyy HH:mm
-# by default, the default timezone is read from the server
-# jspwiki.defaultprefs.template.timezone =GMT+01:00
-jspwiki.defaultprefs.template.orientation =fav-left
-jspwiki.defaultprefs.template.editor =plain
-
-jspwiki.defaultprefs.timeformat.01=d/MM
-jspwiki.defaultprefs.timeformat.02=d/MM/yy
-jspwiki.defaultprefs.timeformat.03=d/MM/yyyy
-jspwiki.defaultprefs.timeformat.04=dd/MM/yy
-jspwiki.defaultprefs.timeformat.05=dd/MM/yyyy
-jspwiki.defaultprefs.timeformat.06=EEE, dd/MM/yyyy
-jspwiki.defaultprefs.timeformat.07=EEE, dd/MM/yyyy, Z
-jspwiki.defaultprefs.timeformat.08=EEE, dd/MM/yyyy, zzzz
-jspwiki.defaultprefs.timeformat.09=d/MM/yy HH:mm
-jspwiki.defaultprefs.timeformat.10=d/MM/yy hh:mm a
-jspwiki.defaultprefs.timeformat.11=d/MM/yy hh:mm a, Z
-jspwiki.defaultprefs.timeformat.12=dd-MMM
-jspwiki.defaultprefs.timeformat.13=dd-MMM-yy
-jspwiki.defaultprefs.timeformat.14=dd-MMM-yyyy
-jspwiki.defaultprefs.timeformat.15=EEE, dd-MMM-yyyy
-jspwiki.defaultprefs.timeformat.16=EEE, dd-MMM-yyyy, Z
-jspwiki.defaultprefs.timeformat.17=EEE, dd-MMM-yyyy, zzzz
-jspwiki.defaultprefs.timeformat.18=dd-MMM-yyyy HH:mm
-jspwiki.defaultprefs.timeformat.19=dd-MMM-yyyy hh:mm a
-jspwiki.defaultprefs.timeformat.20=dd-MMM-yyyy hh:mm a, Z
-jspwiki.defaultprefs.timeformat.21=MMMM dd, yyyy
-jspwiki.defaultprefs.timeformat.22=MMMM dd, yyyy HH:mm
-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
-jspwiki.defaultprefs.timeformat.32=yyyy-MM-dd, HH:mm zz
-jspwiki.defaultprefs.timeformat.33=yyyy-MM-dd, EEEE
#
# The name of the front page. This is the page that gets loaded if no
@@ -709,36 +666,6 @@
###########################################################################
#
-# Determine how certain file commands are run. They have been
-# commented out, since most likely you want to use the defaults.
-# Be warned, making mistakes with these may well ruin your entire
-# Wiki collection!
-#
-# The command to run diff:
-# NOTE! If you do not specify this, an internal "diff" routine is used.
-# In most cases, you really should not touch this.
-#
-#jspwiki.diffCommand = diff -u %s1 %s2
-
-# The command for RCS checkin
-#jspwiki.rcsFileProvider.checkinCommand = ci -q -mx -l -t-none %s
-
-# The command for RCS checkout of the newest version
-#jspwiki.rcsFileProvider.checkoutCommand = co -l %s
-
-# The command for checking out a specific version (%v = version number)
-#jspwiki.rcsFileProvider.checkoutVersionCommand = co -p -r1.%v %s
-
-# The command for RCS log headers
-# If you have a version of RCS that does not support the "-z" flag, then
-# you can try this one out without it. It should work.
-#jspwiki.rcsFileProvider.logCommand = rlog -zLT -h %s
-
-# The command for getting the entire modification history
-#jspwiki.rcsFileProvider.fullLogCommand = rlog -zLT %s
-
-###########################################################################
-#
# JDBC Configuration. Tells JSPWiki which tables and columns to map
# to for the JDBCUserDatabase and JDBCGroupDatabase. For more info, see the
# JavaDoc for classes com.ecyrd.jspwiki.auth.user.JDBCUserDatabase and
Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/PropertyReader.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/PropertyReader.java?rev=667861&r1=667860&r2=667861&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/PropertyReader.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/PropertyReader.java Sat Jun
14 11:15:55 2008
@@ -41,6 +41,8 @@
public final class PropertyReader
{
+ private static final String DEFAULT_JSPWIKI_PROPERTIES =
"/ini/default_jspwiki.properties";
+
/** The web.xml parameter that defines where the config file is to be
found.
* If it is not defined, uses the default as defined by
DEFAULT_PROPERTYFILE.
* [EMAIL PROTECTED] #DEFAULT_PROPERTYFILE}
@@ -181,7 +183,23 @@
*/
public static final Properties getDefaultProperties()
{
- return new Properties( TextUtil.createProperties( DEFAULT_PROPERTIES )
);
+ Properties props = new Properties( TextUtil.createProperties(
DEFAULT_PROPERTIES ) );
+
+ InputStream in = PropertyReader.class.getResourceAsStream(
DEFAULT_JSPWIKI_PROPERTIES );
+
+ if( in != null )
+ {
+ try
+ {
+ props.load( in );
+ }
+ catch( IOException e )
+ {
+ System.err.println("Unable to load default propertyfile
'"+DEFAULT_JSPWIKI_PROPERTIES+"'"+e.getMessage());
+ }
+ }
+
+ return props;
}