From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- includes/TitleArray.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'includes/TitleArray.php') diff --git a/includes/TitleArray.php b/includes/TitleArray.php index f7a9e1dc..96960089 100644 --- a/includes/TitleArray.php +++ b/includes/TitleArray.php @@ -11,10 +11,10 @@ */ abstract class TitleArray implements Iterator { /** - * @param $res result A MySQL result including at least page_namespace and + * @param $res ResultWrapper A SQL result including at least page_namespace and * page_title -- also can have page_id, page_len, page_is_redirect, * page_latest (if those will be used). See Title::newFromRow. - * @return TitleArray + * @return TitleArrayFromResult */ static function newFromResult( $res ) { $array = null; @@ -27,6 +27,10 @@ abstract class TitleArray implements Iterator { return $array; } + /** + * @param $res ResultWrapper + * @return TitleArrayFromResult + */ protected static function newFromResult_internal( $res ) { $array = new TitleArrayFromResult( $res ); return $array; @@ -34,6 +38,10 @@ abstract class TitleArray implements Iterator { } class TitleArrayFromResult extends TitleArray { + + /** + * @var ResultWrapper + */ var $res; var $key, $current; @@ -43,6 +51,10 @@ class TitleArrayFromResult extends TitleArray { $this->setCurrent( $this->res->current() ); } + /** + * @param $row ResultWrapper + * @return void + */ protected function setCurrent( $row ) { if ( $row === false ) { $this->current = false; @@ -51,6 +63,9 @@ class TitleArrayFromResult extends TitleArray { } } + /** + * @return int + */ public function count() { return $this->res->numRows(); } @@ -75,6 +90,9 @@ class TitleArrayFromResult extends TitleArray { $this->setCurrent( $this->res->current() ); } + /** + * @return bool + */ function valid() { return $this->current !== false; } -- cgit v1.2.2