https://bugzilla.wikimedia.org/show_bug.cgi?id=33545

--- Comment #4 from Aashish Mittal <ashishmittal.m...@gmail.com> 2012-02-06 
17:33:37 UTC ---
Hello,

Thanks for the guidance.

As per your guidelines, I have modified the functions getPageHeader() and
__construct() to get the checkbox for hiding temporary blocks.

Mainly, I modified the getQueryInfo to change the join and the conds. 

Firstly I removed the 'ipb_deleted=1' from the join condition to consider the
non-deleted blocks. So the join returns the non-blocked (ipb_d=null), the
non-deleted blocks (ipb_d=0) and the deleted blocks (ipb_d=1).

Secondly I modified the cond for users without 'hideuser' rights from
'ipb_deleted IS NULL' to 'ipb_deleted = 0 OR ipb_deleted IS NULL'. As a result
of this, the non-blocked (ipb_d=null) and the non-deleted blocked users
(ipb_d=0) are visible to the users without hideuser rights and the deleted
blocks are not visible.

Next, I added a cond 'ipb_deleted IS NULL' for filtering the blocks if the
checkbox is checked since the blocked users will have a not-null ipb_deleted.

On testing, I am getting the expected results. Kindly mention if this method is
fine and should I go ahead and create a patch.

Thanks,
Aashish

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to