summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-01-06 11:10:33 -0800
committerBrion Vibber <brion@pobox.com>2010-01-06 11:10:33 -0800
commitb93244395f2c5643ae5e1be1e4e1d652c6d654c1 (patch)
tree1d3d15d20f11e3e5601944b215ba36908cdea2d1 /classes
parentfe181002814359620e962454444917580ee51970 (diff)
Fix for broken profile flag admin UI: delete stray flag entries when users are deleted so broken entries don't litter the lookups.
* added ProfileDeleteRelated event to match UserDeleteRelated, to allow plugins to add extra related tables on profile deletion * UserFlagPlugin: deleting flags when target profile is deleted * UserFlagPlugin: deleting flags when flagging user is deleted * UserFlagPlugin: fix for autoloader -- class names are case-insensitive. We may get lowercase class names coming in at times, such as when creating DB objects programatically from a table name. Note that any already-existing bogus entries need to be removed from the database: select * from user_flag_profile where (select id from profile where id=profile_id) is null; select * from user_flag_profile where (select id from user where id=user_id) is null;
Diffstat (limited to 'classes')
-rw-r--r--classes/Profile.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/classes/Profile.php b/classes/Profile.php
index 03196447b..25d908dbf 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -504,6 +504,7 @@ class Profile extends Memcached_DataObject
'Reply',
'Group_member',
);
+ Event::handle('ProfileDeleteRelated', array($this, &$related));
foreach ($related as $cls) {
$inst = new $cls();