Skip to content

Commit

Permalink
Item13897: compare/compareauth was using old script
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Oct 18, 2016
1 parent c442117 commit 9cbca2f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 56 deletions.
38 changes: 10 additions & 28 deletions CompareRevisionsAddOn/bin/compare
@@ -1,36 +1,18 @@
#! /usr/bin/env perl
# See bottom of file for license and copyright information
use strict;
use warnings;

use File::Spec;

BEGIN {
if ( defined $ENV{GATEWAY_INTERFACE} || defined $ENV{MOD_PERL} ) {
$Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI';
use CGI::Carp qw(fatalsToBrowser);
$SIG{__DIE__} = \&CGI::Carp::confess;
}
else {
$Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI';
require Carp;
$SIG{__DIE__} = \&Carp::confess;
}
my ( $volume, $binDir, $action ) = File::Spec->splitpath(__FILE__);
my $setlib = File::Spec->catpath( $volume, $binDir, 'setlib.cfg' );
@INC = ( '.', grep { $_ ne '.' } @INC ) unless $binDir;
require $setlib;
$action =~ s/\..*$//; # Remove eventual file extension
$ENV{FOSWIKI_ACTION} = $action;
}

use Foswiki ();
use Foswiki::UI ();
$Foswiki::engine->run();
use Cwd;
use lib Cwd::abs_path("../lib");
use Foswiki::App;
use Plack::Loader;

my $app = sub {
return Foswiki::App->run( env => shift, );
};
Plack::Loader->auto->run($app);
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2008-2014 Foswiki Contributors. Foswiki Contributors
Copyright (C) 2008-2016 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
Expand Down
38 changes: 10 additions & 28 deletions CompareRevisionsAddOn/bin/compareauth
@@ -1,36 +1,18 @@
#! /usr/bin/env perl
# See bottom of file for license and copyright information
use strict;
use warnings;

use File::Spec;

BEGIN {
if ( defined $ENV{GATEWAY_INTERFACE} || defined $ENV{MOD_PERL} ) {
$Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI';
use CGI::Carp qw(fatalsToBrowser);
$SIG{__DIE__} = \&CGI::Carp::confess;
}
else {
$Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI';
require Carp;
$SIG{__DIE__} = \&Carp::confess;
}
my ( $volume, $binDir, $action ) = File::Spec->splitpath(__FILE__);
my $setlib = File::Spec->catpath( $volume, $binDir, 'setlib.cfg' );
@INC = ( '.', grep { $_ ne '.' } @INC ) unless $binDir;
require $setlib;
$action =~ s/\..*$//; # Remove eventual file extension
$ENV{FOSWIKI_ACTION} = $action;
}

use Foswiki ();
use Foswiki::UI ();
$Foswiki::engine->run();
use Cwd;
use lib Cwd::abs_path("../lib");
use Foswiki::App;
use Plack::Loader;

my $app = sub {
return Foswiki::App->run( env => shift, );
};
Plack::Loader->auto->run($app);
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2008-2014 Foswiki Contributors. Foswiki Contributors
Copyright (C) 2008-2016 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
Expand Down

0 comments on commit 9cbca2f

Please sign in to comment.