Navigation Menu

Skip to content

Commit

Permalink
Item13220: JS bugs and spelling errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Comment committed Jan 29, 2015
1 parent 5834aad commit 24abbda
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
21 changes: 17 additions & 4 deletions ConfigurePlugin/pub/System/ConfigurePlugin/types.uncompressed.js
Expand Up @@ -95,7 +95,10 @@ var Types = {};
Types.STRING = Types.BaseType.extend({
restoreDefaultValue: function() {
var val = this.spec['default'];
val = val.replace(/^\s*(["'])(.*?)\1\s*/, "$2");
if (val === 'undef')
val = null;
else
val = val.replace(/^\s*(["'])(.*?)\1\s*/, "$2");
this.useVal(val);
}
});
Expand Down Expand Up @@ -142,7 +145,7 @@ var Types = {};
useVal: function(val) {
if (typeof(val) == 'undefined') {
val = false;
} else if (val == '0') {
} else if (val == '0' || val == '$FALSE') {
val = false;
} else if ( val == '1') {
val = true;
Expand Down Expand Up @@ -216,15 +219,24 @@ var Types = {};
}
});

Types.PATH = Types.STRING.extend({
});

Types.URL = Types.STRING.extend({
});

Types.URILIST = Types.STRING.extend({
});

Types.URLPATH = Types.STRING.extend({
});

Types.DATE = Types.STRING.extend({
});

Types.COMMAND = Types.STRING.extend({
});

Types.EMAILADDRESS = Types.STRING.extend({
});

Expand Down Expand Up @@ -304,14 +316,15 @@ var Types = {};
},

useVal: function(val) {
val = val.replace(/^\s*(["'])(.*?)\1\s*/, "$2");
var sel = this._getSel(val),
sf = this.spec.select_from,
i, opt;
i;

if (typeof(sf) !== "undefined") {
i = 0;
this.$ui.find('option').each(function() {
opt = sf[i++];
var opt = sf[i++];
if (sel[opt]) {
$(this).attr('selected', 'selected');
} else {
Expand Down
4 changes: 2 additions & 2 deletions core/lib/Foswiki.spec
Expand Up @@ -193,7 +193,7 @@ $Foswiki::cfg{PermittedRedirectHostUrls} = '';
# created. It is normally set automatically in the code.
# $Foswiki::cfg{TempfileDir} = '';

# **PATH LABEL="Save PATH" EXPERT CHECK='undefok'**
# **PATH LABEL="Safe PATH" EXPERT CHECK='undefok'**
# You can override the default PATH setting to control
# where Foswiki looks for external programs, such as grep.
# By restricting this path to just a few key
Expand Down Expand Up @@ -1109,7 +1109,7 @@ $Foswiki::cfg{AntiSpam}{RobotsAreWelcome} = $TRUE;
#---++ Logging
# Control how Foswiki handles logging, including location of logfiles.
# **SELECTCLASS none,Foswiki::Logger::*,Foswiki::Logger::PlainFile::* LABEL="Logger Implemetation"**
# **SELECTCLASS none,Foswiki::Logger::*,Foswiki::Logger::PlainFile::* LABEL="Logger Implementation"**
# Foswiki supports different implementations of log files. It can be
# useful to be able to plug in a database implementation, for example,
# for a large site, or even provide your own custom logger. Select the
Expand Down
11 changes: 8 additions & 3 deletions core/lib/Foswiki/Configure/Query.pm
Expand Up @@ -62,9 +62,14 @@ sub _getSetParams {
}
if ( defined $value ) {

# This is needed to prevent expansion of embedded $Foswiki::cfg
# variables during the eval.
eval("\$Foswiki::cfg$k=join('',\$value)");
if ( $spec->isFormattedType() ) {
eval("\$Foswiki::cfg$k=\$value");
}
else {
# This is needed to prevent expansion of embedded
# $Foswiki::cfg variables during the eval.
eval("\$Foswiki::cfg$k=join('',\$value)");
}
}
else {
eval("undef \$Foswiki::cfg$k");
Expand Down

0 comments on commit 24abbda

Please sign in to comment.