Removed "show updated marker" user preference option. It's now visually inoffensive...
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 29 May 2005 04:29:29 +0000 (04:29 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 29 May 2005 04:29:29 +0000 (04:29 +0000)
includes/DefaultSettings.php
includes/PageHistory.php
includes/SpecialPreferences.php
includes/SpecialRecentchanges.php
includes/SpecialWatchlist.php
includes/UserMailer.php
languages/Language.php

index d8a6843..4cb9f45 100644 (file)
@@ -774,7 +774,7 @@ $wgPageShowWatchingUsers                    = false;
 /**
  * Show "Updated (since my last visit)" marker in RC view, watchlist and history
  * view for watched pages with new changes */
-$wgShowUpdatedMarker                           = true; # UPO
+$wgShowUpdatedMarker                           = true; 
 
 $wgCookieExpiration = 2592000;
 
index 43db2a9..830d14f 100644 (file)
@@ -62,7 +62,7 @@ class PageHistory {
                $title = $this->mTitle->getText();
                $uid = $wgUser->getID();
                $db =& wfGetDB( DB_SLAVE );
-               if ($uid && $wgShowUpdatedMarker && $wgUser->getOption( 'showupdated' ))
+               if ($uid && $wgShowUpdatedMarker )
                        $notificationtimestamp = $db->selectField( 'watchlist',
                                'wl_notificationtimestamp',
                                array( 'wl_namespace' => $namespace, 'wl_title' => $this->mTitle->getDBkey(), 'wl_user' => $uid ),
index 79ced8e..cdd43ae 100644 (file)
@@ -695,11 +695,7 @@ class PreferencesForm {
                                'hideminor',
                                $wgRCShowWatchingUsers ? 'shownumberswatching' : false,
                                'usenewrc',
-                               'rcusemodstyle',
-                               array(
-                                       'showupdated',
-                                       wfMsg('updatedmarker')
-                               ) )
+                               'rcusemodstyle' )
                        ) . '</fieldset>'
                );
        
