fixed: Collab groupToEditPost shouldn't be empty

fixed: WebGUI::User->isInGroup has bad defaulting behavior
This commit is contained in:
Doug Bell 2009-02-17 23:21:30 +00:00
parent ffdb86de81
commit 30158b7f8d
3 changed files with 24 additions and 3 deletions

View file

@ -11,6 +11,8 @@
- fixed #9749: Account Manager: AIM link
- fixed #9751: Account Manager: problem sorting in Contributions
- fixed #9750: Account Manager: Inbox Messages per Page [TEMPLATE]
- fixed: Collaboration groupToEditPost should not be blank
- fixed: WebGUI::User->isInGroup had bad default groupId
7.6.11
- fixed: Asset Manager can generate URLs that are too long

View file

@ -32,6 +32,7 @@ my $quiet; # this line required
my $session = start(); # this line required
addAssetDiscoveryServiceAgain( $session );
changeMatrixAttributeIndexing( $session );
fixCollaborationGroupToEditPost( $session );
# upgrade functions go here
@ -75,6 +76,23 @@ sub changeMatrixAttributeIndexing {
print "Done.\n" unless $quiet;
}
#----------------------------------------------------------------------------
# Fix the groupToEditPost in the Collaboration (should not be "")
sub fixCollaborationGroupToEditPost {
my $session = shift;
print "\tFixing group to edit post in Collaboration..." unless $quiet;
# and here's our code
$session->db->write(<<'SQL');
UPDATE Collaboration
SET groupToEditPost= (
SELECT groupIdEdit FROM assetData
WHERE assetData.assetId=Collaboration.assetId
AND assetData.revisionDate = Collaboration.revisionDate
)
WHERE groupToEditPost = "";
SQL
print "DONE!\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
#----------------------------------------------------------------------------