r88946 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88945‎ | r88946 | r88947 >
Date:23:12, 26 May 2011
Author:mah
Status:resolved (Comments)
Tags:
Comment:
Fix Bug #28829 - “Failure to subscribe to mediawiki-announce is not reported to the user”

Wasn't able to test an actual subscription failure, so I faked it. Error message showed.

Tried double-subscribing an address and only got an emailed “privacy alert” from mailman. Doing a double-subscription manually didn't get any web-based error.
Modified paths:
  • /branches/REL1_17/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/includes/installer/Installer.php
@@ -1426,9 +1426,10 @@
14271427 $params['language'] = $myLang;
14281428 }
14291429
1430 - $res = Http::post( $this->mediaWikiAnnounceUrl, array( 'postData' => $params ) );
1431 - if( !$res ) {
1432 - $s->warning( 'config-install-subscribe-fail' );
 1430+ $res = MWHttpRequest::factory( $this->mediaWikiAnnounceUrl,
 1431+ array( 'method' => 'POST', 'postData' => $params ) )->execute();
 1432+ if( !$res->isOK() ) {
 1433+ $s->warning( 'config-install-subscribe-fail', $res->getMessage() );
14331434 }
14341435 }
14351436

Follow-up revisions

RevisionCommit summaryAuthorDate
r88967MFB r88946reedy11:43, 27 May 2011
r88969MFB r88946reedy12:32, 27 May 2011
r89743followup r88946 to add $1 to messagemah20:31, 8 June 2011

Comments

#Comment by MarkAHershberger (talk | contribs)   23:15, 26 May 2011

This needs to be forward-ported.

#Comment by Tim Starling (talk | contribs)   05:16, 8 June 2011

The message needs to be updated to include $1.

Status & tagging log