/** * Returns an array with common header and footer system message * parameters. */ public function getMsgParams( $extended = false, $pout = null ) { global $wgContLang, $wgWikilogEnableTags; $authors = array_keys( $this->mAuthors ); $authorsFmt = WikilogUtils::authorList( $authors ); $commentsFmt = WikilogUtils::getCommentsWikiText( $this ); $categories = array(); $categoriesFmt = ''; $tags = array(); $tagsFmt = ''; if ( $extended ) { if ( $pout !== null ) { $categories = $pout->getCategoryLinks(); if ( count( $categories ) > 0 ) { $categoriesFmt = wfMsgExt( 'wikilog-summary-categories', array( 'content', 'parsemag' ), count( $categories ), WikilogUtils::categoryList( $categories ) ); } else { $categoriesFmt = wfMsgExt( 'wikilog-summary-uncategorized', array( 'content', 'parsemag' ) ); } } if ( $wgWikilogEnableTags ) { $tags = array_keys( $this->mTags ); $tagsFmt = WikilogUtils::tagList( $tags ); } } list( $date, $time, $tz ) = WikilogUtils::getLocalDateTime( $this->mPubDate ); /* * This is probably the largest amount of parameters to a * system message in MediaWiki. This is the price of allowing * the user to customize the presentation of wikilog articles. */ return array( /* $1 */ $this->mParentTitle->getPrefixedURL(), /* $2 */ $this->mParentName, /* $3 */ $this->mTitle->getPrefixedURL(), /* $4 */ $this->mName, /* $5 */ count( $authors ), /* $6 */ ( count( $authors ) > 0 ? $authors[0] : '' ), /* $7 */ $authorsFmt, /* $8 */ $date, /* $9 */ $time, /* $10 */ $commentsFmt, /* $11 */ count( $categories ), /* $12 */ $categoriesFmt, /* $13 */ count( $tags ), /* $14 */ $tagsFmt, /* $15 */ $tz ); }