summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetherpad/bin/rebuildjar.sh90
-rw-r--r--etherpad/etc/etherpad.localdev-default.properties3
-rw-r--r--etherpad/src/etherpad/globals.js17
-rw-r--r--etherpad/src/etherpad/pne/pne_utils.js3
-rw-r--r--etherpad/src/etherpad/pro/pro_utils.js4
-rw-r--r--etherpad/src/etherpad/sessions.js2
-rw-r--r--etherpad/src/main.js5
-rw-r--r--etherpad/src/plugins/fileUpload/main.js2
-rw-r--r--etherpad/src/plugins/twitterStyleTags/main.js2
-rw-r--r--etherpad/src/static/css/admin/pluginmanager.css62
-rw-r--r--etherpad/src/static/css/pad2_ejs.css2
-rw-r--r--etherpad/src/templates/admin/pluginmanager.ejs35
-rw-r--r--etherpad/src/templates/pad/pad_body2.ejs32
-rw-r--r--infrastructure/bin/compilecache.sh84
-rw-r--r--infrastructure/net.appjet.oui/config.scala2
15 files changed, 259 insertions, 86 deletions
diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh
index fc05194..d32d994 100755
--- a/etherpad/bin/rebuildjar.sh
+++ b/etherpad/bin/rebuildjar.sh
@@ -17,15 +17,99 @@
bin/java-version.sh
if [ -z "$JAR" ]; then
- if [ ! -z `which fastjar` ]; then
- JAR=fastjar
+ if [ ! -z $(which fastjar 2>/dev/null) ]; then
+ # http://lists.gnu.org/archive/html/fastjar-dev/2009-12/msg00000.html
+ version=`fastjar --version | grep fastjar | sed 's/.* //g'`
+ if [[ "$version" = "0.97" || "$version" = "0.98" ]]; then
+ echo "fastjar version $version can't build EtherPad. Falling back to standard jar."
+ JAR=jar
+ else
+ JAR=fastjar
+ fi
else
JAR=jar
fi
fi
+[ -z "$JAVA_HOME" ] && read -p "\$JAVA_HOME is not set, please enter the path to your Java installation: " JAVA_HOME
+if [ ! -e "$JAVA_HOME" ]; then
+ echo "The path to \$JAVA_HOME ($JAVA_HOME) does not exist, please check and try again."
+ exit 1
+else
+ export JAVA_HOME
+fi
+
+[ -z "$SCALA_HOME" ] && read -p "\$SCALA_HOME is not set, please enter the path to your Scala installation: " SCALA_HOME
+if [ ! -e "$SCALA_HOME" ]; then
+ echo "The path to \$SCALA_HOME ($SCALA_HOME) does not exist, please check and try again."
+ exit 1
+else
+ export SCALA_HOME
+fi
+
+if [ -z "$SCALA" ]; then
+ if [ `which scala 2>/dev/null 1>/dev/null` ]; then
+ SCALA=`which scala`
+ echo "Using 'scala' binary found at $SCALA. Set \$SCALA to use another one."
+ elif [ -x "$SCALA_HOME/bin/scala" ]; then
+ SCALA="$SCALA_HOME/bin/scala"
+ echo "Using 'scala' binary found at $SCALA. Set \$SCALA to use another one."
+ else
+ read -p "\$SCALA is not set and the 'scala' binary could not be found, please enter the path to the file: " SCALA
+ fi
+fi
+if [ ! -x "$SCALA" ]; then
+ echo "The path to \$SCALA ($SCALA) is not an executable file, please check and try again."
+ exit 1
+else
+ export SCALA
+fi
+
+if [ -z "$JAVA" ]; then
+ if [ `which java 2>/dev/null 1>/dev/null` ]; then
+ JAVA=`which java`
+ echo "Using 'java' binary found at $JAVA. Set \$JAVA to use another one."
+ elif [ -x "$JAVA_HOME/bin/java" ]; then
+ JAVA="$JAVA_HOME/bin/java"
+ echo "Using 'java' binary found at $JAVA. Set \$JAVA to use another one."
+ else
+ read -p "\$JAVA is not set and the 'java' binary could not be found, please enter the path to the file: " JAVA
+ fi
+fi
+if [ ! -x "$JAVA" ]; then
+ echo "The path to \$JAVA ($JAVA) is not an executeable file, please check and try again."
+ exit 1
+else
+ export JAVA
+fi
+
+[ -z "$MYSQL_CONNECTOR_JAR" ] && read -p "\$MYSQL_CONNECTOR_JAR is not set, please enter the path to the MySQL JDBC driver .jar file: " MYSQL_CONNECTOR_JAR
+if [ ! -e "$MYSQL_CONNECTOR_JAR" ]; then
+ echo "The path to \$MYSQL_CONNECTOR_JAR ($MYSQL_CONNECTOR_JAR) does not exist, please check and try again."
+ exit 1
+else
+ export MYSQL_CONNECTOR_JAR
+fi
+
+# Check for javac version. Unfortunately, javac doesn't tell you whether
+# it's Sun Java or OpenJDK, but the "java" binary that's in the same
+# directory will.
+if [ -e "$JAVA_HOME/bin/java" ]; then
+ ($JAVA_HOME/bin/java -version 2>&1) | {
+ while read file; do
+ javaver=$file
+ done
+ for word in $javaver; do
+ if [ $word != "Java" ]; then
+ echo "$JAVA_HOME/bin/java is from a non-Sun compiler, and may not be able to compile EtherPad. If you get syntax errors, you should point \$JAVA_HOME at a Sun Java JDK installation instead."
+ fi
+ break
+ done
+ }
+fi
+
function notify {
- if [ ! -z `which growlnotify` ]; then
+ if [ ! -z $(which growlnotify 2>/dev/null) ]; then
echo $0 finished | growlnotify
fi
}
diff --git a/etherpad/etc/etherpad.localdev-default.properties b/etherpad/etc/etherpad.localdev-default.properties
index 97f420f..c540d12 100644
--- a/etherpad/etc/etherpad.localdev-default.properties
+++ b/etherpad/etc/etherpad.localdev-default.properties
@@ -15,4 +15,5 @@ modulePath = ./src
transportPrefix = /comet
transportUseWildcardSubdomains = true
useVirtualFileRoot = ./src
-motdPage = /ep/pad/view/ro.3PfHCD0ApLc/latest?fullScreen=1&slider=0&sidebar=0 \ No newline at end of file
+motdPage = /ep/pad/view/ro.3PfHCD0ApLc/latest?fullScreen=1&slider=0&sidebar=0
+topdomains = localhost,redhog.org
diff --git a/etherpad/src/etherpad/globals.js b/etherpad/src/etherpad/globals.js
index 53a3f95..fcd5519 100644
--- a/etherpad/src/etherpad/globals.js
+++ b/etherpad/src/etherpad/globals.js
@@ -23,20 +23,23 @@ var COMETPATH = "/comet";
var COLOR_PALETTE = ['#ffc7c7','#fff1c7','#e3ffc7','#c7ffd5','#c7ffff','#c7d5ff','#e3c7ff','#ffc7f1','#ff8f8f','#ffe38f','#c7ff8f','#8fffab','#8fffff','#8fabff','#c78fff','#ff8fe3','#d97979','#d9c179','#a9d979','#79d991','#79d9d9','#7991d9','#a979d9','#d979c1','#d9a9a9','#d9cda9','#c1d9a9','#a9d9b5','#a9d9d9','#a9b5d9','#c1a9d9','#d9a9cd'];
+var trueRegex = /\s*true\s*/i;
+
function isProduction() {
- return (appjet.config['etherpad.isProduction'] == "true");
+ return (trueRegex.test(appjet.config['etherpad.isProduction']));
}
function isProAccountEnabled() {
return (appjet.config['etherpad.proAccounts'] == "true");
}
-
-var SUPERDOMAINS = {
- 'localbox.info': true,
- 'localhost': true,
- 'etherpad.com': true
-};
+function domainEnabled(domain) {
+ var enabled = appjet.config.topdomains.split(',');
+ for (var i = 0; i < enabled.length; i++)
+ if (domain == enabled[i])
+ return true;
+ return false;
+}
var PNE_RELEASE_VERSION = "1.1.3";
var PNE_RELEASE_DATE = "June 15, 2009";
diff --git a/etherpad/src/etherpad/pne/pne_utils.js b/etherpad/src/etherpad/pne/pne_utils.js
index 3169407..bc105bd 100644
--- a/etherpad/src/etherpad/pne/pne_utils.js
+++ b/etherpad/src/etherpad/pne/pne_utils.js
@@ -72,7 +72,8 @@ function checkDbVersionUpgrade() {
var dbVersion = parseVersionString(dbVersionString);
var runningVersion = getVersionNumbers();
- var force = (appjet.config['etherpad.forceDbUpgrade'] == "true");
+ var trueRegex = /\s*true\s*/i;
+ var force = trueRegex.test(appjet.config['etherpad.forceDbUpgrade']);
if (!force && (runningVersion.major != dbVersion.major)) {
println("Error: you are attempting to update an EtherPad["+dbVersionString+
diff --git a/etherpad/src/etherpad/pro/pro_utils.js b/etherpad/src/etherpad/pro/pro_utils.js
index c9874f0..5e8b801 100644
--- a/etherpad/src/etherpad/pro/pro_utils.js
+++ b/etherpad/src/etherpad/pro/pro_utils.js
@@ -72,13 +72,13 @@ function _computeIsProDomainRequest() {
var domain = _stripComet(request.domain);
- if (SUPERDOMAINS[domain]) {
+ if (domainEnabled(domain)) {
return false;
}
var requestSuperdomain = getRequestSuperdomain();
- if (SUPERDOMAINS[requestSuperdomain]) {
+ if (domainEnabled(requestSuperdomain)) {
// now see if this subdomain is actually in our database.
if (domains.getRequestDomainRecord()) {
return true;
diff --git a/etherpad/src/etherpad/sessions.js b/etherpad/src/etherpad/sessions.js
index 633bf0b..3c10963 100644
--- a/etherpad/src/etherpad/sessions.js
+++ b/etherpad/src/etherpad/sessions.js
@@ -156,7 +156,7 @@ function preRequestCookieCheck() {
}
// Only superdomains can set cookies.
- var isSuperdomain = SUPERDOMAINS[request.domain];
+ var isSuperdomain = domainEnabled(request.domain);
if (isSuperdomain) {
// superdomain without cookies
diff --git a/etherpad/src/main.js b/etherpad/src/main.js
index 2d92a1a..b77d5ee 100644
--- a/etherpad/src/main.js
+++ b/etherpad/src/main.js
@@ -258,7 +258,8 @@ function checkRequestIsWellFormed() {
// checkHost()
//----------------------------------------------------------------
function checkHost() {
- if (appjet.config['etherpad.skipHostnameCheck'] == "true") {
+ var trueRegex = /\s*true\s*/i;
+ if (trueRegex.test(appjet.config['etherpad.skipHostnameCheck'])) {
return;
}
@@ -267,7 +268,7 @@ function checkHost() {
}
// we require the domain to either be <superdomain> or a pro domain request.
- if (SUPERDOMAINS[request.domain]) {
+ if (domainEnabled(request.domain)) {
return;
}
if (pro_utils.isProDomainRequest()) {
diff --git a/etherpad/src/plugins/fileUpload/main.js b/etherpad/src/plugins/fileUpload/main.js
index 5ff105f..71bd819 100644
--- a/etherpad/src/plugins/fileUpload/main.js
+++ b/etherpad/src/plugins/fileUpload/main.js
@@ -3,7 +3,7 @@ import("plugins.fileUpload.hooks");
function init() {
this.hooks = ['handlePath'];
- this.description = 'File upload manager';
+ this.description = 'File upload manager adds a button to pads to upload a file. A URL to the uploaded file is then inserted into the pad.';
this.handlePath = hooks.handlePath;
this.install = install;
this.uninstall = uninstall;
diff --git a/etherpad/src/plugins/twitterStyleTags/main.js b/etherpad/src/plugins/twitterStyleTags/main.js
index 5f42dea..34d5d85 100644
--- a/etherpad/src/plugins/twitterStyleTags/main.js
+++ b/etherpad/src/plugins/twitterStyleTags/main.js
@@ -7,7 +7,7 @@ import("sqlbase.sqlcommon");
function init() {
this.hooks = ['handlePath', 'aceGetFilterStack', 'aceCreateDomLine', 'padModelWriteToDB'];
this.client = new main.init();
- this.description = 'Twitter-style tags';
+ this.description = 'Twitter-style tags allows the user to tag pads by writing #tagname anywhere in the pad text. Tags are automatically linked to searches for that tag in other pads. This plugin also provides an alternative home-page for Etherpad with a display of the last changed public pads as well as that information available as an RSS stream.';
this.handlePath = hooks.handlePath;
this.aceGetFilterStack = main.aceGetFilterStack;
this.aceCreateDomLine = main.aceCreateDomLine;
diff --git a/etherpad/src/static/css/admin/pluginmanager.css b/etherpad/src/static/css/admin/pluginmanager.css
new file mode 100644
index 0000000..136a713
--- /dev/null
+++ b/etherpad/src/static/css/admin/pluginmanager.css
@@ -0,0 +1,62 @@
+#editorcontainer {
+ padding: 5pt;
+}
+
+#editorcontainerbox {
+ overflow: auto;
+ height: auto;
+}
+
+#editbarinner {
+ line-height: 36px;
+ font-size: 16px;
+ padding-left: 6pt;
+}
+
+#editbarinner a {
+ font-size: 12px;
+}
+
+#editorcontainerbox table {
+ margin: 10pt;
+ border-collapse: collapse;
+}
+
+#editorcontainerbox table tr th {
+ font-weight: bold;
+ background: #c3c3c3;
+}
+
+#editorcontainerbox table tr td,
+#editorcontainerbox table tr th {
+ border: 1px solid #c3c3c3;
+ padding: 2pt;
+}
+
+#editorcontainerbox table tr:first-child th,
+#editorcontainerbox table tr:first-child td {
+ border-top-color: #e6e6e6;
+}
+
+#editorcontainerbox table tr th:first-child,
+#editorcontainerbox table tr td:first-child {
+ border-left-color: #e6e6e6;
+}
+
+.mousover_parent .mouseover_child {
+ display: none;
+ position: absolute;
+ padding: 4pt;
+
+ border-top-color: #e6e6e6;
+ border-bottom-color: #c3c3c3;
+ border-left-color: #e6e6e6;
+ border-right-color: #c3c3c3;
+ border: 1px solid;
+
+ background: #ffffff;
+}
+
+.mousover_parent:hover .mouseover_child {
+ display: block;
+}
diff --git a/etherpad/src/static/css/pad2_ejs.css b/etherpad/src/static/css/pad2_ejs.css
index 1448070..c56dc58 100644
--- a/etherpad/src/static/css/pad2_ejs.css
+++ b/etherpad/src/static/css/pad2_ejs.css
@@ -91,7 +91,7 @@ a#hidetopmsg { position: absolute; right: 5px; bottom: 5px; }
float: right;
}
-#docbarslider-outer
+.docbarbutton.highlight
{
background-color: #fef2bd;
border: 1px solid #CCC;
diff --git a/etherpad/src/templates/admin/pluginmanager.ejs b/etherpad/src/templates/admin/pluginmanager.ejs
index 8a3d0bf..1cd7139 100644
--- a/etherpad/src/templates/admin/pluginmanager.ejs
+++ b/etherpad/src/templates/admin/pluginmanager.ejs
@@ -19,6 +19,7 @@ limitations under the License. */ %>
helpers.setBodyId("padbody");
helpers.addBodyClass("limwidth nonpropad nonprouser");
helpers.includeCss("pad2_ejs.css");
+ helpers.includeCss("admin/pluginmanager.css");
helpers.includeJs("undo-xpopup.js");
helpers.includeCometJs();
helpers.includeJQuery();
@@ -63,13 +64,19 @@ limitations under the License. */ %>
<% } %>
</div>
<div id="docbar" class="docbar-public">
- <div id="docbarleft"><!-- --></div>
- <div title="Manage plugins" id="docbarpadtitle"><span>Manage plugins</span></div>
-
- <div id="docbaroptions-outer"><a href="javascript:void(0)" id="docbaroptions">Pad Options</a></div>
- <div id="docbarsavedrevs-outer"><a href="javascript:void(0)" id="docbarsavedrevs">Saved revisions</a></div>
- <div id="docbarimpexp-outer"><a href="javascript:void(0)" id="docbarimpexp">Import/Export</a></div>
- <div id="docbarslider-outer"><a target="_blank" href="/ep/pad/view/xx/latest" id="docbarslider">Time Slider</a></div>
+ <div id="docbar">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" id="docbartable">
+ <tr>
+ <td><img src="/static/img/jun09/pad/roundcorner_left.gif"></td>
+ <td id="docbarpadtitle"><span>Plugin manager</span></td>
+ <td width="100%">&nbsp;</td>
+ <%
+ plugins.callHookStr('docbarItemsAll', {}, '', '<td class="docbarbutton" nowrap>', '</td>');
+ plugins.callHookStr('docbarItemsPluginManager', {}, '', '<td class="docbarbutton" nowrap>', '</td>');
+ %>
+ <td><img src="/static/img/jun09/pad/roundcorner_right.gif"></td>
+ </tr>
+ </table>
</div>
</div>
@@ -89,12 +96,10 @@ limitations under the License. */ %>
<div id="editbarleft"><!-- --></div>
<div id="editbarright"><!-- --></div>
- <div id="editbarinner">
- </div>
+ <div id="editbarinner"></div>
</div>
<div id="editorcontainerbox">
<div id="editorcontainer">
- <h1>Plugin manager</h1>
<table>
<tr>
<th>Module name</th>
@@ -103,7 +108,12 @@ limitations under the License. */ %>
</tr>
<% for (var plugin in plugins.pluginModules) { %>
<tr>
- <td><%= plugins.pluginModules[plugin].description %></td>
+ <td class="mousover_parent">
+ <%= plugin %>
+ <div class="mouseover_child">
+ <%= plugins.pluginModules[plugin].description %>
+ </div>
+ </td>
<td>
<% if (plugins.plugins[plugin] !== undefined) { %>
Installed
@@ -115,6 +125,9 @@ limitations under the License. */ %>
<% if (plugins.plugins[plugin] !== undefined) { %>
<a href="/ep/admin/pluginmanager/?plugin=<%= plugin %>&action=uninstall">Uninstall</a>
<a href="/ep/admin/pluginmanager/?plugin=<%= plugin %>&action=reinstall">Reinstall</a>
+ <% if (plugins.plugins[plugin].configLink !== undefined) { %>
+ <a href="<%= plugins.plugins[plugin].configLink %>">Configure</a>
+ <% } %>
<% } else { %>
<a href="/ep/admin/pluginmanager/?plugin=<%= plugin %>&action=install">Install</a>
<% } %>
diff --git a/etherpad/src/templates/pad/pad_body2.ejs b/etherpad/src/templates/pad/pad_body2.ejs
index 4382e8f..fbaa7bf 100644
--- a/etherpad/src/templates/pad/pad_body2.ejs
+++ b/etherpad/src/templates/pad/pad_body2.ejs
@@ -105,16 +105,21 @@ limitations under the License. */ %>
<div id="docbar">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="docbartable">
+ <tr>
<td><img src="/static/img/jun09/pad/roundcorner_left.gif"></td>
<td id="docbarpadtitle"><span><%= initialTitle %></span></td>
<td width="100%">&nbsp;</td>
-<% if (isProAccountHolder) { %>
- <td id="docbarsecurity-outer" class="docbarbutton" nowrap>
- <a href="javascript:void(0)" id="docbarsecurity">
- <img src="/static/img/jun09/pad/icon_security.gif">Security
- </a>
- </td>
-<% } /* isProAccountHolder */ %>
+ <%
+ plugins.callHookStr('docbarItemsAll', {}, '', '<td class="docbarbutton" nowrap>', '</td>');
+ plugins.callHookStr('docbarItemsPad', {}, '', '<td class="docbarbutton" nowrap>', '</td>');
+ %>
+ <% if (isProAccountHolder) { %>
+ <td id="docbarsecurity-outer" class="docbarbutton" nowrap>
+ <a href="javascript:void(0)" id="docbarsecurity">
+ <img src="/static/img/jun09/pad/icon_security.gif">Security
+ </a>
+ </td>
+ <% } /* isProAccountHolder */ %>
<td id="docbaroptions-outer" class="docbarbutton" nowrap>
<a href="javascript:void(0)" id="docbaroptions">
<img src="/static/img/jun09/pad/icon_pad_options.gif">Pad&nbsp;Options
@@ -130,18 +135,19 @@ limitations under the License. */ %>
<img src="/static/img/jun09/pad/icon_saved_revisions.gif">Saved&nbsp;revisions
</a>
</td>
- <td id="docbarslider-outer" class="docbarbutton" nowrap>
+ <td id="docbarslider-outer" class="docbarbutton highlight" nowrap>
<a target="_blank" href="/ep/pad/view/<%= localPadId %>/latest" id="docbarslider">
<img src="/static/img/jun09/pad/icon_time_slider.gif">Time&nbsp;Slider
</a>
</td>
<td><img src="/static/img/jun09/pad/roundcorner_right_orange.gif"></td>
+ </tr>
</table>
-<% if (isProAccountHolder) { %>
- <div id="docbarrenamelink">
- <a href="javascript:void(0)">(rename)</a>
- </div>
-<% } /* isProAccountHolder */ %>
+ <% if (isProAccountHolder) { %>
+ <div id="docbarrenamelink">
+ <a href="javascript:void(0)">(rename)</a>
+ </div>
+ <% } /* isProAccountHolder */ %>
<input type="text" id="padtitleedit"/>
<div id="padtitlebuttons">
<a id="padtitlesave" href="javascript:void(0)">Save</a>
diff --git a/infrastructure/bin/compilecache.sh b/infrastructure/bin/compilecache.sh
index a2b6220..6e42a50 100644
--- a/infrastructure/bin/compilecache.sh
+++ b/infrastructure/bin/compilecache.sh
@@ -16,49 +16,51 @@
CP_CMD="cp -R -u"
if [ `uname` == "Darwin" ]; then
- CP_CMD="/bin/cp -R -n"
+ CP_CMD="/bin/cp -R -n"
+elif [ `uname` == "SunOS" ]; then
+ CP_CMD="cp -R" #Solaris cp does not have '-u'
fi
function cacheonfiles {
- NAME=$1; FILES=$2; FUNC=$3; NOCOPY=1;
- if [ -z "$4" ]; then
- NOCOPY=0
- fi
- REBUILD=0
- BPATH=buildcache/$NAME
- FILETEST=$BPATH/t
- if [ ! -f $FILETEST ]; then
- REBUILD=1
- else
- for a in $FILES; do
- if [ $FILETEST -ot $a ]; then
- echo $a has changed, rebuilding $NAME
+ NAME=$1; FILES=$2; FUNC=$3; NOCOPY=1;
+ if [ -z "$4" ]; then
+ NOCOPY=0
+ fi
+ REBUILD=0
+ BPATH=buildcache/$NAME
+ FILETEST=$BPATH/t
+ if [ ! -f $FILETEST ]; then
REBUILD=1
- fi
- done
- fi
- if [ $REBUILD -eq 1 ]; then
- if [ -d $BPATH ]; then
- rm -rf $BPATH
+ else
+ for a in $FILES; do
+ if [ $FILETEST -ot $a ]; then
+ echo $a has changed, rebuilding $NAME
+ REBUILD=1
+ fi
+ done
+ fi
+ if [ $REBUILD -eq 1 ]; then
+ if [ -d $BPATH ]; then
+ rm -rf $BPATH
+ fi
+ mkdir -p $BPATH
+ $FUNC $BPATH
+ pushd $BPATH >> /dev/null
+ touch t
+ popd >> /dev/null
+ else
+ echo using cached $NAME...
+ fi
+ if [ $NOCOPY -ne 1 ]; then
+ for a in $BPATH/*; do
+ if [ -d $a ]; then
+ $CP_CMD $a build/
+ elif [ -f $a ]; then
+ cp $a build/
+ else
+ echo unknown file type $a
+ exit 1
+ fi
+ done
fi
- mkdir -p $BPATH
- $FUNC $BPATH
- pushd $BPATH >> /dev/null
- touch t
- popd >> /dev/null
- else
- echo using cached $NAME...
- fi
- if [ $NOCOPY -ne 1 ]; then
- for a in $BPATH/*; do
- if [ -d $a ]; then
- $CP_CMD $a build/
- elif [ -f $a ]; then
- cp $a build/
- else
- echo unknown file type $a
- exit 1
- fi
- done
- fi
-}
+}
diff --git a/infrastructure/net.appjet.oui/config.scala b/infrastructure/net.appjet.oui/config.scala
index 46e73cf..6201816 100644
--- a/infrastructure/net.appjet.oui/config.scala
+++ b/infrastructure/net.appjet.oui/config.scala
@@ -41,7 +41,7 @@ object config {
null;
}
}
- def boolOrElse(name: String, default: Boolean) = values.get(name).map(_.equals("true")).getOrElse(default);
+ def boolOrElse(name: String, default: Boolean) = values.get(name).map(_.matches("(?i)\\s*true\\s*")).getOrElse(default);
def intOrElse(name: String, default: Int) = values.get(name).map(Integer.parseInt(_)).getOrElse(default);
def longOrElse(name: String, default: Long) = values.get(name).map(java.lang.Long.parseLong(_)).getOrElse(default);