r106095 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106094‎ | r106095 | r106096 >
Date:21:17, 13 December 2011
Author:jeroendedauw
Status:reverted (Comments)
Tags:
Comment:
logName -> getName
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/FileDeleteForm.php (modified) (history)
  • /trunk/phase3/includes/LogPage.php (modified) (history)
  • /trunk/phase3/includes/ProtectionForm.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ProtectionForm.php
@@ -609,7 +609,7 @@
610610 */
611611 function showLogExtract( &$out ) {
612612 # Show relevant lines from the protection log:
613 - $out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'protect' ) ) );
 613+ $out->addHTML( Xml::element( 'h2', null, LogPage::getName( 'protect' ) ) );
614614 LogEventsList::showLogExtract( $out, 'protect', $this->mTitle );
615615 # Let extensions add other relevant log extracts
616616 wfRunHooks( 'ProtectionForm::showLogExtract', array($this->mArticle,$out) );
Index: trunk/phase3/includes/Article.php
@@ -1276,7 +1276,7 @@
12771277 $wgOut->wrapWikiMsg( "<div class=\"error mw-error-cannotdelete\">\n$1\n</div>",
12781278 array( 'cannotdelete', wfEscapeWikiText( $title->getPrefixedText() ) )
12791279 );
1280 - $wgOut->addHTML( Xml::element( 'h2', null, LogPage::logName( 'delete' ) ) );
 1280+ $wgOut->addHTML( Xml::element( 'h2', null, LogPage::getName( 'delete' ) ) );
12811281 LogEventsList::showLogExtract(
12821282 $wgOut,
12831283 'delete',
@@ -1456,7 +1456,7 @@
14571457 }
14581458
14591459 $wgOut->addHTML( $form );
1460 - $wgOut->addHTML( Xml::element( 'h2', null, LogPage::logName( 'delete' ) ) );
 1460+ $wgOut->addHTML( Xml::element( 'h2', null, LogPage::getName( 'delete' ) ) );
14611461 LogEventsList::showLogExtract( $wgOut, 'delete',
14621462 $this->getTitle()->getPrefixedText()
14631463 );
@@ -1489,7 +1489,7 @@
14901490 $wgOut->wrapWikiMsg( "<div class=\"error mw-error-cannotdelete\">\n$1\n</div>",
14911491 array( 'cannotdelete', wfEscapeWikiText( $this->getTitle()->getPrefixedText() ) )
14921492 );
1493 - $wgOut->addHTML( Xml::element( 'h2', null, LogPage::logName( 'delete' ) ) );
 1493+ $wgOut->addHTML( Xml::element( 'h2', null, LogPage::getName( 'delete' ) ) );
