Updated the hourly script to automatically deal with all sites, and to allow for plugins.
This commit is contained in:
parent
2671feae26
commit
2756f43a78
5 changed files with 164 additions and 72 deletions
|
|
@ -57,21 +57,25 @@ sub page {
|
|||
tie %hash, 'Tie::CPHash';
|
||||
%hash = (%{$wobject},%{$extra});
|
||||
$wobject = \%hash;
|
||||
if (${$wobject}{pageId} != $session{page}{pageId} && ${$wobject}{pageId} != 2) {
|
||||
$wobjectOutput = WebGUI::International::get(417);
|
||||
WebGUI::ErrorHandler::warn($session{user}{username}." [".$session{user}{userId}."] attempted to access wobject [".$session{form}{wid}."] on page '".$session{page}{title}."' [".$session{page}{pageId}."].");
|
||||
} else {
|
||||
$cmd = "WebGUI::Wobject::".${$wobject}{namespace};
|
||||
$w = $cmd->new($wobject);
|
||||
$cmd = "www_".$session{form}{func};
|
||||
$wobjectOutput = $w->$cmd;
|
||||
}
|
||||
# $wobjectOutput = WebGUI::International::get(381); # bad error
|
||||
} else {
|
||||
WebGUI::ErrorHandler::warn("Wobject [$session{form}{wid}] appears to be missing or corrupt, but was requested by $session{user}{username} [$session{user}{userId}].");
|
||||
WebGUI::ErrorHandler::warn("Wobject [$session{form}{wid}] appears to be missing or corrupt, but was requested "
|
||||
."by $session{user}{username} [$session{user}{userId}].");
|
||||
$wobject = ();
|
||||
}
|
||||
}
|
||||
if ($wobject) {
|
||||
if (${$wobject}{pageId} != $session{page}{pageId} && ${$wobject}{pageId} != 2) {
|
||||
$wobjectOutput = WebGUI::International::get(417);
|
||||
WebGUI::ErrorHandler::warn($session{user}{username}." [".$session{user}{userId}."] attempted to access wobject ["
|
||||
.$session{form}{wid}."] on page '".$session{page}{title}."' [".$session{page}{pageId}."].");
|
||||
} else {
|
||||
$cmd = "WebGUI::Wobject::".${$wobject}{namespace};
|
||||
$w = $cmd->new($wobject);
|
||||
$cmd = "www_".$session{form}{func};
|
||||
$wobjectOutput = $w->$cmd;
|
||||
}
|
||||
# $wobjectOutput = WebGUI::International::get(381); # bad error
|
||||
}
|
||||
}
|
||||
if ($operationOutput ne "") {
|
||||
$contentHash{0} = $operationOutput;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue