$pageCounts = $this->pageCounts( $this->page );
- // Get page properties
- $dbr = wfGetDB( DB_SLAVE );
- $result = $dbr->select(
- 'page_props',
- array( 'pp_propname', 'pp_value' ),
- array( 'pp_page' => $id ),
- __METHOD__
- );
-
$pageProperties = array();
- foreach ( $result as $row ) {
- $pageProperties[$row->pp_propname] = $row->pp_value;
+ $props = PageProps::getInstance()->getProperties( $title );
+ if ( isset( $props[$id] ) ) {
+ $pageProperties = $props[$id];
}
// Basic information
// Is this page affected by the cascading protection of something which includes it?
if ( $title->isCascadeProtected() ) {
$cascadingFrom = '';
- $sources = $title->getCascadeProtectionSources(); // Array deferencing is in PHP 5.4 :(
+ $sources = $title->getCascadeProtectionSources()[0];
- foreach ( $sources[0] as $sourceTitle ) {
+ foreach ( $sources as $sourceTitle ) {
$cascadingFrom .= Html::rawElement(
'li', array(), Linker::linkKnown( $sourceTitle ) );
}