Download & Extend

Flag 6.x doesn't decrease the counts on user deletion

Project:Flag
Version:6.x-1.1
Component:Flag core
Category:bug report
Priority:normal
Assigned:aries
Status:closed (fixed)

Issue Summary

Hi,

The Flag 6.x (maybe 5.x too) doesn't decrease the counts on user deletion. My little patch fixes this.

AttachmentSize
flag6_user_delete_counter.patch1.46 KB

Comments

#1

Status:needs review» fixed

Thanks, the patch works great except for a small type where "$flag_data->counter--" should be "$flag_data->count--". I cleaned up the code to match the code style in the rest of Flag (SQL queries are one line, no abbreviations for variable names). I've committed the attached patch for all versions of Flag.

AttachmentSize
flag_user_delete_counter.patch 956 bytes

#2

Oops, and a small followup to make the query join on both content_id and content_type, otherwise we'd only be updating users OR nodes OR comments for a particular content_id. Also committed.

AttachmentSize
flag_user_delete_counter2.patch 1.04 KB

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here