r22698 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22697‎ | r22698 | r22699 >
Date:08:39, 4 June 2007
Author:raymond
Status:old
Tags:
Comment:
Adding CSS-IDs to deletion log section
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -604,8 +604,8 @@
605605 $wgOut->addWikiText( wfMsg( 'newarticletext' ) );
606606 else
607607 $wgOut->addWikiText( wfMsg( 'newarticletextanon' ) );
608 - // Show deletion log when editing new article.
609 - $this->mArticle->showLogExtract( $wgOut );
 608+ // Show deletion log when editing new article.
 609+ $this->mArticle->showLogExtract( $wgOut, 'create' );
610610 }
611611 }
612612
Index: trunk/phase3/includes/Article.php
@@ -857,7 +857,7 @@
858858 * This won't appear when editing a new page, but will when viewing a nonexistant one.
859859 */
860860 if ( 0 == $this->getID() ) {
861 - $this->showLogExtract( $wgOut );
 861+ $this->showLogExtract( $wgOut, 'view' );
862862 }
863863
864864 # Trackbacks
@@ -2006,22 +2006,23 @@
20072007
20082008 $wgOut->returnToMain( false );
20092009
2010 - $this->showLogExtract( $wgOut );
 2010+ $this->showLogExtract( $wgOut, 'delete' );
20112011 }
20122012
20132013
20142014 /**
20152015 * Fetch deletion log
20162016 */
2017 - function showLogExtract( &$out ) {
 2017+ function showLogExtract( &$out, $type = '' ) {
20182018 # Show relevant lines from the deletion log:
2019 - $out->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
 2019+ $out->addHTML( "<div id='mw-article-$type-deletionlog'><h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
20202020 $logViewer = new LogViewer(
20212021 new LogReader(
20222022 new FauxRequest(
20232023 array( 'page' => $this->mTitle->getPrefixedText(),
20242024 'type' => 'delete' ) ) ) );
20252025 $logViewer->showList( $out );
 2026+ $out->addHTML( "</div>" );
20262027 }
20272028
20282029

Follow-up revisions

RevisionCommit summaryAuthorDate
r22717Merged revisions 22667-22715 via svnmerge from...david20:00, 4 June 2007

Status & tagging log