WebGUI 2.7.0 release
This commit is contained in:
parent
c0463670e8
commit
08b81c6064
104 changed files with 7333 additions and 2576 deletions
|
|
@ -14,8 +14,8 @@ use Exporter;
|
|||
use strict qw(vars subs);
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Shortcut;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Utility;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&www_purgeTrash &www_purgeTrashConfirm);
|
||||
|
|
@ -23,10 +23,10 @@ our @EXPORT = qw(&www_purgeTrash &www_purgeTrashConfirm);
|
|||
#-------------------------------------------------------------------
|
||||
sub _purgeWidgets {
|
||||
my ($b, $widgetId, $widgetType, $func);
|
||||
$b = WebGUI::SQL->read("select widgetId, widgetType from widget where pageId=$_[0]",$session{dbh});
|
||||
$b = WebGUI::SQL->read("select widgetId, widgetType from widget where pageId=$_[0]");
|
||||
while (($widgetId,$widgetType) = $b->array) {
|
||||
$func = "WebGUI::Widget::".$widgetType."::purge";
|
||||
&$func($widgetId,$session{dbh});
|
||||
&$func($widgetId);
|
||||
}
|
||||
$b->finish;
|
||||
}
|
||||
|
|
@ -34,11 +34,11 @@ sub _purgeWidgets {
|
|||
#-------------------------------------------------------------------
|
||||
sub _recursePageTree {
|
||||
my ($a, $pageId);
|
||||
$a = WebGUI::SQL->read("select pageId from page where parentId=$_[0]",$session{dbh});
|
||||
$a = WebGUI::SQL->read("select pageId from page where parentId=$_[0]");
|
||||
while (($pageId) = $a->array) {
|
||||
_recursePageTree($pageId);
|
||||
_purgeWidgets($pageId);
|
||||
WebGUI::SQL->write("delete from page where pageId=$pageId",$session{dbh});
|
||||
WebGUI::SQL->write("delete from page where pageId=$pageId");
|
||||
}
|
||||
$a->finish;
|
||||
}
|
||||
|
|
@ -47,7 +47,8 @@ sub _recursePageTree {
|
|||
sub www_purgeTrash {
|
||||
my ($output);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=46&namespace=WebGUI"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output = helpLink(46);
|
||||
$output .= '<h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output .= WebGUI::International::get(162).'<p>';
|
||||
$output .= '<div align="center"><a href="'.$session{page}{url}.'?op=purgeTrashConfirm">'.WebGUI::International::get(44).'</a>';
|
||||
$output .= ' <a href="'.$session{page}{url}.'">'.WebGUI::International::get(45).'</a></div>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue