oops
This commit is contained in:
parent
9cffe191ac
commit
dbc29d5d11
1 changed files with 3 additions and 4 deletions
|
|
@ -219,8 +219,8 @@ sub new {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub purge {
|
sub purge {
|
||||||
my $sth = WebGUI::SQL->read("select forumId,pageId from USS_submission where USS_id=".quote($_[0]->get("USS_id")));
|
my $sth = WebGUI::SQL->read("select forumId,pageId,USS_submissionId from USS_submission where USS_id=".quote($_[0]->get("USS_id")));
|
||||||
while (my ($forumId, $pageId) = $sth->array) {
|
while (my ($forumId, $pageId,$submissionId) = $sth->array) {
|
||||||
my ($inUseElsewhere) = WebGUI::SQL->quickArray("select count(*) from USS_submission where forumId=".quote($forumId));
|
my ($inUseElsewhere) = WebGUI::SQL->quickArray("select count(*) from USS_submission where forumId=".quote($forumId));
|
||||||
unless ($inUseElsewhere > 1) {
|
unless ($inUseElsewhere > 1) {
|
||||||
my $forum = WebGUI::Forum->new($forumId);
|
my $forum = WebGUI::Forum->new($forumId);
|
||||||
|
|
@ -230,8 +230,7 @@ sub purge {
|
||||||
if (defined $page) {
|
if (defined $page) {
|
||||||
$page->purge;
|
$page->purge;
|
||||||
} else {
|
} else {
|
||||||
WebGUI::ErrorHandler::warn("Submission ".$submissionId."
|
WebGUI::ErrorHandler::warn("Submission ".$submissionId." of USS ".$_[0]->get("USS_id")." didn't have real page attached to it. This could be a minor problem caused by a bug of old, or it could indicate major data corruption issues.");
|
||||||
of USS ".$_[0]->get("USS_id")." didn't have real page attached to it. This could be a minor problem caused by a bug of old, or it could indicate major data corruption issues.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue