X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FInfoAction.php;h=49a6bb5a5f6f6da1e7c0e7c8f30f2f7eee394ee8;hb=6228415557b1206dce035c9a2751378d120e34e7;hp=1cc4288cd57ee2c4ae8337741ecf1837aa947f33;hpb=4ad455a73c0625288d62a67bb1e317d2921b8a57;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 1cc4288cd5..49a6bb5a5f 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -174,7 +174,7 @@ class InfoAction extends FormlessAction { * @param string $table The table that will be added to the content * @param string $name The name of the row * @param string $value The value of the row - * @param string $id The ID to use for the 'tr' element + * @param string|null $id The ID to use for the 'tr' element * @return string The table with the row added */ protected function addRow( $table, $name, $value, $id ) { @@ -264,6 +264,12 @@ class InfoAction extends FormlessAction { $this->msg( 'pageinfo-length' ), $lang->formatNum( $title->getLength() ) ]; + // Page namespace + $pageNamespace = $title->getNsText(); + if ( $pageNamespace ) { + $pageInfo['header-basic'][] = [ $this->msg( 'pageinfo-namespace' ), $pageNamespace ]; + } + // Page ID (number not localised, as it's a database ID) $pageInfo['header-basic'][] = [ $this->msg( 'pageinfo-article-id' ), $id ]; @@ -739,27 +745,18 @@ class InfoAction extends FormlessAction { $dbrWatchlist = wfGetDB( DB_REPLICA, 'watchlist' ); $setOpts += Database::getCacheSetOptions( $dbr, $dbrWatchlist ); - if ( $wgActorTableSchemaMigrationStage === MIGRATION_NEW ) { + if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) { $tables = [ 'revision_actor_temp' ]; $field = 'revactor_actor'; $pageField = 'revactor_page'; $tsField = 'revactor_timestamp'; $joins = []; - } elseif ( $wgActorTableSchemaMigrationStage === MIGRATION_OLD ) { + } else { $tables = [ 'revision' ]; $field = 'rev_user_text'; $pageField = 'rev_page'; $tsField = 'rev_timestamp'; $joins = []; - } else { - $tables = [ 'revision', 'revision_actor_temp', 'actor' ]; - $field = 'COALESCE( actor_name, rev_user_text)'; - $pageField = 'rev_page'; - $tsField = 'rev_timestamp'; - $joins = [ - 'revision_actor_temp' => [ 'LEFT JOIN', 'revactor_rev = rev_id' ], - 'actor' => [ 'LEFT JOIN', 'revactor_actor = actor_id' ], - ]; } $watchedItemStore = MediaWikiServices::getInstance()->getWatchedItemStore();