Index: branches/REL1_17/phase3/includes/installer/Installer.php |
— | — | @@ -1441,10 +1441,14 @@ |
1442 | 1442 | $params['language'] = $myLang; |
1443 | 1443 | } |
1444 | 1444 | |
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' ); |
1449 | 1453 | } |
1450 | 1454 | } |
1451 | 1455 | |
Property changes on: branches/REL1_17/phase3/includes/installer/Installer.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1452 | 1456 | Merged /trunk/phase3/includes/installer/Installer.php:r92481 |
Index: branches/REL1_17/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -503,6 +503,7 @@ |
504 | 504 | '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.", |
505 | 505 | 'config-install-sysop' => 'Creating administrator user account', |
506 | 506 | '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.', |
507 | 508 | 'config-install-mainpage' => 'Creating main page with default content', |
508 | 509 | 'config-install-extension-tables' => 'Creating tables for enabled extensions', |
509 | 510 | '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 |
510 | 511 | Merged /trunk/phase3/includes/installer/Installer.i18n.php:r92481 |
Index: branches/REL1_17/phase3/includes/HttpFunctions.php |
— | — | @@ -200,6 +200,15 @@ |
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
| 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 | + /** |
204 | 213 | * Generate a new request object |
205 | 214 | * @see MWHttpRequest::__construct |
206 | 215 | */ |
Property changes on: branches/REL1_17/phase3/includes/HttpFunctions.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
207 | 216 | Merged /trunk/phase3/includes/HttpFunctions.php:r92481 |
Index: branches/REL1_17/phase3/RELEASE-NOTES |
— | — | @@ -51,7 +51,9 @@ |
52 | 52 | * (bug 19514) Unordered list list-style-image should be IE6-compatible (8-bit). |
53 | 53 | * Installer checked for magic_quotes_runtime instead of register_globals. |
54 | 54 | * $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. |
56 | 58 | |
57 | 59 | === Changes since 1.17.0rc1 === |
58 | 60 | |
Property changes on: branches/REL1_17/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
59 | 61 | Merged /trunk/phase3:r92481 |