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

Bawolff <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|need-review                 |reviewed
                 CC|                            |[email protected]

--- Comment #12 from Bawolff <[email protected]> 2011-12-21 08:17:19 UTC ---
(In reply to comment #9)
> This table is used in several places to get a list of categories. One of those
> places is ApiQueryAllCategories. This api is used to get suggestions for
> category titles. And is now returning suggestions for categories that have 
> only
> existed by accident in the past and have no category-namespace page and no
> members. 
> 
> Raising priority and adding 1.19 blocker (hopefully sooner, but it's hitting
> UploadWizard and causing bug 30718)

Note, uploadWizard seems to have been fixed independently of this.


If we really care about this sort of thing, we could delete the category
entries every time cat_pages gets down to 0 and the description page doesn't
exist. But then we could have a lot of deleted and then recreated and then
deleted entries in the category table.

----

Re: comment 7 (the patch)

Looks mostly good I think (I didn't take a super in-depth look, but from my
quick read over, it looks pretty good). Two issues I see so far:
*When getting the entries from the category table in the maintinace script, you
should sort by cat_pages. There's an index on this so it should be fast, and
its a lot quicker to delete everything with 0 entries if you start with the
things with 0 entries instead of going through all entries
*If you already have a category row available, do Category::newFromRow( $row );
(or even just directly look at the values in $row). Doing Category::newFromName
will result in a second query for the category table which you already have.
*I don't like the idea of introducing methods that aren't used.

-- 
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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to