From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- includes/context/ContextSource.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'includes/context/ContextSource.php') diff --git a/includes/context/ContextSource.php b/includes/context/ContextSource.php index 45bd6fff..33f51cb9 100644 --- a/includes/context/ContextSource.php +++ b/includes/context/ContextSource.php @@ -28,7 +28,6 @@ * member variable and provide accessors to it. */ abstract class ContextSource implements IContextSource { - /** * @var IContextSource */ @@ -42,7 +41,7 @@ abstract class ContextSource implements IContextSource { public function getContext() { if ( $this->context === null ) { $class = get_class( $this ); - wfDebug( __METHOD__ . " ($class): called and \$context is null. Using RequestContext::getMain() for sanity\n" ); + wfDebug( __METHOD__ . " ($class): called and \$context is null. Using RequestContext::getMain() for sanity\n" ); $this->context = RequestContext::getMain(); } return $this->context; @@ -52,7 +51,7 @@ abstract class ContextSource implements IContextSource { * Set the IContextSource object * * @since 1.18 - * @param $context IContextSource + * @param IContextSource $context */ public function setContext( IContextSource $context ) { $this->context = $context; @@ -107,7 +106,7 @@ abstract class ContextSource implements IContextSource { * Get the OutputPage object * * @since 1.18 - * @return OutputPage object + * @return OutputPage */ public function getOutput() { return $this->getContext()->getOutput(); @@ -159,12 +158,21 @@ abstract class ContextSource implements IContextSource { * Parameters are the same as wfMessage() * * @since 1.18 - * @return Message object + * @return Message */ public function msg( /* $args */ ) { $args = func_get_args(); return call_user_func_array( array( $this->getContext(), 'msg' ), $args ); } - -} + /** + * Export the resolved user IP, HTTP headers, user ID, and session ID. + * The result will be reasonably sized to allow for serialization. + * + * @return Array + * @since 1.21 + */ + public function exportSession() { + return $this->getContext()->exportSession(); + } +} -- cgit v1.2.2