*/
public static function invalidateCache( Title $title ) {
global $wgMemc;
- // Clear page info.
- $revision = WikiPage::factory( $title )->getRevision();
+
+ $revision = Revision::newFromTitle( $title, 0, Revision::READ_LATEST );
if ( $revision !== null ) {
$key = wfMemcKey( 'infoaction', sha1( $title->getPrefixedText() ), $revision->getId() );
$wgMemc->delete( $key );
$pageInfo['header-basic'][] = array(
$this->msg( 'pageinfo-redirectsto' ),
Linker::link( $this->page->getRedirectTarget() ) .
- $this->msg( 'word-separator' )->text() .
- $this->msg( 'parentheses', Linker::link(
+ $this->msg( 'word-separator' )->escaped() .
+ $this->msg( 'parentheses' )->rawParams( Linker::link(
$this->page->getRedirectTarget(),
$this->msg( 'pageinfo-redirectsto-info' )->escaped(),
array(),
array( 'action' => 'info' )
- ) )->text()
+ ) )->escaped()
);
}
if ( $title->inNamespace( NS_CATEGORY ) ) {
$category = Category::newFromTitle( $title );
+
+ // $allCount is the total number of cat members,
+ // not the count of how many members are normal pages.
+ $allCount = (int)$category->getPageCount();
+ $subcatCount = (int)$category->getSubcatCount();
+ $fileCount = (int)$category->getFileCount();
+ $pagesCount = $allCount - $subcatCount - $fileCount;
+
$pageInfo['category-info'] = array(
+ array(
+ $this->msg( 'pageinfo-category-total' ),
+ $lang->formatNum( $allCount )
+ ),
array(
$this->msg( 'pageinfo-category-pages' ),
- $lang->formatNum( $category->getPageCount() )
+ $lang->formatNum( $pagesCount )
),
array(
$this->msg( 'pageinfo-category-subcats' ),
- $lang->formatNum( $category->getSubcatCount() )
+ $lang->formatNum( $subcatCount )
),
array(
$this->msg( 'pageinfo-category-files' ),
- $lang->formatNum( $category->getFileCount() )
+ $lang->formatNum( $fileCount )
)
);
}
$message = $message->escaped();
}
}
+ $expiry = $title->getRestrictionExpiry( $restrictionType );
+ $formattedexpiry = $this->msg( 'parentheses', $this->getLanguage()->formatExpiry( $expiry ) )->escaped();
+ $message .= $this->msg( 'word-separator' )->escaped() . $formattedexpiry;
// Messages: restriction-edit, restriction-move, restriction-create,
// restriction-upload