*
* showErrorPage( 'titlemsg', 'pagetextmsg', array( 'param1', 'param2' ) );
* showErrorPage( 'titlemsg', $messageObject );
- *
+ *
* @param $title String: message key for page title
* @param $msg Mixed: message key (string) for page text, or a Message object
* @param $params Array: message parameters; ignored if $msg is a Message object
ResourceLoaderModule::TYPE_STYLES
);
}
-
+
// Add stuff in $otherTags (previewed user CSS if applicable)
$ret .= $otherTags;
return $ret;
*/
const GAID_FOR_UPDATE = 1;
-
/**
* @name Private member variables
* Please use the accessor functions instead.
/**
* Return the prefixed title with spaces _without_ the interwiki prefix
- *
+ *
* @return \type{\string} the title, prefixed by the namespace but not by the interwiki prefix, with spaces
*/
public function getSemiPrefixedText() {
$s = str_replace( '_', ' ', $s );
$this->mSemiPrefixedText = $s;
}
- return $this->mSemiPrefixedText;
+ return $this->mSemiPrefixedText;
}
/**
public function escapeFullURL( $query = '' ) {
return htmlspecialchars( $this->getFullURL( $query ) );
}
-
+
/**
* HTML-escaped version of getCanonicalURL()
*/
* Get the URL form for an internal link.
* - Used in various Squid-related code, in case we have a different
* internal hostname for the server from the exposed one.
- *
+ *
* This uses $wgInternalServer to qualify the path, or $wgServer
* if $wgInternalServer is not set. If the server variable used is
* protocol-relative, the URL will be expanded to http://
* Get the URL for a canonical link, for use in things like IRC and
* e-mail notifications. Uses $wgCanonicalServer and the
* GetCanonicalURL hook.
- *
+ *
* NOTE: Unlike getInternalURL(), the canonical URL includes the fragment
- *
+ *
* @param $query string An optional query string
* @param $variant string Language variant of URL (for sr, zh, ...)
* @return string The URL
array( 'rc_timestamp' => $rcts, 'rc_namespace' => $newns, 'rc_title' => $newdbk, 'rc_new' => 1 ),
__METHOD__
);
-
+
if ( $wgEnableInterwikiTemplatesTracking && $wgGlobalDatabase ) {
$dbw2 = wfGetDB( DB_MASTER, array(), $wgGlobalDatabase );
$dbw2->delete( 'globaltemplatelinks',
return $proto . '://' . IP::combineHostAndPort( $host, $port, $stdPort );
}
+ /**
+ * @return array
+ */
public static function detectProtocolAndStdPort() {
return ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ? array( 'https', 443 ) : array( 'http', 80 );
}
+ /**
+ * @return string
+ */
public static function detectProtocol() {
list( $proto, $stdPort ) = self::detectProtocolAndStdPort();
return $proto;
* Return the request URI with the canonical service and hostname, path,
* and query string. This will be suitable for use as an absolute link
* in HTML or other output.
- *
+ *
* If $wgServer is protocol-relative, this will return a fully
* qualified URL with the protocol that was used for this request.
*
* if there was no dot before the question mark (bug 28235).
*
* @deprecated Use checkUrlExtension().
+ *
+ * @param $extWhitelist array
+ *
+ * @return bool
*/
public function isPathInfoBad( $extWhitelist = array() ) {
global $wgScriptExtension;
throw new MWException( "{$method}() not implemented" );
}
+ /**
+ * @param $name string
+ * @param $default string
+ * @return string
+ */
public function getText( $name, $default = '' ) {
# Override; don't recode since we're using internal data
return (string)$this->getVal( $name, $default );
}
+ /**
+ * @return Array
+ */
public function getValues() {
return $this->data;
}
+ /**
+ * @return array
+ */
public function getQueryValues() {
if ( $this->wasPosted ) {
return array();
}
}
+ /**
+ * @return bool
+ */
public function wasPosted() {
return $this->wasPosted;
}
$this->notImplemented( __METHOD__ );
}
+ /**
+ * @param $name
+ * @return bool|string
+ */
public function getHeader( $name ) {
return isset( $this->headers[$name] ) ? $this->headers[$name] : false;
}
+ /**
+ * @param $name string
+ * @param $val string
+ */
public function setHeader( $name, $val ) {
$this->headers[$name] = $val;
}
return $this->session;
}
+ /**
+ * @param array $extWhitelist
+ * @return bool
+ */
public function isPathInfoBad( $extWhitelist = array() ) {
return false;
}
+ /**
+ * @param array $extWhitelist
+ * @return bool
+ */
public function checkUrlExtension( $extWhitelist = array() ) {
return true;
}
+ /**
+ * @return string
+ */
protected function getRawIP() {
return '127.0.0.1';
}