adding skeletons
This commit is contained in:
parent
e017005b17
commit
607a251b11
3 changed files with 82 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
|||
- Changed macro API which cuts macro memory consumption in half. See
|
||||
migration.txt for details.
|
||||
- Added automated code testing framework.
|
||||
- Added code skeletons for the various plugins WebGUI supports.
|
||||
|
||||
|
||||
6.7.7
|
||||
|
|
|
|||
55
docs/upgrades/_upgrade.skeleton
Normal file
55
docs/upgrades/_upgrade.skeleton
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2005 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use lib "../../lib";
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
|
||||
|
||||
my $toVersion = "0.0.0"; # make this match what version you're going to
|
||||
my $quiet; # this line required
|
||||
|
||||
|
||||
start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
|
||||
finish(); # this line required
|
||||
|
||||
|
||||
##-------------------------------------------------
|
||||
#sub exampleFunction {
|
||||
# print "\tWe're doing some stuff here that you should know about.\n" unless ($quiet);
|
||||
# # and here's our code
|
||||
#}
|
||||
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE ----
|
||||
|
||||
#-------------------------------------------------
|
||||
sub start {
|
||||
my $configFile;
|
||||
$|=1; #disable output buffering
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
'quiet'=>\$quiet
|
||||
);
|
||||
WebGUI::Session::open("../..",$configFile);
|
||||
WebGUI::Session::refreshUserInfo(3);
|
||||
WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")");
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub finish {
|
||||
WebGUI::Session::close();
|
||||
}
|
||||
|
||||
26
lib/WebGUI/Macro/_macro.skeleton
Normal file
26
lib/WebGUI/Macro/_macro.skeleton
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package WebGUI::Macro::MacroSkeleton; # edit this line to match your own macro name
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2005 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my $somePassedInParameter = shift;
|
||||
my $someOtherPassedInParameter = shift;
|
||||
my $output = ""; # do some stuff
|
||||
return $output;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue