MediaWiki r99863 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r99862‎ | r99863 (on ViewVC)‎ | r99864 >
Date:09:32, 15 October 2011
Author:ialex
Status:resolved (Comments)
Tags:
Comment:
* Added Language::userDate(), Language::userTime() and Language::userTimeAndDate() as new versions of respectively Language::date(), Language::time() and Language::timeanddate(), which take a User object in the second parameter to get time correction and format instead of having to do this when calling the methods and not wanting to user $wgUser's parameters.
* Moved Language::userAdjust() near other related function
* Updated ENotif stuff to use that functions so that the date format is not taken from the sending user but the receiver
* Removed $PAGEEDITDATEANDTIME parameter, unsed and not present in impersonal notification
* Also fixed the debug line in UserMailer::send()
Modified paths:

Diff [purge]

Loading diff…

Follow-up revisions

Rev.Commit summaryAuthorDate
r99899Temporarily reverting r99863 to see if I can pin down test failuresdemon19:02, 15 October 2011
r99902Fix E_WARNING from r99863ialex19:22, 15 October 2011
r99951Per Nikerabbit, fix for r99863: removed copy/paste error in method documentationialex13:16, 16 October 2011
r107255@since for r99863robin02:54, 25 December 2011

Comments

#Comment by Reedy (talk | contribs)   16:21, 15 October 2011
-		wfDebug( __METHOD__ . ': sending mail to ' . implode( ',', array( $to->toString() ) ) . "\n" );
+		wfDebug( __METHOD__ . ': sending mail to ' . is_array( $to ) ? implode( ', ', $to ) : $to . "\n" );



Warning: implode(): Invalid arguments passed in /home/reedy/mediawiki/trunk/phase3/includes/UserMailer.php on line 161

Call Stack:
    0.0012     712536   1. {main}() /home/reedy/mediawiki/trunk/extensions/CodeReview/svnImport.php:0
    0.0302    1324040   2. require_once('/home/reedy/mediawiki/trunk/phase3/maintenance/doMaintenance.php') /home/reedy/mediawiki/trunk/extensions/CodeReview/svnImport.php:183
    0.3533   16843688   3. SvnImport->execute() /home/reedy/mediawiki/trunk/phase3/maintenance/doMaintenance.php:105
   91.9781   17274192   4. SvnImport->importRepo() /home/reedy/mediawiki/trunk/extensions/CodeReview/svnImport.php:41
  233.4468   26561288   5. CodeRevision->save() /home/reedy/mediawiki/trunk/extensions/CodeReview/svnImport.php:125
  233.4731   26571992   6. User->sendMail() /home/reedy/mediawiki/trunk/extensions/CodeReview/backend/CodeRevision.php:514
  233.4732   26574120   7. UserMailer::send() /home/reedy/mediawiki/trunk/phase3/includes/User.php:3281
  233.4732   26574632   8. implode() /home/reedy/mediawiki/trunk/phase3/includes/UserMailer.php:161
#Comment by IAlex (talk | contribs)   19:22, 15 October 2011

Fixed in r99902.

#Comment by Nikerabbit (talk | contribs)   10:06, 16 October 2011

Why private? Looks like the docs for new methods are copy-pasted unchanged from the internal method, and refer to $type that doesn't exist.

#Comment by IAlex (talk | contribs)   13:19, 16 October 2011

internalUserTimeAndDate() is private because it's just an helper function for the other three and should not be called diretcly. Documentation fixed in r99951.

Status & tagging log

  • 17:32, 13 January 2012 Siebrand (talk | contribs) changed the tags for r99863 [removed: i18n]
  • 12:32, 24 December 2011 Nikerabbit (talk | contribs) changed the status of r99863 [removed: new added: resolved]
  • 07:21, 23 December 2011 RobLa (talk | contribs) changed the tags for r99863 [added: i18n]
  • 13:19, 16 October 2011 IAlex (talk | contribs) changed the status of r99863 [removed: fixme added: new]
  • 10:06, 16 October 2011 Nikerabbit (talk | contribs) changed the status of r99863 [removed: new added: fixme]
  • 19:22, 15 October 2011 IAlex (talk | contribs) changed the status of r99863 [removed: fixme added: new]
  • 16:21, 15 October 2011 Reedy (talk | contribs) changed the status of r99863 [removed: new added: fixme]