Skip to content

Commit

Permalink
Item10044: fixed compatability with foswiki 1.0
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/PhyloWidgetPlugin@10119 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
TemiVarghese authored and TemiVarghese committed Nov 30, 2010
1 parent 20e9633 commit 6e10d92
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions lib/Foswiki/Plugins/PhyloWidgetPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ our $VERSION = '$Rev$';
# date - a date in 1 Jun 2009 format. Three letter English month names only.
# Note: it's important that this string is exactly the same in the extension
# topic - if you use %$RELEASE% with BuildContrib this is done automatically.
our $RELEASE = '0.1.1';
our $RELEASE = '0.1.2';

# Short description of this plugin
# One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
Expand Down Expand Up @@ -238,7 +238,12 @@ sub getAttachUrl{
}
sub getNHXfromNEX{
my ( $session, $subject, $verb, $responses) = @_;
my $requestObject = Foswiki::Func::getRequestObject();
my $requestObject;
if (defined &Foswiki::Func::getRequestObject) {
$requestObject = Foswiki::Func::getRequestObject();
} else {
$requestObject = Foswiki::Func::getCgiQuery();
}
my $web = $requestObject->param('web');
my $topic = $requestObject->param('topic');
# my $topic = $requestObject->param('topic');
Expand Down Expand Up @@ -380,12 +385,19 @@ Since Foswiki::Plugins::VERSION = '2.0'
=cut

sub postRenderingHandler {
my $requestObject;

if (defined &Foswiki::Func::getRequestObject) {
$requestObject = Foswiki::Func::getRequestObject();
} else {
$requestObject = Foswiki::Func::getCgiQuery();
}
# You can work on $text in place by using the special perl
# variable $_[0]. These allow you to operate on $text
# as if it was passed by reference; for example:
if (Foswiki::Func::isTrue(Foswiki::Func::getRequestObject()->param('phylofixamps'), 0) ){
use HTML::Entities;
decode_entities($_[0]);
if (Foswiki::Func::isTrue($requestObject->param('phylofixamps'), 0) ){
use HTML::Entities;
decode_entities($_[0]);
}

return;
Expand Down

0 comments on commit 6e10d92

Please sign in to comment.