Page MenuHomePhabricator

API for Special:Unwatchedpages
Closed, ResolvedPublic

Description

The API should be able to list unwatched pages. The best way is probably to implement this as a parameter of list=allpages (apfilterwatched). In SQL, this should probably be done as a LEFT JOIN against the watchlist table, then looking for wl_title IS (NOT) NULL. We also might wanna add an option to disable this for large wikis (Special:Unwatchedpages is cached at enwiki), after discussing with people who know why it's cached.


Version: 1.13.x
Severity: enhancement

Details

Reference
bz14020

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:09 PM
bzimport set Reference to bz14020.

Created attachment 5075
Starting point for implementation

Doesn't quite work yet, but I'm unfamiliar with the API's code. Copied the filter-by-langlinks bit as a base for implementation.

Attached:

Committed a modified version of that patch in r37748. In case you're interested, I changed the following things:

  • The USE INDEX had to be adjusted to avoid SQL errors
  • Removed the page_is_redirect=0 and page_namespace <> NS_MEDIAWIKI conditions, as it's up to the client whether they even *want* all that (the apfilterredir and apnamespace parameters)
  • Moved the addTables() and addJoinConds() calls to a more generic place so they aren't duplicated
  • Used arrays instead of WHERE clauses with AND in them
  • Set a warning if $wgMiserMode is true or if the user doesn't have the 'unwatchedpages' right
  • Moved the global $wgUser, $wgMiserMode; statement down to where it's actually used

This'll be automatically fixed once someone fixes bug 14869.

Closing as "resolved/later"

Will be fixed by bug 14869, and makes the API bug list a bit clearer (as these are essentially duplicates)

(In reply to comment #5)

Closing as "resolved/later"

Will be fixed by bug 14869, and makes the API bug list a bit clearer (as these
are essentially duplicates)

Done now (branch merged in r78786).