Skip to content

Commit

Permalink
Item13139: Backwards compat to Foswiki 1.1.x
Browse files Browse the repository at this point in the history
Alias Request::multi_param() to Request::param() on older releases of
Foswiki.

Also fix the JQuery dependency for TinyMCEPlugin
  • Loading branch information
gac410 committed Dec 12, 2014
1 parent 825c26c commit c37a3d1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
7 changes: 7 additions & 0 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/Get.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ sub process {
my ( $session, $plugin, $verb, $response ) = @_;
my $query = Foswiki::Func::getCgiQuery();

# Backwards compatibility for Foswiki 1.1.x
unless ( $query->can('multi_param') ) {
no warnings 'redefine';
*Foswiki::Request::multi_param = \&Foswiki::Request::param;
use warnings 'redefine';
}

unless ($query) {
print CGI::header( -status => 500 );
return undef;
Expand Down
7 changes: 7 additions & 0 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/Save.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ sub process {
my ( $session, $plugin, $verb, $response ) = @_;
my $query = Foswiki::Func::getCgiQuery();

# Backwards compatibility for Foswiki 1.1.x
unless ( $query->can('multi_param') ) {
no warnings 'redefine';
*Foswiki::Request::multi_param = \&Foswiki::Request::param;
use warnings 'redefine';
}

unless ($query) {
print CGI::header( -status => 500 );
return undef;
Expand Down
8 changes: 8 additions & 0 deletions JsonRpcContrib/lib/Foswiki/Contrib/JsonRpcContrib/Request.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ sub new {
my ( $class, $session ) = @_;

my $request = $session->{request};

# Backwards compatibility for Foswiki 1.1.x
unless ( $request->can('multi_param') ) {
no warnings 'redefine';
*Foswiki::Request::multi_param = \&Foswiki::Request::param;
use warnings 'redefine';
}

my $this = bless( {}, $class );

# get json-rpc request object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Foswiki::Plugins::WysiwygPlugin,>=1.2.0,perl,Translator module
Foswiki::Plugins::JQueryPlugin,>=3.30,perl,jQuery library
Foswiki::Plugins::JQueryPlugin,>=6.00,perl,Required JQuery library

0 comments on commit c37a3d1

Please sign in to comment.