r97287 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97286‎ | r97287 | r97288 >
Date:15:12, 16 September 2011
Author:reedy
Status:ok
Tags:
Comment:
1.17wmf1 MFT r96562, r97177
Modified paths:
  • /branches/wmf/1.17wmf1/includes/HttpFunctions.php (modified) (history)
  • /branches/wmf/1.17wmf1/languages/messages/MessagesKk_cyrl.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/languages/messages/MessagesKk_cyrl.php
@@ -33,6 +33,8 @@
3434
3535 $fallback8bitEncoding = 'windows-1251';
3636
 37+$linkTrail = '/^([a-zäçéğıïñöşüýʺʹа-яёәғіқңөұүһٴابپتجحدرزسشعفقكلمنڭەوۇۋۆىيچھ“»]+)(.*)$/sDu';
 38+
3739 $namespaceNames = array(
3840 NS_MEDIA => 'Таспа',
3941 NS_SPECIAL => 'Арнайы',
Index: branches/wmf/1.17wmf1/includes/HttpFunctions.php
@@ -32,7 +32,6 @@
3333 * @return Mixed: (bool)false on failure or a string on success
3434 */
3535 public static function request( $method, $url, $options = array() ) {
36 - $url = wfExpandUrl( $url, PROTO_HTTP );
3736 wfDebug( "HTTP: $method: $url\n" );
3837 $options['method'] = strtoupper( $method );
3938
@@ -165,14 +164,14 @@
166165 public $status;
167166
168167 /**
169 - * @param $url String: url to use
 168+ * @param $url String: url to use. If protocol-relative, will be expanded to an http:// URL
170169 * @param $options Array: (optional) extra params to pass (see Http::request())
171170 */
172171 function __construct( $url, $options = array() ) {
173172 global $wgHTTPTimeout;
174173
175 - $this->url = $url;
176 - $this->parsedUrl = parse_url( $url );
 174+ $this->url = wfExpandUrl( $url, PROTO_HTTP );
 175+ $this->parsedUrl = parse_url( $this->url );
177176
178177 if ( !Http::isValidURI( $this->url ) ) {
179178 $this->status = Status::newFatal( 'http-invalid-url' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96562Move URL expansion from Http::request() (where it was put in r93820) to MWHtt...catrope13:48, 8 September 2011
r97177* (bug 30817) Restored linktrail for kk (Kazakh)nikerabbit16:42, 15 September 2011

Status & tagging log