? cvs14update.log
? mw141_against_mw141enea.diff
? maintenance/archives/patch-email-authentication-changetype.sql
? maintenance/archives/patch-email-authentication.sql
? maintenance/archives/patch-email-notification-changetype.sql
? maintenance/archives/patch-email-notification-fornewpages.sql
? maintenance/archives/patch-email-notification.sql
? maintenance/archives/patch-last-visited-revision.sql
Index: RELEASE-NOTES
===================================================================
RCS file: /cvsroot/wikipedia/phase3/RELEASE-NOTES,v
retrieving revision 1.40.2.227
diff -u -b -r1.40.2.227 RELEASE-NOTES
--- RELEASE-NOTES 18 Apr 2005 23:09:55 -0000 1.40.2.227
+++ RELEASE-NOTES 19 Apr 2005 06:07:57 -0000
@@ -3,6 +3,201 @@
Security reminder: MediaWiki does not require PHP's register_globals
setting since version 1.2.0. If you have it on, turn it *off* if you can.
+****** THIS IS ENOTIF/EAUTHENT *******
+
+ENotif (EN) + EAuthent (EA) V 3.09 for REL1_4 (1.4.2)
+(C) T. Gries 19.04.2005
+
+Executive summary for the impatient reader:
+
+* Enotif adds e-mail notification to MediaWiki and
+ sends e-mails to watching users when a
+
+ - watch-listed page or
+ - user_talk page is changed or
+ - a new page is created
+
+ http://bugzilla.wikipedia.org/show_bug.cgi?id=454
+ Visit the complete documentation on http://meta.wikipedia.org/Enotif
+
+* Eauthent is a mechanism to use a temporary one-time password cycle
+ to check whether the email address a user has entered is a valid one.
+
+ http://bugzilla.wikipedia.org/show_bug.cgi?id=866
+ Visit the complete documentation on http://meta.wikipedia.org/Eauthent
+
+ It has many other enhancement bugzillas implemented;
+
+ < TO DO: ADD LIST OF THEM >
+ < non-comprehensive list: 1572, 1876, 1370, 536 >
+
+v3.09
+* bug fix: in SpecialPreferences, check settings before storing in db
+ (preventing form tampering)
+
+v3.08
+* new feature: e-mail notifications are sent when a new page is created.
+ user option; a switch in DefaultSettings determines, whether the option
+ is enabled for all or only enabled for Bureaucrats, Developers, Sysops.
+ A database schema change is required:
+ new field user_emailnotificationfornewpages is added to table user
+ run yourwiki/maintenance/> php update.php
+
+v3.07
+* When moving a page (which is watched), the existing watch properties
+ are taken into consideration for determining the watch properties
+ of the target page:
+ the subject and/or talk target pages are watched depending
+ on the old watchlist entries regardless of the check box status
+ "move talk page as well" !
+
+v3.06
+* Labels "(last)" changed to "(prev)"
+* New meaning of "(last)" is "difference between this an last seen
+ revision of this page"
+
+v3.05 for REL1_4
+* optimised program design
+ all ENotif calls are moved to module RecentChange.php
+ no tricks -- straightforward
+* Writing to an user_talk OR USER page both triggers the
+ "You have new messages" marker and - if enabled - sending an ENotif.
+ This feature can be disabled globally.
+* Both pages are automatically added to the watchlist of the user,
+ if someone leaves a message on one
+* When adding a watch to a page, the talk_page is also watched and
+ vice versa (standard behaviour of mediawiki is unchanged), but
+ new watchlist management in Special:Watchlist allows to remove
+ watched pages and their talk pages independently.
+ This feature can be disabled globally (compatibility)
+* The "You have new messages" marker has got direct links to the
+ _difference_ view between current and last seen revision
+* database schema has changed;
+ run php update.php or make a fresh installation
+ The datatype for EN and EA timestamps has been changed from
+ varchar(14) to datetime
+* removed EA minor bug in SpecialPreferences:
+ EA timestamp are now invalidated when user clears her password
+* email addresses of sysops, bureaucrats and developers are
+ automatically authenticated as they are entered in user preferences
+ (can be disabled, so that every address must be authenticated)
+
+Other features:
+* added (lvrd) links:
+ link for difference between current and last-visited revision
+ in recent-changes view
+* introducing tooltip texts for (cur), (last), (hist), (diff), (lvrd).
+ All texts can be disabled by clearing the strings cur_tooltiptext etc.
+ in LanguageXX.php
+* User option to suppress the listing of older revisions of pages in
+ recent changes view: show only the current revisions of pages
+
+== Version Enotif+Eauthent EN+EA v2.00/CVS, 14.12.2004 ==
+written by Thomas Gries, Berlin and Markus Arndt, Munich
+
+Executive summary for the impatient reader:
+
+Enotif adds e-mail notification to MediaWiki and sends e-mails
+to watching users when a watch-listed pageor user_talk page is changed
+http://bugzilla.wikipedia.org/show_bug.cgi?id=454
+Visit the complete documentation on http://meta.wikipedia.org/Enotif
+
+Eauthent is a mechanism to use a temporary one-time password cycle
+to check whether the email address a user has entered is a valid one.
+http://bugzilla.wikipedia.org/show_bug.cgi?id=866
+Visit the complete documentation on http://meta.wikipedia.org/Eauthent
+
+The current patch has only been checked for (see DefaultSettings.php):
+
+- php mail()
+ ( = not using PEAR:Mail() module --- I do not know anyone who uses that)
+ $wgSMTP = false;
+- MySQL database
+ ( = not using PostgreSQL --- I do not know anyone who uses that)
+ $wgDBtype = "mysql";
+ $wgSearchType = "MyISAM";
+
+- STILL TODO:
+ NEW (newpageletter) and CORR (minoreditletter) markers needs
+ corresponding "spacers"
+
+- table user_newtalk dropped; changes on usertalk pages and their
+ notifications are now fully handled via existing table watchlist
+ The user interface and behavious is unchanged to previous version.
+- updaters.inc for compatibility with older mediawiki tables:
+ the conversion script converts existing user_newtalk entries
+ watchlist table entries
+ (user_newtalk) id ==> (watchlist) NS_USER_TALK:namefromId(id) timestamp=1
+- minor bug fixes:
+ updated marker now correctly shown on watchlist page
+ watching users number display with enhanced RC view + RCUseModStyle
+- wfUrlencode() instead of rawurlencode() in enotif mails
+- duplicate enotif code moved from UserTalkUpdate.php and
+ merged into UserMailer.php and using usermailer() solely
+- fixed an enotif mail text error for user names with spaces
+- fixed missing part for suppressing watching user number
+
+v1.36:
+magic watchlist shows and counts now only the content page, notwithstanding
+the content and talk page are stored separately in watchlist.
+* bug fixed: rawurlencode for pagetitles in enotif mails
+* bug fixed: link to userpages of anonymous user are correct now
+
+* Enotif v1.34
+ bugs fixed regarding missing $oldid parameter
+
+* v1.33
+* Details:
+ Implements almost all enotif options as user preferences.
+ These are only shown on the user preference page, if they are globally
+ enabled by the corresponding admin option in DefaultSettings.php.
+ Added admin feature to let enotifs appear to come from the page editor.
+ This facilitates automatic mail sorting and anti-spam filtering; feature was
+ originally proposed by Nick Triantos, thank you !
+ Page editor's email address is however only shown, if this user enabled
+ the option "reveal my email address" in user preferences. Otherwise,
+ the enotifs appear to come from WikiAdmin as usual (tricky to program,
+ but simply trust the algorithm. or look into UserMailer.php and
+ UserTalkPage.php).
+
+* Changes from previous enotif versions
+* v1.31 is an improved version with many security and also cosmetic changes
+ applied after two first reviews by Brion Vibber. v1.31 is basically the same as
+ the older Enotif v1.30 and v1.22 versions.
+
+ Added UseMod style for recent changes view so that only the most recent
+ change of any page is listed. The (diff) and (hist) still allow to retrieve the
+ older versions at users' discretion, but the RC view is much cleaner for
+ trusted environments such as medium-size companies or family wikis.
+
+* Enotif v1.30 redesign after review by Brion Vibber 25.10.2003
+
+* v1.22 "updated (since my last visit)" also shown for users without stored
+ email address in preferences, so that they can see, what watched pages
+ have changed.
+* show "updated (since my last visit)" markers in RC, history and watchlist
+* Systemvariables to suppress updated marker in all views
+* show number of watching users in RC and on bottom of articles in
+ classic skin and in monobook skin
+* Systemvariables in DefaultSettings.php to enable or disable features
+* v1.21 now suppresses displaying the marker "updated (since my last visit)"
+ in recent changes view for the older (already visited) versions of watched
+ pages - i.e. page versions before the enotif was sent do not bear that
+ marker any longer.
+* enotif mails come with a link to the diff view between current and last
+ visited version of the watching user.
+*database structure is changed automatically when installing via the
+ recommended way (starting index.php and re-using the old database name).
+ run php /maintenance/update.php
+ OR see /maintenance/archives/patch-email-notification.sql and apply the
+ command
+ ALTER TABLE watchlist
+ ADD (wl_notificationtimestamp varchar(14) binary NOT NULL default '0');
+ manually to your database, which does not harm the non notification versions
+
+*adding a page x to the watchlist does automatically add a watch
+ for the accompanying talk_page talk:x and vice versa;
+
== MediaWiki 1.4.1 ==
Index: config/index.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/config/index.php,v
retrieving revision 1.85.2.8
diff -u -b -r1.85.2.8 index.php
--- config/index.php 17 Apr 2005 23:24:27 -0000 1.85.2.8
+++ config/index.php 19 Apr 2005 06:07:58 -0000
@@ -80,7 +80,7 @@
MediaWiki is
Copyright (C) 2001-2004 by Magnus Manske, Brion Vibber, Lee Daniel Crocker,
- Tim Starling, Erik Möller, Gabriel Wicke and others.
+ Tim Starling, Erik Möller, Gabriel Wicke, Thomas Gries and others.
@@ -418,6 +418,12 @@
$errs["MCServers"] = "Please specify at least one server if you wish to use memcached";
}
+/* default values for installation */
+$conf->Email =importRequest("Email", "email_enabled");
+$conf->Emailuser=importRequest("Emailuser", "emailuser_enabled");
+$conf->Enotif =importRequest("Enotif", "enotif_allpages");
+$conf->Eauthent =importRequest("Eauthent", "eauthent_enabled");
+
if( $conf->posted && ( 0 == count( $errs ) ) ) {
do { /* So we can 'continue' to end prematurely */
$conf->Root = ($conf->RootPW != "");
@@ -666,7 +672,8 @@
This will be used as the return address for password reminders and
may be displayed in some error conditions so visitors can get in
- touch with you.
+ touch with you. It is also be used as the default sender address of e-mail
+ notifications (enotifs).
@@ -763,6 +770,87 @@
use Turck shared memory if the wiki will be running on a single Apache server.
+
E-mail, e-mail notification and authentification setup
+
+
+
+
+
Select one:
+
+
+
+
+
+
+
+ Use this to disable all e-mail functions (send a password reminder, user-to-user e-mail and e-mail notification),
+ if sending e-mails on your server doesn't work.
+
+
+
+
Select one:
+
+
+
+
+
+
+
+ Use this to disable only the user-to-user e-mail function (EmailUser).
+
+
+
+
Select one:
+
+
+
+
+
+
+
+
+
E-mail notification";
+ ?>
+ sends a notification e-mail to a user, when the user_talk page is changed
+ and/or when watch-listed pages are changed, depending on the above settings.
+ When testing this feature, be reminded, that obviously an e-mail address must be present in your preferences
+ and that your own changes never trigger notifications to be sent to yourself.
+
+
Users get corresponding options to select or deselect in their users' preferences.
+ The user options are not shown on the preference page, if e-mail notification is disabled.
+
+
There are additional options for fine tuning in /includes/DefaultSettings.php .
+
+
+
+
+
Select one:
+
+
+
+
+
+
+
+
E-mail address authentication";
+ ?>
+ uses a scheme to authenticate e-mail addresses of the users. The user who initially enters or who changes his/her stored e-mail address
+ gets a one-time temporary password mailed to that address. The user can use the original password as long as wanted, however, the stored e-mail address
+ is only authenticated at the moment when the user logs in with the one-time temporary password.
+
+
The e-mail address stays authenticated as long as the user does not change it; the time of authentication is indicated
+ on the user preference page.
+
+
If the option is enabled, only authenticated e-mail addresses can receive EmailUser mails and/or
+ e-mail notification mails.
+
+
+
+
Database config
@@ -883,6 +971,30 @@
$turck = '#';
}
+ if ( $conf->Email == 'email_enabled' ) {
+ $enableemail = 'true';
+ $enableuseremail = ( $conf->Emailuser == 'emailuser_enabled' ) ? 'true' : 'false' ;
+ $eauthent = ( $conf->Eauthent == 'eauthent_enabled' ) ? 'true' : 'false' ;
+ switch ( $conf->Enotif ) {
+ case 'enotif_usertalk':
+ $enotifusertalk = 'true';
+ $enotifwatchlist = 'false';
+ break;
+ case 'enotif_allpages':
+ $enotifusertalk = 'true';
+ $enotifwatchlist = 'true';
+ break;
+ default:
+ $enotifusertalk = 'false';
+ $enotifwatchlist = 'false';
+ }
+ } else {
+ $enableuseremail = 'false';
+ $enableemail = 'false';
+ $eauthent = 'false';
+ $enotifusertalk = 'false';
+ $enotifwatchlist = 'false';
+ }
$file = @fopen( "/dev/urandom", "r" );
if ( $file ) {
@@ -942,9 +1054,21 @@
\$wgUploadPath = \"\$wgScriptPath/images\";
\$wgUploadDirectory = \"\$IP/images\";
+\$wgEnableEmail = $enableemail;
+\$wgEnableUserEmail = $enableuseremail;
+
\$wgEmergencyContact = \"{$slconf['EmergencyContact']}\";
\$wgPasswordSender = \"{$slconf['PasswordSender']}\";
+## For a detailed description of the following switches see
+## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent
+## There are many more options for fine tuning available see
+## /includes/DefaultSettings.php
+## UPO means: this is also a user preference option
+\$wgEmailNotificationForUserTalkPages = $enotifusertalk; # UPO
+\$wgEmailNotificationForWatchlistPages = $enotifwatchlist; # UPO
+\$wgEmailAuthentication = $eauthent;
+
\$wgDBserver = \"{$slconf['DBserver']}\";
\$wgDBname = \"{$slconf['DBname']}\";
\$wgDBuser = \"{$slconf['DBuser']}\";
Index: includes/Article.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Article.php,v
retrieving revision 1.248.2.24
diff -u -b -r1.248.2.24 Article.php
--- includes/Article.php 4 Apr 2005 22:55:17 -0000 1.248.2.24
+++ includes/Article.php 19 Apr 2005 06:07:59 -0000
@@ -875,7 +875,6 @@
$this->mTitle->resetArticleID( $newid );
Article::onArticleCreate( $this->mTitle );
- RecentChange::notifyNew( $now, $this->mTitle, $isminor, $wgUser, $summary );
if ($watchthis) {
if(!$this->mTitle->userIsWatching()) $this->watch();
@@ -893,6 +892,7 @@
# standard deferred updates
$this->editUpdates( $text );
+ RecentChange::notifyNew( $now, $this->mTitle, $isminor, $wgUser, $summary );
$this->showArticle( $text, wfMsg( 'newarticle' ) );
}
@@ -1031,7 +1031,8 @@
$oldtext = $this->getContent( true );
- if ( 0 != strcmp( $text, $oldtext ) ) {
+ if ( 0 != strcmp( $text, $oldtext )) {
+ $empty = false;
$this->mCountAdjustment = $this->isCountable( $text )
- $this->isCountable( $oldtext );
$now = wfTimestampNow();
@@ -1082,13 +1083,10 @@
);
$oldid = $dbw->insertId();
-
$bot = (int)($wgUser->isBot() || $forceBot);
- RecentChange::notifyEdit( $now, $this->mTitle, $me2, $wgUser, $summary,
- $oldid, $this->getTimestamp(), $bot );
Article::onArticleEdit( $this->mTitle );
}
- }
+ } else $empty = true;
if( !$wgDBtransactions ) {
ignore_user_abort( $userAbort );
@@ -1105,6 +1103,10 @@
# standard deferred updates
$this->editUpdates( $text );
+ if ($good && !$empty) {
+ RecentChange::notifyEdit( $now, $this->mTitle, $me2, $wgUser, $summary,
+ $oldid, $this->getTimestamp(), $bot );
+ }
$urls = array();
# Template namespace
@@ -1910,11 +1912,27 @@
}
}
- # Update newtalk status if user is reading their own
+ # Update newtalk status if user is reading her own
# talk page
global $wgUser;
+ global $wgShowNewtalkForUserOrUserTalkPage;
+ if ( $wgShowNewtalkForUserOrUserTalkPage ) {
+ # We need to check both the user_talk and user page for pending updates
+ # If nothing is pending, then we clear the newtalk flag
+
+ if ( $this->mTitle->getText() == $wgUser->getName() ) {
+ if ( ( ($this->mTitle->getNamespace() == NS_USER_TALK) &&
+ (!$wgUser->checkNotificationPendingForArticleOrTalk($this->mTitle, NS_USER, $lvr )) )
+ ||
+ ( ($this->mTitle->getNamespace() == NS_USER) &&
+ (!$wgUser->checkNotificationPendingForArticleOrTalk($this->mTitle, NS_USER_TALK, $lvr)) ) ) {
+ $wgUser->setNewtalk(0);
+ $wgUser->saveNewtalk();
+ }
+ }
+ } else {
if ($this->mTitle->getNamespace() == NS_USER_TALK &&
$this->mTitle->getText() == $wgUser->getName())
{
@@ -1923,6 +1941,9 @@
}
}
+ $wgUser->clearNotification( $this->mTitle );
+ }
+
/**
* Do standard deferred updates after page edit.
* Every 1000th edit, prune the recent changes table.
@@ -1957,16 +1978,21 @@
$u = new SearchUpdate( $id, $title, $text );
array_push( $wgDeferredUpdateList, $u );
- # If this is another user's talk page, save a
- # newtalk notification for them
-
- if ($this->mTitle->getNamespace() == NS_USER_TALK &&
- $shortTitle != $wgUser->getName())
- {
+ # If this is another user's page or talk page,
+ # save a newtalk notification for them and
+ # create a watchlist entry for this page
+
+ global $wgShowNewtalkForUserOrUserTalkPage;
+ if ( ( ($this->mTitle->getNamespace() == NS_USER_TALK) ||
+ ($wgShowNewtalkForUserOrUserTalkPage && ($this->mTitle->getNamespace() == NS_USER) ) ) &&
+ $shortTitle != $wgUser->getName() ) {
$other = User::newFromName($shortTitle);
+ if (!$other->getNewtalk()) {
+ $other->addWatch( $this->mTitle );
$other->setNewtalk(1);
$other->saveNewtalk();
}
+ }
if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
$wgMessageCache->replace( $shortTitle, $text );
Index: includes/ChangesList.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/ChangesList.php,v
retrieving revision 1.2.2.6
diff -u -b -r1.2.2.6 ChangesList.php
--- includes/ChangesList.php 28 Mar 2005 05:25:14 -0000 1.2.2.6
+++ includes/ChangesList.php 19 Apr 2005 06:08:00 -0000
@@ -79,18 +79,31 @@
if ( $rcObj->watched ) $link = ''.$link.'' ;
$r .= $link ;
+ if ($rcObj->notificationtimestamp) {
+ $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'updatedmarker' ),
+ "diff=0&oldid={$rcObj->lastvisitedrevision}", '', '', '', wfMsg( 'updatedmarker_tooltiptext' ) );
+ }
+
# Diff
$r .= ' (' ;
$r .= $rcObj->difflink ;
+ if ($rcObj->lvrlink) {
+ $r .= "; ".$rcObj->lvrlink ;
+ }
+
$r .= '; ' ;
# Hist
- $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), $curIdEq.'&action=history' );
+ $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), $curIdEq.'&action=history', '', '','', wfMsg( 'hist_tooltiptext' ));
# User/talk
$r .= ') . . '.$rcObj->userlink ;
$r .= $rcObj->usertalklink ;
+ if ($rcObj->numberofWatchingusers > 0) {
+ $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rcObj->numberofWatchingusers));
+ }
+
# Comment
if ( $rc_comment != '' && $rc_type != RC_MOVE && $rc_type != RC_MOVE_OVER_REDIRECT ) {
$rc_comment=$this->skin->formatComment($rc_comment, $rcObj->getTitle());
@@ -175,6 +188,11 @@
if ( $block[0]->watched ) $link = ''.$link.'' ;
$r .= $link ;
+ if ($block[0]->notificationtimestamp) {
+ $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'updatedmarker' ),
+ "diff=0&oldid={$rcObj->lastvisitedrevision}", '', '', '', wfMsg( 'updatedmarker_tooltiptext' ) );
+ }
+
$curIdEq = 'curid=' . $block[0]->mAttribs['rc_cur_id'];
if ( $block[0]->mAttribs['rc_type'] != RC_LOG ) {
# Changes
@@ -186,10 +204,16 @@
# History
$r .= $this->skin->makeKnownLinkObj( $block[0]->getTitle(), wfMsg( 'history' ), $curIdEq.'&action=history' );
+ if ($block[0]->lvrlink) {
+ $r .= "; ".$block[0]->lvrlink;
+ }
$r .= ')' ;
}
$r .= $users ;
+ if ($block[0]->numberofWatchingusers > 0) {
+ $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($block[0]->numberofWatchingusers));
+ }
$r .= " \n" ;
# Sub-entries
@@ -292,7 +316,8 @@
static $message;
if( !isset( $message ) ) {
- foreach( explode(' ', 'diff hist minoreditletter newpageletter blocklink undo' ) as $msg ) {
+ foreach( explode(' ', 'diff diff_tooltiptext hist hist_tooltiptext minoreditletter newpageletter blocklink undo '.
+ 'diff-to-lvr lvr diff-to-lvr_tooltiptext lvr_tooltiptext updatedmarker updatedmarker_tooltiptext ' ) as $msg ) {
$message[$msg] = wfMsg( $msg );
}
}
@@ -327,7 +352,7 @@
'&wpNewTitle=' . wfUrlencode( $movedFromTitle->getPrefixedDBkey() ) ) . ') (';
# Hist
- $s .= $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), $message['hist'], 'action=history' ) .
+ $s .= $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), $message['hist'], 'action=history', '', '', '', $message['hist_tooltiptext'] ) .
') . . ';
# "[[x]] moved to [[y]]"
@@ -351,12 +376,24 @@
$rcidparam = "";
$diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['diff'],
"{$curIdEq}&diff={$rc_this_oldid}&oldid={$rc_last_oldid}{$rcidparam}",
- '', '', ' tabindex="'.$rc->counter.'"');
+ '', '', ' tabindex="'.$rc->counter.'"', $message['diff_tooltiptext'] );
}
- $s .= '('.$diffLink.') (';
+
+ if ( $watched && $rc->lastvisitedrevision ) {
+ if ( $rc_this_oldid == $rc->lastvisitedrevision ) {
+ $lvrLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['lvr'],
+ "diff={$rc_this_oldid}&oldid={$rc->lastvisitedrevision}", '','','', $message['lvr_tooltiptext']);
+ } else {
+ $lvrLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['diff-to-lvr'],
+ "diff={$rc_this_oldid}&oldid={$rc->lastvisitedrevision}",'','','', $message['diff-to-lvr_tooltiptext'] );
+ }
+ } else {
+ $lvrLink = $message['diff-to-lvr'];
+ }
+ $s .= '('.$diffLink.') ('.$lvrLink.') (';
# History link
- $s .= $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['hist'], $curIdEq.'&action=history' );
+ $s .= $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['hist'], $curIdEq.'&action=history', '', '', '', $message['hist_tooltiptext'] );
$s .= ') . . ';
# M, N and ! (minor, new and unpatrolled)
@@ -375,6 +412,10 @@
if ( $watched ) {
$articleLink = ''.$articleLink.'';
}
+ if ($rc->notificationtimestamp) {
+ $articleLink .= $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['updatedmarker'],
+ "diff=0&oldid={$rc->lastvisitedrevision}",'','','', $message['updatedmarker_tooltiptext'] );
+ }
$s .= ' '.$articleLink;
wfProfileOut("$fname-page");
}
@@ -422,6 +463,9 @@
$rc_comment = $this->skin->formatComment($rc_comment,$rc->getTitle());
$s .= $wgContLang->emphasize(' (' . $rc_comment . ')');
}
+ if ($rc->numberofWatchingusers > 0) {
+ $s .= ' ' . wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rc->numberofWatchingusers));
+ }
$s .= "\n";
wfProfileOut( "$fname-rest" );
@@ -435,7 +479,8 @@
static $message;
if( !isset( $message ) ) {
- foreach( explode(' ', 'cur diff hist minoreditletter newpageletter last blocklink undo' ) as $msg ) {
+ foreach( explode(' ', 'cur diff hist minoreditletter newpageletter last blocklink undo diff-to-lvr '.
+ 'diff-to-lvr_tooltiptext cur_tooltiptext diff_tooltiptext last_tooltiptext updatedmarker updatedmarker_tooltiptext ' ) as $msg ) {
$message[$msg] = wfMsg( $msg );
}
}
@@ -487,6 +532,9 @@
$rc->watched = $watched ;
$rc->link = $clink ;
$rc->timestamp = $time;
+ $rc->notificationtimestamp = $baseRC->notificationtimestamp;
+ $rc->numberofWatchingusers = $baseRC->numberofWatchingusers;
+ $rc->lastvisitedrevision = $baseRC->lastvisitedrevision;
# Make "cur" and "diff" links
$titleObj = $rc->getTitle();
@@ -509,8 +557,8 @@
} else {
$query = $curIdEq.'&diff=0&oldid='.$rc_this_oldid;
$aprops = ' tabindex="'.$baseRC->counter.'"';
- $curLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['cur'], $query, '' ,'' , $aprops );
- $diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['diff'], $query . $rcIdQuery, '' ,'' , $aprops );
+ $curLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['cur'], $query, '', '', $aprops, $message['cur_tooltiptext'] );
+ $diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['diff'], $query . $rcIdQuery, '', '', $aprops, $message['diff_tooltiptext'] );
}
# Make "last" link
@@ -518,7 +566,7 @@
$lastLink = $message['last'];
} else {
$lastLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['last'],
- $curIdEq.'&diff='.$rc_this_oldid.'&oldid='.$rc_last_oldid . $rcIdQuery );
+ $curIdEq.'&diff='.$rc_this_oldid.'&oldid='.$rc_last_oldid . $rcIdQuery, '', '', '', $message['last_tooltiptext'] );
}
# Make user link (or user contributions for unregistered users)
@@ -530,7 +578,14 @@
$userPage =& Title::makeTitle( NS_USER, $rc_user_text );
$userLink = $this->skin->makeLinkObj( $userPage, $rc_user_text );
}
+ if ( $watched && $baseRC->lastvisitedrevision ) {
+ $lvrLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['diff-to-lvr'],
+ "{$curIdEq}&diff=0&oldid={$baseRC->lastvisitedrevision}" , '', '', '', $message['diff-to-lvr_tooltiptext'] );
+ } else {
+ $lvrLink= '' ;
+ }
+ $rc->lvrlink = $lvrLink;
$rc->userlink = $userLink;
$rc->lastlink = $lastLink;
$rc->curlink = $curLink;
Index: includes/Database.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Database.php,v
retrieving revision 1.71.2.12
diff -u -b -r1.71.2.12 Database.php
--- includes/Database.php 12 Apr 2005 03:13:49 -0000 1.71.2.12
+++ includes/Database.php 19 Apr 2005 06:08:01 -0000
@@ -1366,6 +1366,17 @@
return wfTimestamp(TS_MW,$ts);
}
+ function TimestampNULL() {
+ return NULL;
+ }
+
+ /**
+ * Returns a string to match in a database query for an undefined timestamp value
+ */
+ function wl_notificationtimestampIsNULL() {
+ return 'wl_notificationtimestamp IS NULL';
+ }
+
/**
* @todo document
*/
Index: includes/DefaultSettings.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/DefaultSettings.php,v
retrieving revision 1.215.2.41
diff -u -b -r1.215.2.41 DefaultSettings.php
--- includes/DefaultSettings.php 15 Apr 2005 22:03:50 -0000 1.215.2.41
+++ includes/DefaultSettings.php 19 Apr 2005 06:08:02 -0000
@@ -19,7 +19,7 @@
* MediaWiki version number
* @global string $wgVersion
*/
-$wgVersion = '1.4.1';
+$wgVersion = '1.4.2 + ENotif+EAuthent v3.09';
/**
* Name of the site.
@@ -162,6 +162,13 @@
$wgPasswordSender = 'Wikipedia Mail ';
/**
+ * dummy address which should be accepted during mail send action
+ * It might be necessay to adapt the address or to set it equal
+ * to the $wgEmergencyContact address
+ */
+$wgNoReplyAddress = 'reply@not.possible';
+
+/**
* Set to true to enable the e-mail basic features:
* Password reminders, etc. If sending e-mail on your
* server doesn't work, you might want to disable this.
@@ -174,7 +181,7 @@
* This can potentially be abused, as it's hard to track.
* @global bool $wgEnableUserEmail
*/
-$wgEnableUserEmail = false;
+$wgEnableUserEmail = true;
/**
* SMTP Mode
@@ -493,6 +500,52 @@
# Requires zlib support enabled in PHP.
$wgUseGzip = false;
+/**
+ * Program to run when the email is actually sent out. You might want to make
+ * your server beep for example. Usermailer.php will make a system() call with
+ * exactly that string as parameter.
+ */
+#$wgEmailNotificationSystembeep = '/usr/bin/beep -f 4000 -l 20 &';
+$wgEmailNotificationSystembeep = '';
+
+/** For email notification on page changes */
+$wgPasswordSender = $wgEmergencyContact;
+
+# true: from PageEditor if s/he opted-in
+# false: Enotif mails appear to come from $wgEmergencyContact
+$wgEmailNotificationMailsSentFromPageEditor = true;
+
+// TODO move UPO to preferences probably ?
+# If set to true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
+# If set to false, the corresponding input form on the user preference page is suppressed
+# It call this to be a "user-preferences-option (UPO)"
+$wgEmailAuthentication = true; # UPO (if this is set to false, texts referring to authentication are suppressed)
+$wgEmailAuthenticationRequiredForAll = false; # false means: Sysops, Bureaucrats and Developers don't need to authenticate their email addresses
+$wgEmailNotificationForWatchlistPages = true; # UPO
+$wgEmailNotificationForUserTalkPages = true; # UPO
+$wgEmailNotificationRevealPageEditorAddress = true; # UPO; reply-to address may be filled with page editor's address (if user allowed this in the preferences)
+$wgEmailNotificationForMinorEdits = true; # UPO; false: "minor edits" on pages do not trigger notification mails.
+# # Attention: _every_ change on a user_talk page trigger a notification mail (if the user is not yet notified)
+$wgEmailNotificationForNewPages = true; # show the option
+$wgEmailNotificationForNewPagesAllowedForAll = true; # false means: only Sysops, Bureaucrats and Developers see this option
+
+# Show only the current revision of pages in recent changes
+$wgRCShowCurrentRevisionOnly = true; # UPO
+
+/** Show watching users in recent changes, watchlist and page history views */
+$wgRCShowWatchingUsers = true; # UPO
+/** Show watching users in Page views */
+$wgPageShowWatchingUsers = true;
+/**
+ * Show "Updated (since my last visit)" marker in RC view, watchlist and history
+ * view for watched pages with new changes */
+$wgShowUpdatedMarker = true; # UPO
+
+/* whether on SpecialWatchlist the both pages are deleted together or not */
+$wgRemoveWatchedArticleAndTalkPageTogether = false;
+
+/* show the "You have new messages" for changes on both the user and usertalk page */
+$wgShowNewtalkForUserOrUserTalkPage = true;
$wgCookieExpiration = 2592000;
Index: includes/PageHistory.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/PageHistory.php,v
retrieving revision 1.51
diff -u -b -r1.51 PageHistory.php
--- includes/PageHistory.php 25 Nov 2004 13:41:33 -0000 1.51
+++ includes/PageHistory.php 19 Apr 2005 06:08:02 -0000
@@ -23,6 +23,7 @@
function history() {
global $wgUser, $wgOut, $wgLang;
+ global $wgShowUpdatedMarker;
# If page hasn't changed, client can cache this
@@ -59,8 +60,28 @@
$namespace = $this->mTitle->getNamespace();
$title = $this->mTitle->getText();
+ $uid = $wgUser->getID();
$db =& wfGetDB( DB_SLAVE );
+ if ($uid && $wgShowUpdatedMarker && $wgUser->getOption( 'showupdated' )) {
+ $s = $db->selectRow( 'watchlist',
+ array( 'wl_notificationtimestamp',
+ 'wl_lastvisitedrevision'
+ ),
+ array( 'wl_namespace' => $namespace,
+ 'wl_title' => $this->mTitle->getDBkey(),
+ 'wl_user' => $uid
+ ), $fname );
+ if ( $s === false ) {
+ $notificationtimestamp = false;
+ } else {
+ $notificationtimestamp = $s->wl_notificationtimestamp;
+ $lastvisitedrevision = $s->wl_lastvisitedrevision;
+ }
+ } else {
+ $notificationtimestamp = false;
+ }
+
$use_index = $db->useIndexClause( 'name_title_timestamp' );
$oldtable = $db->tableName( 'old' );
@@ -103,6 +124,8 @@
$this->mArticle->getUserText(), $namespace,
$title, 0, $this->mArticle->getComment(),
( $this->mArticle->getMinorEdit() > 0 ),
+ $notificationtimestamp,
+ $lastvisitedrevision,
$counter++
);
}
@@ -112,6 +135,8 @@
$line->old_user_text, $namespace,
$title, $line->old_id,
$line->old_comment, ( $line->old_minor_edit > 0 ),
+ $notificationtimestamp,
+ $lastvisitedrevision,
$counter++
);
}
@@ -143,19 +168,20 @@
return $s;
}
- function historyLine( $ts, $u, $ut, $ns, $ttl, $oid, $c, $isminor, $counter = '' ) {
+ function historyLine( $ts, $u, $ut, $ns, $ttl, $oid, $c, $isminor, $notificationtimestamp = false, $lastvisitedrevision = false, $counter = '' ) {
global $wgLang, $wgContLang;
static $message;
if( !isset( $message ) ) {
- foreach( explode( ' ', 'cur last selectolderversionfordiff selectnewerversionfordiff minoreditletter' ) as $msg ) {
+ foreach( explode( ' ', 'cur last selectolderversionfordiff selectnewerversionfordiff minoreditletter '.
+ 'updatedmarker updatedmarker_tooltiptext last_tooltiptext cur_tooltiptext ' ) as $msg ) {
$message[$msg] = wfMsg( $msg );
}
}
if ( $oid && $this->lastline ) {
$ret = preg_replace( "/!OLDID!([0-9]+)!/", $this->mSkin->makeKnownLinkObj(
- $this->mTitle, $message['last'], "diff=\\1&oldid={$oid}",'' ,'' ,' tabindex="'.$counter.'"' ), $this->lastline );
+ $this->mTitle, $message['last'], "diff=\\1&oldid={$oid}",'' ,'' ,' tabindex="'.$counter.'"', $message['last_tooltiptext'] ), $this->lastline );
} else {
$ret = '';
}
@@ -180,7 +206,7 @@
$s = '