New features for 7.1
This commit is contained in:
parent
5b5858055a
commit
a43577a119
5 changed files with 300 additions and 3 deletions
47
sbin/_utility.skeleton
Normal file
47
sbin/_utility.skeleton
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
use lib "../lib";
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
|
||||
my $session = start();
|
||||
# Do your work here
|
||||
finish($session);
|
||||
|
||||
#-------------------------------------------------
|
||||
# Your sub here
|
||||
|
||||
#-------------------------------------------------
|
||||
sub start {
|
||||
my $configFile;
|
||||
$|=1; #disable output buffering
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
$session->user({userId=>3});
|
||||
|
||||
## If your script is adding or changing content you need these lines, otherwise leave them commented
|
||||
#
|
||||
# my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
# $versionTag->set({name=>'Name Your Tag'});
|
||||
#
|
||||
##
|
||||
|
||||
return $session;
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub finish {
|
||||
my $session = shift;
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
|
||||
## If your script is adding or changing content you need these lines, otherwise leave them commented
|
||||
#
|
||||
# my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
# $versionTag->commit;
|
||||
##
|
||||
|
||||
$session->var->end;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue