Last modified: 2011-11-21 23:21:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 2066 - adding e-mail notification for _new_ pages to ENotif patch (this is my patchlet #2)
adding e-mail notification for _new_ pages to ENotif patch (this is my patchl...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.5.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://test.leuksman.com/index.php/Us...
:
Depends on: 454
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-03 22:54 UTC by T. Gries
Modified: 2011-11-21 23:21 UTC (History)
1 user (show)

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


Attachments
patchlet #2: adds e-mail notification to ENotif (cumulative patch; includes patchlet #1 which is bugzilla 2014) (43.15 KB, patch)
2005-05-03 22:55 UTC, T. Gries
Details

Description T. Gries 2005-05-03 22:54:08 UTC
Brion this is the second patchlet. It adds e-mail notification for new pages. 
It includes the first patchlet, bugzilla 2014 and is based on fresh update of today. 
 
* requires database change in table user (field user_emailnotificationfornewpages is added). 
* tables.sql, updaters.inc, patch-....sql included 
* two switches in DefaultSettings determine behaviour and options for users (or only superusers): 
** $wgEmailNotificationForNewPages		= true;   
   # show the option 
** $wgEmailNotificationForNewPagesAllowedForAll	= true;   
   # false means: only Sysops, Bureaucrats and Developers see the option 
* remark: new pages are notified, but not automatically added to watchlists.
Comment 1 T. Gries 2005-05-03 22:55:53 UTC
Created attachment 492 [details]
patchlet #2: adds e-mail notification to ENotif (cumulative patch; includes patchlet #1 which is bugzilla 2014)
Comment 2 T. Gries 2005-05-08 07:43:06 UTC
A bug for new page notifications exists where two mails were sent out in the special cases of 
 
  a) pre-watched pages 
     (not everyone knows, but in all MediaWiki versions  
      you can add pages to your watchlist _before_ they exist) 
 
  b) initial edits of user/user_talk pages. 
 
Fix prevents sending of a second mail in special cases. 
 
In UserMailer.php add the marked lines 
 
		if ( $wgEmailNotificationForNewPages && isset($oldid) && $oldid==0 ) { 
			$dbr =& wfGetDB( DB_MASTER ); 
			$res = $dbr->select( 'user', 
					'user_id', 
					'user_emailnotificationfornewpages=1 AND user_id<>'.$pageeditorUserObj->getID(), 
					$fname ); 
			for ($i = 1; $i <= $dbr->numRows( $res ); $i++) { 
				if (!$initialised) { # initialise if not yet done 
					$article->mTimestamp = $timestamp; 
					$article->mSummary = $currentSummary; 
					$article->mMinorEdit = $currentMinorEdit; 
					$article->mNamespace = $currentNs; 
					$article->mTitle = $currentPage; 
					$article->mOldid = $oldid; 
					$mail = $this->composeCommonMailtext( $pageeditorUserObj, $article ); 
					$watchingUserObj = new User(); 
				} 
 
				$wuser = $dbr->fetchObject( $res ); 
				$watchingUserObj->setID($wuser->user_id); 
 
*				# We must not send new page notification to users, who already received an enotif 
*				# during the first loop when notifs for watched pages were sent 
*				$enotiftimestamp = $dbr->selectField( 'watchlist', 
*						'wl_notificationtimestamp', 
*						array ( 
*							'wl_title' 	=> $currentPage, 
*							'wl_namespace'	=> $currentNs, 
*							'wl_user' 	=> $wuser->user_id 
*						), 
*						$fname ); 
* 
*				# two possibilities exist, where an enotif is sent now 
*				# a) page is not watched (query failed) 
*				# b) page is watched and not yet notified (should not happen here) 
*				if ( !$enotiftimestamp || ( $enotiftimestamp == wfTimestampOrNull() ) ) { 
					$sent = $this->composeAndSendPersonalisedMail( $watchingUserObj, $mail, $article ); 
*				} 
			} 
		} # notifications for a new page 
 
Comment 3 Sumana Harihareswara 2011-11-21 10:40:16 UTC
Comment on attachment 492 [details]
patchlet #2: adds e-mail notification to ENotif (cumulative patch; includes patchlet #1 which is bugzilla 2014)

Patch no longer applies to trunk, so marking obsolete (checked by Rusty per
http://lists.wikimedia.org/pipermail/wikitech-l/2011-November/056340.html ).
Comment 4 Sumana Harihareswara 2011-11-21 10:41:39 UTC
Thomas, I'm sorry, but your patchlet no longer applies to the current MediaWiki codebase.  Is the change still necessary, or has MediaWiki already fixed the problem?  Thanks.
Comment 5 T. Gries 2011-11-21 23:21:24 UTC
Sumana, this is more than six years old. Closing as "WONTFIX".

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


Navigation
Links