Changed style system to a "body" configuration rather than header/footer.
This commit is contained in:
parent
3f2abb21e5
commit
299995af14
4 changed files with 70 additions and 87 deletions
|
|
@ -93,6 +93,27 @@ sub _getUserInfo {
|
|||
return \%user;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _loadMacros {
|
||||
my ($namespace, $cmd, @files, $file, $dir);
|
||||
if ($^O =~ /Win/i) {
|
||||
$dir = "\\lib\\WebGUI\\Macro";
|
||||
} else {
|
||||
$dir = "/lib/WebGUI/Macro";
|
||||
}
|
||||
opendir (DIR,$session{config}{webguiRoot}.$dir) or WebGUI::ErrorHandler::fatalError("Can't open macro directory!");
|
||||
@files = readdir(DIR);
|
||||
foreach $file (@files) {
|
||||
if ($file =~ /(.*?)\.pm$/) {
|
||||
$namespace = $1;
|
||||
$cmd = "use WebGUI::Macro::".$1;
|
||||
eval($cmd);
|
||||
$session{macro}{$namespace} = $namespace;
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _loadWobjects {
|
||||
my ($dir, @files, $file, $cmd, $namespace);
|
||||
|
|
@ -199,6 +220,7 @@ sub open {
|
|||
###----------------------------
|
||||
### loading plugins
|
||||
_loadWobjects();
|
||||
_loadMacros();
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue