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

Van de Bugger <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #9254|0                           |1
        is obsolete|                            |

--- Comment #4 from Van de Bugger <[email protected]> 2011-10-21 19:23:32 
UTC ---
Created attachment 9265
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=9265
Version 2, not yet production.

Ok, this is the attempt № 2.

1. Function `#subpagecount' is implemented.

2. Common code of `#subpages' and `#subpagecount' are moved to class
`SubPageBase'. (BTW, probably we have to use a prefix for class names, like
'splSubPageList', `splSubPageCount', `splSubPageBase'.)

3. Implemented correct handling of namespaces where subpages are not enabled.

4. There is a problem: My original though was that $dbr->estimateRowCount is
the right way to go. However, in my local MediaWiki server it produces strange
results. It returns bigger count than I expect. Looks like it always returns
number of subpages, direct and indirect, regardless of parameter `kidsonly'.
However, code borrowed from `Database.php', works well, while code borrowed
from `DatabaseNysql.php', returns that wrong result. (My server runs MySQL, so
I think `wfGetDB' returns an instance of class `DatabaseMysql'.) Please look.
Implementation of the query may be selected by parameter `method':

{{ #subpagecount: page | method=mysql }}

-- 
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