Last modified: 2013-11-26 16:26:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59595, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57595 - Add filter to DynamicPageLists for page_title (prefix)
Add filter to DynamicPageLists for page_title (prefix)
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
DynamicPageList (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-26 15:50 UTC by Aaron Halfaker
Modified: 2013-11-26 16:26 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aaron Halfaker 2013-11-26 15:50:35 UTC
DPL would be substantially more useful for me if I could filter the list with a  title prefix in order to select for "subpages". 

For example, if I'm working on page "Foo" and talking on page "Talk:Foo", it's nice to archive discussions at "Talk:Foo/Archive/<Month, Year>".  I'd like to automatically list these archives on the talk page using a call that looks like:

<DynamicPageList>
  namespace            = Talk
  titleprefix          = Foo/Archive/
  ordermethod          = created 
  count                = 10
  shownamespace        = false
  showprefix           = false
  mode                 = unordered
  suppresserrors       = true
</DynamicPageList>

...which would output something like:

* [[Talk:Foo/Archive/September, 2013|September, 2013]]
* [[Talk:Foo/Archive/October, 2013|October, 2013]]

FWIW, I have several other use-cases in mind, but I thought that the one above was the most universal.

------

The filter I am requesting should be efficient since the underlying query is probably using the "name_title" index on "page" in order to filter by namespace already.  

> EXPLAIN SELECT page_title FROM page WHERE page_namespace=1 AND page_title LIKE "Foo/Archive/%";
+------+-------------+-------+-------+---------------+------------+---------+------+------+--------------------------+
| id   | select_type | table | type  | possible_keys | key        | key_len | ref  | rows | Extra                    |
+------+-------------+-------+-------+---------------+------------+---------+------+------+--------------------------+
|    1 | SIMPLE      | page  | range | name_title    | name_title | 261     | NULL |    1 | Using where; Using index |
+------+-------------+-------+-------+---------------+------------+---------+------+------+--------------------------+
1 row in set (0.05 sec)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links