index 911bb9f..4024a00 100644 (file)
@@ -208,7 +208,6 @@ function wfSpecialRecentchanges( $par, $specialPage ) {
                                $rc->counter = $counter++;
 
                                if ($wgShowUpdatedMarker
-                                       && $wgUser->getOption( 'showupdated' )
                                        && !empty( $obj->wl_notificationtimestamp )
                                        && ($obj->rc_timestamp >= $obj->wl_notificationtimestamp)) {
                                                $rc->notificationtimestamp = true;
index c849ce1..f6833de 100644 (file)
@@ -14,10 +14,10 @@ require_once( 'WatchedItem.php' );
 /**
  * constructor
  */
-function wfSpecialWatchlist() {
+function wfSpecialWatchlist( $par ) {
        global $wgUser, $wgOut, $wgLang, $wgTitle, $wgMemc, $wgRequest, $wgContLang;;
        global $wgUseWatchlistCache, $wgWLCacheTimeout, $wgDBname;
-       global $wgEnotif, $wgShowUpdatedMarker, $wgRCShowWatchingUsers;
+       global $wgRCShowWatchingUsers, $wgEnotifWatchlist, $wgShowUpdatedMarker;
        $fname = 'wfSpecialWatchlist';
 
        $wgOut->setPagetitle( wfMsg( 'watchlist' ) );
@@ -40,7 +40,7 @@ function wfSpecialWatchlist() {
        $id = $wgRequest->getArray( 'id' );
 
        $uid = $wgUser->getID();
-       if( $wgRequest->getVal( 'reset' ) == 'all' ) {
+       if( $wgRequest->getVal( 'reset' ) && $wgRequest->wasPosted() ) {
                $wgUser->clearAllNotifications( $uid );
        }
 
@@ -118,7 +118,7 @@ function wfSpecialWatchlist() {
 
        }
 
-       if($wgRequest->getBool('edit')) {
+       if($wgRequest->getBool('edit') || $par == 'edit' ) {
                $wgOut->addWikiText( wfMsg( 'watchlistcontains', $wgLang->formatNum( $nitems ) ) .
                        "\n\n" . wfMsg( 'watcheditlist' ) );
 
@@ -179,23 +179,27 @@ function wfSpecialWatchlist() {
        $andHideOwn = $hideOwn ? "AND (rev_user <> $uid)" : '';
 
        # Show watchlist header
-       if( $wgUser->getOption( 'enotifwatchlistpages' ) ) {
-               $wgOut->addHTML( "<div class='enotifinfo'>\n" );
-               
-               $wgOut->addWikiText( wfMsg( 'enotif_infotext' ) );
+       $header = '';
+       if( $wgUser->getOption( 'enotifwatchlistpages' ) && $wgEnotifWatchlist) {
+               $header .= wfMsg( 'wlheader-enotif' ) . "\n";
+       }
+       if ( $wgShowUpdatedMarker ) {
+               $header .= wfMsg( 'wlheader-showupdated' ) . "\n";
+       }
 
+       $header .= wfMsg( 'watchdetails', $wgLang->formatNum( $nitems ), 
+               $wgLang->formatNum( $npages ), $y,
+               $specialTitle->getFullUrl( 'edit=yes' ) );
+       $wgOut->addWikiText( $header );
+       
+       if ( $wgShowUpdatedMarker ) {
                $wgOut->addHTML( '<form action="' .
-                       $specialTitle->escapeLocalUrl( 'action=submit&edit=yes' ) .
+                       $specialTitle->escapeLocalUrl() .
                        '" method="post"><input type="submit" name="dummy" value="' .
                        htmlspecialchars( wfMsg( 'enotif_reset' ) ) .
                        '" /><input type="hidden" name="reset" value="all" /></form>' .
-                       "</div>\n\n" );
+                       "\n\n" );
        }
-       
-       
-       $wgOut->addHTML( '<i>' . wfMsg( 'watchdetails',
-               $wgLang->formatNum( $nitems ), $wgLang->formatNum( $npages ), $y,
-               $specialTitle->escapeLocalUrl( 'edit=yes' ) ) . "</i><br />\n" );
 
        $use_index = $dbr->useIndexClause( $x );
        $sql = "SELECT
@@ -246,10 +250,11 @@ function wfSpecialWatchlist() {
                $rc = RecentChange::newFromCurRow( $obj );
                $rc->counter = $counter++;
 
-               if ($wgShowUpdatedMarker && $wgUser->getOption( 'showupdated' )) {
+               if ( $wgShowUpdatedMarker ) {
                        $updated = $obj->wl_notificationtimestamp;
                } else {
-                       $updated = false;
+                       // Same visual appearance as MW 1.4
+                       $updated = true;
                }
 
                if ($wgRCShowWatchingUsers && $wgUser->getOption( 'shownumberswatching' )) {
index 23a2e0f..7c1225c 100644 (file)
@@ -161,6 +161,7 @@ class EmailNotification {
                global $wgEnotifRevealEditorAddress;
                global $wgEnotifFromEditor;
                global $wgEmailAuthentication;
+               global $wgShowUpdatedMarker;
 
                $fname = 'UserMailer::notifyOnPageChange';
                wfProfileIn( $fname );
@@ -173,6 +174,7 @@ class EmailNotification {
                $enotifusertalkpage = ($isUserTalkPage && $wgEnotifUserTalk);
                $enotifwatchlistpage = (!$isUserTalkPage && $wgEnotifWatchlist);        
 
+
                if ( ($enotifusertalkpage || $enotifwatchlistpage) && (!$minorEdit || $wgEnotifMinorEdits) ) {
                        $dbr =& wfGetDB( DB_MASTER );
                        extract( $dbr->tableNames( 'watchlist' ) );
@@ -212,20 +214,23 @@ class EmailNotification {
 
                                        } # if the watching user has an email address in the preferences
                                }
-                               
-                               # mark the changed watch-listed page with a timestamp, so that the page is 
-                               # listed with an "updated since your last visit" icon in the watch list, ...
-                               $dbw =& wfGetDB( DB_MASTER );
-                               $success = $dbw->update( 'watchlist',
-                                       array( /* SET */
-                                               'wl_notificationtimestamp' => $timestamp
-                                       ), array( /* WHERE */
-                                               'wl_title' => $title->getDBkey(),
-                                               'wl_namespace' => $title->getNamespace(),
-                                       ), 'UserMailer::NotifyOnChange'
-                               );
                        } # if anyone is watching
                } # if $wgEnotifWatchlist = true
+
+               if ( $wgShowUpdatedMarker || $wgEnotifWatchlist ) {
+                       # mark the changed watch-listed page with a timestamp, so that the page is 
+                       # listed with an "updated since your last visit" icon in the watch list, ...
+                       $dbw =& wfGetDB( DB_MASTER );
+                       $success = $dbw->update( 'watchlist',
+                               array( /* SET */
+                                       'wl_notificationtimestamp' => $timestamp
+                               ), array( /* WHERE */
+                                       'wl_title' => $title->getDBkey(),
+                                       'wl_namespace' => $title->getNamespace(),
+                               ), 'UserMailer::NotifyOnChange'
+                       );
+               }
+
        } # function NotifyOnChange
        
        /**
index e79a34b..b4f3f29 100644 (file)
@@ -84,7 +84,6 @@ if(isset($wgExtraNamespaces)) {
        'enotifrevealaddr'      => 0,
        'shownumberswatching'   => 1,
        'rcusemodstyle'         => 1,
-       'showupdated'           => 1,
        'fancysig'              => 0,
        'externaleditor'        => 0,
        'externaldiff'          => 0,
@@ -149,7 +148,6 @@ if(isset($wgExtraNamespaces)) {
        'enotifrevealaddr',
        'shownumberswatching',
        'rcusemodstyle',
-       'showupdated',
        'fancysig',
        'externaleditor',
        'externaldiff',
@@ -296,7 +294,6 @@ Only put [a-z-] in the level one headings since it will be used as an XHMTL id.
 'tog-enotifrevealaddr'                 => 'Reveal my email address in notification mails',
 'tog-shownumberswatching'      => 'Show the number of watching users',
 'tog-rcusemodstyle'            => 'Show recent changes in UseMod style: only the most recent change of any page is listed.',
-'tog-showupdated'              => 'Show update marker ',
 'tog-fancysig' => 'Raw signatures (without automatic link)',
 'tog-externaleditor' => 'Use external editor by default',
 'tog-externaldiff' => 'Use external diff by default',
@@ -1230,10 +1227,12 @@ make it easier to pick out.
 'unwatchthispage'      => 'Stop watching',
 'notanarticle'         => 'Not a content page',
 'watchnochange'        => 'None of your watched items were edited in the time period displayed.',
-'watchdetails'         => "($1 pages watched not counting talk pages;
-$2 total pages edited since cutoff;
-$3...
-<a href='$4'>show and edit complete list</a>.)",
+'watchdetails'         => "* $1 pages watched not counting talk pages, $2 total pages edited in the specified period
+* Query method: $3
+* [[Special:Watchlist/edit|Show and edit complete watchlist]]
+",
+'wlheader-enotif'              => "* Email notification is enabled.",
+'wlheader-showupdated'   => "* Pages which have been changed since you last visited them are shown in '''bold'''",
 'watchmethod-recent'=> 'checking recent edits for watched pages',
 'watchmethod-list'     => 'checking watched pages for recent edits',
 'removechecked'        => 'Remove checked items from watchlist',
@@ -1252,8 +1251,6 @@ at the bottom of the screen (deleting a content page also deletes the accompanyi
 'wlhide'               => 'Hide',
 
 'enotif_mailer'                => '{{SITENAME}} Notification Mailer',
-'enotif_infotext'              => "* Email notification is enabled
-* Pages which have been changed since you last visited them are shown in '''bold'''",
 'enotif_reset'                 => 'Mark all pages visited',
 'enotif_newpagetext'=> 'This is a new page.',
 'changed'                      => 'changed',