14941494
14951495 LogEventsList::showLogExtract(
14961496 $wgOut,
Index: trunk/phase3/includes/ChangesList.php
@@ -666,7 +666,7 @@
667667 if( $logType ) {
668668 $logtitle = SpecialPage::getTitleFor( 'Log', $logType );
669669 $clink = '(' . Linker::linkKnown( $logtitle,
670 - LogPage::logName( $logType ) ) . ')';
 670+ LogPage::getName( $logType ) ) . ')';
671671 } else {
672672 $clink = Linker::link( $rc->getTitle() );
673673 }
@@ -676,7 +676,7 @@
677677 list( $specialName, $logtype ) = SpecialPageFactory::resolveAlias( $rc->mAttribs['rc_title'] );
678678 if ( $specialName == 'Log' ) {
679679 # Log updates, etc
680 - $logname = LogPage::logName( $logtype );
 680+ $logname = LogPage::getName( $logtype );
681681 $clink = '(' . Linker::linkKnown( $rc->getTitle(), $logname ) . ')';
682682 } else {
683683 wfDebug( "Unexpected special page in recentchanges\n" );
@@ -1124,7 +1124,7 @@
11251125 # Article or log link
11261126 if( $logType ) {
11271127 $logtitle = SpecialPage::getTitleFor( 'Log', $logType );
1128 - $logname = LogPage::logName( $logType );
 1128+ $logname = LogPage::getName( $logType );
11291129 $r .= '(' . Linker::linkKnown( $logtitle, htmlspecialchars( $logname ) ) . ')';
11301130 } else {
11311131 $this->insertArticleLink( $r, $rcObj, $rcObj->unpatrolled, $rcObj->watched );
Index: trunk/phase3/includes/FileDeleteForm.php
@@ -258,7 +258,7 @@
259259 */
260260 private function showLogEntries() {
261261 global $wgOut;
262 - $wgOut->addHTML( '<h2>' . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
 262+ $wgOut->addHTML( '<h2>' . htmlspecialchars( LogPage::getName( 'delete' ) ) . "</h2>\n" );
263263 LogEventsList::showLogExtract( $wgOut, 'delete', $this->title );
264264 }
265265
Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -600,7 +600,7 @@
601601 * @param $output OutputPage to use
602602 */
603603 protected function showLogFragment( $user, $output ) {
604 - $output->addHTML( Xml::element( 'h2', null, LogPage::logName( 'rights' ) . "\n" ) );
 604+ $output->addHTML( Xml::element( 'h2', null, LogPage::getName( 'rights' ) . "\n" ) );
605605 LogEventsList::showLogExtract( $output, 'rights', $user->getUserPage() );
606606 }
607607 }
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -201,12 +201,12 @@
202202
203203 $qc = $this->getLogQueryCond();
204204 # Show relevant lines from the deletion log
205 - $output->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
 205+ $output->addHTML( "<h2>" . htmlspecialchars( LogPage::getName( 'delete' ) ) . "</h2>\n" );
206206 LogEventsList::showLogExtract( $output, 'delete',
207207 $this->targetObj, '', array( 'lim' => 25, 'conds' => $qc ) );
208208 # Show relevant lines from the suppression log
209209 if( $user->isAllowed( 'suppressionlog' ) ) {
210 - $output->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'suppress' ) ) . "</h2>\n" );
 210+ $output->addHTML( "<h2>" . htmlspecialchars( LogPage::getName( 'suppress' ) ) . "</h2>\n" );
211211 LogEventsList::showLogExtract( $output, 'suppress',
212212 $this->targetObj, '', array( 'lim' => 25, 'conds' => $qc ) );
213213 }
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -588,7 +588,7 @@
589589
590590 function showLogFragment( $title ) {
591591 $out = $this->getOutput();
592 - $out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'move' ) ) );
 592+ $out->addHTML( Xml::element( 'h2', null, LogPage::getName( 'move' ) ) );
593593 LogEventsList::showLogExtract( $out, 'move', $title );
594594 }
595595
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -226,7 +226,7 @@
227227 }
228228
229229 # Show relevant lines from the deletion log:
230 - $out->addHTML( '<h2>' . htmlspecialchars( LogPage::logName( 'merge' ) ) . "</h2>\n" );
 230+ $out->addHTML( '<h2>' . htmlspecialchars( LogPage::getName( 'merge' ) ) . "</h2>\n" );
231231 LogEventsList::showLogExtract( $out, 'merge', $this->mTargetObj );
232232
233233 # When we submit, go by page ID to avoid some nasty but unlikely collisions.
Index: trunk/phase3/includes/LogPage.php
@@ -398,7 +398,7 @@
399399
400400 # Use the language name for log titles, rather than Log/X
401401 if( $name == 'Log' ) {
402 - $titleLink = '(' . Linker::link( $title, LogPage::logName( $par ) ) . ')';
 402+ $titleLink = '(' . Linker::link( $title, LogPage::getName( $par ) ) . ')';
403403 } else {
404404 $titleLink = Linker::link( $title );
405405 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r106102revert r106095, fix apparently not this simplejeroendedauw21:34, 13 December 2011

Comments

#Comment by Jeroen De Dauw (talk | contribs)   21:29, 13 December 2011

Oops, this method is not static o_O

Status & tagging log