Skip to content

Commit

Permalink
Item1140: the chage away from using Vars, required by FSA, had broken…
Browse files Browse the repository at this point in the history
… multi-valued parameters, which affected checkboxes and other multi-valued params.

git-svn-id: http://svn.foswiki.org/trunk@2665 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Feb 24, 2009
1 parent c9c4a5e commit 277b884
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions EditRowPlugin/data/System/EditRowPlugin.txt
Expand Up @@ -224,7 +224,7 @@ Another great Foswiki extension from the <a style="text-decoration:none" href="h
| Copyright: | &copy; 2007 Wind<nop>River Inc. |
| License: | [[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]] |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 24 Feb 2009 | Foswikitask:Item1139: fixed restoration of labels after an edit |
| 24 Feb 2009 | Foswikitask:Item1139: fixed restoration of labels after an edit Foswikitask:Item1140: fixed loading of multi-valued parameters |
| 15 Feb 2009 | Foswikitask:Item451: ported to foswiki Foswikitask:Item5757: not respecting footer rows when saving Foswikitask:Item5681: help not fully rendered before inclusion in a TML table Foswikitask:Item1086: Macros were being expanded before editing Foswikitask:Item5924: refactor for reusability |
| 15 May 2008: | TWikibug:Item5621: helptopics were getting munged because of use of BR to replace newlines. This was to prevent accidental table concatenation, but breaks other things worse so I removed it. TWikibug:Item5624: handle comments with embedded tables. TWikibug:Item5625: don't count generated tables in the table count. TWikibug:Item5594: typo was causing strange behaviour with row management tools. TWikibug:Item5595: fixed problem with included tables. TWikibug:Item5596: changed default behaviour for empty cells to ignore pre-existing spaces if there is no other content. TWikibug:Item5616: row moving was failing on 4.1.2 due to bad URL construction. |
| 8 Mar 2008 | TWikibug:Item5386: fixed problem with editing of tables embedded from an included topic TWikibug:Item5043: added Jeff Crawford's patch to fix multiline textareas |
Expand All @@ -251,9 +251,9 @@ Another great Foswiki extension from the <a style="text-decoration:none" href="h
| 13159 | Fixed issue with short rows, and added perms check. Thanks also to TWiki:Main.MichaelDaum for more fixes and testing. Now works on IE. |
| 13148 | TWikibug:Item3770: Bugfixes |
| Dependencies: | %$DEPENDENCIES% |
| Plugin Home: | http://foswiki.org/cgi-bin/view/Extensions/EditRowPlugin |
| Home Page: | http://foswiki.org/cgi-bin/view/Extensions/EditRowPlugin |

<!-- Do _not_ attempt to edit this topic; it is auto-generated. Please add comments/questions/remarks to the Dev topic instead. -->
<!-- Do _not_ attempt to edit this topic; it is auto-generated. Please use the Foswiki support pages to ask questions and report problems instead. -->

%META:FILEATTACHMENT{name="screenshot.gif" attr="h" comment="" version="1"}%
%META:FILEATTACHMENT{name="wikiringlogo20x20.png" attr="h" comment="" version="1"}%
Expand Down
8 changes: 7 additions & 1 deletion EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin.pm
Expand Up @@ -272,7 +272,13 @@ sub save {
} else {
$text =~ s/\\\n//gs;
my @ps = $query->param();
my $urps = { map { $_ => $query->param($_) } @ps };
my $urps = {};
foreach my $p (@ps) {
my @vals = $query->param($p);
# We interpreted multi-value parameters as comma-separated
# lists. This is what checkboxes, select+multi etc. use.
$urps->{$p} = join(',', @vals);
}
require Foswiki::Plugins::EditRowPlugin::TableParser;
ASSERT(!$@) if DEBUG;
my $content =
Expand Down
3 changes: 0 additions & 3 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/Table.pm
Expand Up @@ -356,10 +356,7 @@ sub _getCols {
($cell->{text} || $colDef->{initial_value});
}
}
# CGI returns multi-values separated by \0. Replace with
# the Foswiki convention, comma
$urps->{$cellName} ||= '';
$urps->{$cellName} =~ s/\0/, /g;
push(@cols, $urps->{$cellName});
}
return \@cols;
Expand Down

0 comments on commit 277b884

Please sign in to comment.