Last modified: 2009-11-19 17:58:45 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 T21523, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19523 - prop=info&inprop=watched
prop=info&inprop=watched
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.16.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Sam Reed (reedy)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-04 23:55 UTC by Splarka
Modified: 2009-11-19 17:58 UTC (History)
6 users (show)

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


Attachments

Description Splarka 2009-07-04 23:55:09 UTC
There is no way to tell if a title is being watched, via the API. This is ubiquitous in the UI so should have some API vector. If a bit expensive it should probably be a non-default prop=info parameter like &inprop=watched returning watched="".

If not expensive, this could be generated (optionally optionally) for all logged-in queries using &titles= and/or a list module?

Ref:

<Reedy> and we had it setup to work out if the page was currently watched, to set a button to watch/unwatch as appropriate...
<Reedy> So was after a way to move that accross
<Reedy> We pull action=query&prop=info|revisions&intoken=edit&titles=Main%20Page&rvprop=timestamp|user|comment|content currently.. So if it was in there somewhere without pulling more/an extra query, that'd be nice
Comment 1 Sam Reed (reedy) 2009-07-04 23:57:35 UTC
Yup, something like that.

As with everything, if we moved AWB to full Api editing losing functionality, users would complain ;)
Comment 2 Roan Kattouw 2009-07-06 21:18:47 UTC
This sounds feasible, and should be done as an optional inprop=watched. I have no time to do this, but patches are welcome :)
Comment 3 Bryan Tong Minh 2009-07-13 22:04:29 UTC
Could be implemented as a LEFT JOIN against the watchlist table or as a separate query. I would opt for the latter option.
Comment 4 Roan Kattouw 2009-07-14 09:00:45 UTC
(In reply to comment #3)
> Could be implemented as a LEFT JOIN against the watchlist table or as a
> separate query. I would opt for the latter option.
> 

I don't think it makes much of a difference: MySQL optimized LEFT JOINs when it notices you use something like WHERE wl_user IS NULL. Keeping everything in one query is cleaner.
Comment 5 Sam Reed (reedy) 2009-08-07 21:58:18 UTC
I'm having a go at trying to implement this..

Just having to get used to the code and whats going on..

We shall see ;)
Comment 6 Sam Reed (reedy) 2009-11-19 17:58:45 UTC
Fixed in r59258

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


Navigation
Links