r75064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75063‎ | r75064 | r75065 >
Date:02:50, 20 October 2010
Author:mah
Status:ok (Comments)
Tags:
Comment:
follow up r75046 — Add getStatus() method to HttpRequest
Modified paths:
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HttpFunctions.php
@@ -402,7 +402,20 @@
403403 }
404404 }
405405
 406+ /**
 407+ * Get the member variable status for an HTTP Request
 408+ *
 409+ * @return Integer
 410+ */
 411+ public function getStatus() {
 412+ if ( !$this->respHeaders ) {
 413+ $this->parseHeader();
 414+ }
406415
 416+ return (int)$this->respStatus;
 417+ }
 418+
 419+
407420 /**
408421 * Returns true if the last status code was a redirect.
409422 *

Follow-up revisions

RevisionCommit summaryAuthorDate
r75161* Followup r75064 — fix misleading doc comment...mah18:18, 21 October 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75046* Use [[Template:RSSPost]] (and [[Mediawiki:Rss-item]]) (or another...mah21:54, 19 October 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   04:26, 20 October 2010

The doc comment on this function is misleadingly incorrect; the member variable 'status' is a Status object, which is rather different from the HTTP response code being returned.

Status & tagging log