r94040 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94039‎ | r94040 | r94041 >
Date:08:23, 7 August 2011
Author:maxsem
Status:ok
Tags:
Comment:
MFT r92481 to 1.17: (bug 29959) Installer fatal when cURL and allow_url_fopen is disabled and user tries to subsribe to mediawiki-announce.
Modified paths:
  • /branches/REL1_17/phase3 (modified) (history)
  • /branches/REL1_17/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_17/phase3/includes/HttpFunctions.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/includes/installer/Installer.php
@@ -1441,10 +1441,14 @@
14421442 $params['language'] = $myLang;
14431443 }
14441444
1445 - $res = MWHttpRequest::factory( $this->mediaWikiAnnounceUrl,
1446 - array( 'method' => 'POST', 'postData' => $params ) )->execute();
1447 - if( !$res->isOK() ) {
1448 - $s->warning( 'config-install-subscribe-fail', $res->getMessage() );
 1445+ if( MWHttpRequest::canMakeRequests() ) {
 1446+ $res = MWHttpRequest::factory( $this->mediaWikiAnnounceUrl,
 1447+ array( 'method' => 'POST', 'postData' => $params ) )->execute();
 1448+ if( !$res->isOK() ) {
 1449+ $s->warning( 'config-install-subscribe-fail', $res->getMessage() );
 1450+ }
 1451+ } else {
 1452+ $s->warning( 'config-install-subscribe-notpossible' );
14491453 }
14501454 }
14511455
Property changes on: branches/REL1_17/phase3/includes/installer/Installer.php
___________________________________________________________________
Modified: svn:mergeinfo
14521456 Merged /trunk/phase3/includes/installer/Installer.php:r92481
Index: branches/REL1_17/phase3/includes/installer/Installer.i18n.php
@@ -503,6 +503,7 @@
504504 'config-insecure-keys' => "'''Warning:''' {{PLURAL:$2|A secure key|Secure keys}} ($1) generated during installation {{PLURAL:$2|is|are}} not completely safe. Consider changing {{PLURAL:$2|it|them}} manually.",
505505 'config-install-sysop' => 'Creating administrator user account',
506506 'config-install-subscribe-fail' => 'Unable to subscribe to mediawiki-announce: $1',
 507+ 'config-install-subscribe-notpossible' => 'cURL is not installed and allow_url_fopen is not available.',
507508 'config-install-mainpage' => 'Creating main page with default content',
508509 'config-install-extension-tables' => 'Creating tables for enabled extensions',
509510 'config-install-mainpage-failed' => 'Could not insert main page: $1',
Property changes on: branches/REL1_17/phase3/includes/installer/Installer.i18n.php
___________________________________________________________________
Modified: svn:mergeinfo
510511 Merged /trunk/phase3/includes/installer/Installer.i18n.php:r92481
Index: branches/REL1_17/phase3/includes/HttpFunctions.php
@@ -200,6 +200,15 @@
201201 }
202202
203203 /**
 204+ * Simple function to test if we can make any sort of requests at all, using
 205+ * cURL or fopen()
 206+ * @return bool
 207+ */
 208+ public static function canMakeRequests() {
 209+ return function_exists( 'curl_init' ) || wfIniGetBool( 'allow_url_fopen' );
 210+ }
 211+
 212+ /**
204213 * Generate a new request object
205214 * @see MWHttpRequest::__construct
206215 */
Property changes on: branches/REL1_17/phase3/includes/HttpFunctions.php
___________________________________________________________________
Modified: svn:mergeinfo
207216 Merged /trunk/phase3/includes/HttpFunctions.php:r92481
Index: branches/REL1_17/phase3/RELEASE-NOTES
@@ -51,7 +51,9 @@
5252 * (bug 19514) Unordered list list-style-image should be IE6-compatible (8-bit).
5353 * Installer checked for magic_quotes_runtime instead of register_globals.
5454 * $wgSVGMaxSize is now applied to the smaller of width or height, making very
55 - wide pano/timeline/diagram SVGs renderable at saner sizes
 55+ wide pano/timeline/diagram SVGs renderable at saner sizes.
 56+* (bug 29959) Installer fatal when cURL and allow_url_fopen is disabled and user
 57+ tries to subsribe to mediawiki-announce.
5658
5759 === Changes since 1.17.0rc1 ===
5860
Property changes on: branches/REL1_17/phase3
___________________________________________________________________
Modified: svn:mergeinfo
5961 Merged /trunk/phase3:r92481

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92481(bug 29959) Installer fatal when cURL and allow_url_fopen is disabled and use...demon21:56, 18 July 2011

Status & tagging log