minuteelectron@svn.wikimedia.org wrote:
Revision: 30162 Author: minuteelectron Date: 2008-01-26 00:37:42 +0000 (Sat, 26 Jan 2008)
Log Message:
Fix bug 9246 by watching a page when the upload\reupload "Watch this page" checkbox is checked and unwatching a page when it is not.
A problem with this is that it *un*watches a previously watched image under the following circumstances:
* 'watch pages I edit' is not enabled (eg, default state) * go to Special:Upload and select the file * hit 'upload'
The initial check state is unchecked (since there was no initial destination name set), and this doesn't get updated to reflect the existing watch state of the previous image.
There are a couple possible ways around this. One is to compare the form's actual initial check state with the submitted check state and only apply an unwatch if there was a difference.
Another might be to do a watch state update via AJAX when a new destination filename is set in the form. This would allow the checkmark's default state to be set 'properly' for those with JS enabled in modern browsers.
Perhaps a combination should be used.
For now I'll revert the change, as I think not unwatching things is less destructive than unwatching things unexpectedly.
-- brion vibber (brion @ wikimedia.org)