update fixWgaccess.pl for WebGUI 8

This commit is contained in:
Graham Knop 2010-08-14 09:27:31 -05:00
parent 6857ad6355
commit b7b633bf19

View file

@ -10,19 +10,18 @@
# http://www.plainblack.com info@plainblack.com
#-------------------------------------------------------------------
$|++; # disable output buffering
our ($webguiRoot, $configFile, $help, $man);
BEGIN {
$webguiRoot = "..";
unshift (@INC, $webguiRoot."/lib");
}
use strict;
use Pod::Usage;
use Getopt::Long;
use Pod::Usage;
use WebGUI::Paths -inc;
use WebGUI::Session;
my $configFile;
my $help;
my $man;
$| = 1; # No buffering
# Get parameters here, including $help
GetOptions(
'configFile=s' => \$configFile,
@ -34,7 +33,7 @@ pod2usage( verbose => 1 ) if $help;
pod2usage( verbose => 2 ) if $man;
pod2usage( msg => "Must specify a config file!" ) unless $configFile;
my $session = start( $webguiRoot, $configFile );
my $session = start( $configFile );
use WebGUI::Asset::File;
my $iter = WebGUI::Asset::File->getIsa($session);
@ -56,9 +55,8 @@ finish($session);
#----------------------------------------------------------------------------
sub start {
my $webguiRoot = shift;
my $configFile = shift;
my $session = WebGUI::Session->open($webguiRoot,$configFile);
my $session = WebGUI::Session->open($configFile);
$session->user({userId=>3});
return $session;