Make sure that HttpProxy cleans up after itself when purging assets or revisions.
This commit is contained in:
parent
80ec20b8f2
commit
82554add6b
2 changed files with 25 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
7.10.25
|
7.10.25
|
||||||
- fixed #12321: Error while deleting a group.
|
- fixed #12321: Error while deleting a group.
|
||||||
- fixed #12322: Cache/CHI stomps on the config file
|
- fixed #12322: Cache/CHI stomps on the config file
|
||||||
|
- fixed #12327: HttpProxy does not clean up cookie jar storage locations
|
||||||
|
|
||||||
7.10.24
|
7.10.24
|
||||||
- fixed #12318: asset error causes asset manager to fail
|
- fixed #12318: asset error causes asset manager to fail
|
||||||
|
|
|
||||||
|
|
@ -256,14 +256,36 @@ sub prepareView {
|
||||||
|
|
||||||
=head2 purge
|
=head2 purge
|
||||||
|
|
||||||
Extend the base method to delete the cookie jar
|
Extend the base method to delete all cookie jars for this HttpProxy
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub purge {
|
sub purge {
|
||||||
|
my $self = shift;
|
||||||
|
my $id = $self->getId;
|
||||||
|
my $session = $self->session;
|
||||||
|
my @storageIds = $session->db->buildArray("select cookieJarStorageId from HttpProxy where assetId=?",[$id]);
|
||||||
|
my $success = $self->SUPER::purge;
|
||||||
|
return 0 unless $success;
|
||||||
|
foreach my $storageId (@storageIds) {
|
||||||
|
my $storage = WebGUI::Storage->get($session, $storageId);
|
||||||
|
$storage->delete if defined $storage;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 purgeRevision
|
||||||
|
|
||||||
|
Extend the base method to delete the cookie jar for this revision.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub purgeRevision {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->getCookieJar->delete;
|
$self->getCookieJar->delete;
|
||||||
$self->SUPER::purge;
|
$self->SUPER::purgeRevision;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue