reliable beyond the hostname where it's used for the spam bulk checker.
* Don't URL-decode in the title attribute for URL links; it can produce false
results that don't code back to their original values.
-
+* (bug 4611) Add user preference (default on) to add new pages to creators's watchlist
=== Caveats ===
// activate checkboxes if user wants them to be always active
if( !$this->preview && !$this->diff ) {
- if( $wgUser->getOption( 'watchdefault' ) ) $this->watchthis = true;
+ # Sort out the "watch" checkbox
+ if( $wgUser->getOption( 'watchdefault' ) ) {
+ # Watch all edits
+ $this->watchthis = true;
+ } elseif( $wgUser->getOption( 'watchcreations' ) && !$this->mTitle->exists() ) {
+ # Watch creations
+ $this->watchthis = true;
+ } elseif( $this->mTitle->userIsWatching() ) {
+ # Already watched
+ $this->watchthis = true;
+ }
+
if( $wgUser->getOption( 'minordefault' ) ) $this->minoredit = true;
-
- // activate checkbox also if user is already watching the page,
- // require wpWatchthis to be unset so that second condition is not
- // checked unnecessarily
- if( !$this->watchthis && $this->mTitle->userIsWatching() ) $this->watchthis = true;
}
$minoredithtml = '';
'tog-showtoc' => 'Show table of contents (for pages with more than 3 headings)',
'tog-rememberpassword' => 'Remember across sessions',
'tog-editwidth' => 'Edit box has full width',
+'tog-watchcreations' => 'Add pages you create to your watchlist',
'tog-watchdefault' => 'Add pages you edit to your watchlist',
'tog-minordefault' => 'Mark all edits minor by default',
'tog-previewontop' => 'Show preview before edit box',