X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fpage%2FArticle.php;h=e3541bd9a84aac08f1da2cbd44d1300e12e2fc4a;hp=96e315fab232953c72bce7a572e52c2034ef7a4c;hb=f752a7079622ab23bb818d1dd996bb9d25f356e9;hpb=79ea0edce2f5d91207977e2f224d8591e6f447e6
diff --git a/includes/page/Article.php b/includes/page/Article.php
index 96e315fab2..e3541bd9a8 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1003,7 +1003,9 @@ class Article implements Page {
array( 'redirect' => 'no' )
);
- $outputPage->addSubtitle( wfMessage( 'redirectedfrom' )->rawParams( $redir ) );
+ $outputPage->addSubtitle( "" .
+ wfMessage( 'redirectedfrom' )->rawParams( $redir )->parse()
+ . "" );
// Add the script to update the displayed URL and
// set the fragment if one was specified in the redirect
@@ -1025,7 +1027,9 @@ class Article implements Page {
// If it was reported from a trusted site, supply a backlink.
if ( $wgRedirectSources && preg_match( $wgRedirectSources, $rdfrom ) ) {
$redir = Linker::makeExternalLink( $rdfrom, $rdfrom );
- $outputPage->addSubtitle( wfMessage( 'redirectedfrom' )->rawParams( $redir ) );
+ $outputPage->addSubtitle( "" .
+ wfMessage( 'redirectedfrom' )->rawParams( $redir )->parse()
+ . "" );
// Add the script to update the displayed URL
$outputPage->addJsConfigVars( array(
@@ -1218,7 +1222,8 @@ class Article implements Page {
if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist
$outputPage->wrapWikiMsg( "
\n\$1\n
",
array( 'userpage-userdoesnotexist-view', wfEscapeWikiText( $rootPart ) ) );
- } elseif ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) { # Show log extract if the user is currently blocked
+ } elseif ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) {
+ # Show log extract if the user is currently blocked
LogEventsList::showLogExtract(
$outputPage,
'block',
@@ -1247,16 +1252,12 @@ class Article implements Page {
wfRunHooks( 'Article::MissingArticleConditions', array( &$conds, $logTypes ) );
# Show delete and move logs
- $member = $title->getNamespace() . ':' . $title->getDBkey();
- // @todo: move optimization to showLogExtract()?
- if ( BloomCache::get( 'main' )->check( wfWikiId(), 'TitleHasLogs', $member ) ) {
- LogEventsList::showLogExtract( $outputPage, $logTypes, $title, '',
- array( 'lim' => 10,
- 'conds' => $conds,
- 'showIfEmpty' => false,
- 'msgKey' => array( 'moveddeleted-notice' ) )
- );
- }
+ LogEventsList::showLogExtract( $outputPage, $logTypes, $title, '',
+ array( 'lim' => 10,
+ 'conds' => $conds,
+ 'showIfEmpty' => false,
+ 'msgKey' => array( 'moveddeleted-notice' ) )
+ );
if ( !$this->mPage->hasViewableContent() && $wgSend404Code && !$validUserPage ) {
// If there's no backing content, send a 404 Not Found
@@ -1381,9 +1382,14 @@ class Article implements Page {
: 'revision-info';
$outputPage = $this->getContext()->getOutput();
- $outputPage->addSubtitle( "" . wfMessage( $infomsg,
- $td )->rawParams( $userlinks )->params( $revision->getID(), $tddate,
- $tdtime, $revision->getUserText() )->rawParams( Linker::revComment( $revision, true, true ) )->parse() . "
" );
+ $outputPage->addSubtitle( "" .
+ wfMessage( $infomsg, $td )
+ ->rawParams( $userlinks )
+ ->params( $revision->getID(), $tddate, $tdtime, $revision->getUserText() )
+ ->rawParams( Linker::revComment( $revision, true, true ) )
+ ->parse() .
+ "
"
+ );
$lnk = $current
? wfMessage( 'currentrevisionlink' )->escaped()
@@ -1631,10 +1637,11 @@ class Article implements Page {
if ( $hasHistory ) {
$title = $this->getTitle();
- // The following can use the real revision count as this is only being shown for users that can delete
- // this page.
- // This, as a side-effect, also makes sure that the following query isn't being run for pages with a
- // larger history, unless the user has the 'bigdelete' right (and is about to delete this page).
+ // The following can use the real revision count as this is only being shown for users
+ // that can delete this page.
+ // This, as a side-effect, also makes sure that the following query isn't being run for
+ // pages with a larger history, unless the user has the 'bigdelete' right
+ // (and is about to delete this page).
$dbr = wfGetDB( DB_SLAVE );
$revisions = $edits = (int)$dbr->selectField(
'revision',
@@ -1644,7 +1651,8 @@ class Article implements Page {
);
// @todo FIXME: i18n issue/patchwork message
- $this->getContext()->getOutput()->addHTML( '' .
+ $this->getContext()->getOutput()->addHTML(
+ '' .
wfMessage( 'historywarning' )->numParams( $revisions )->parse() .
wfMessage( 'word-separator' )->plain() . Linker::linkKnown( $title,
wfMessage( 'history' )->escaped(),
@@ -1799,6 +1807,9 @@ class Article implements Page {
$loglink = '[[Special:Log/delete|' . wfMessage( 'deletionlog' )->text() . ']]';
$outputPage->addWikiMsg( 'deletedtext', wfEscapeWikiText( $deleted ), $loglink );
+
+ wfRunHooks( 'ArticleDeleteAfterSuccess', array( $this->getTitle(), $outputPage ) );
+
$outputPage->returnToMain( false );
} else {
$outputPage->setPageTitle(