r104336 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104335‎ | r104336 | r104337 >
Date:14:50, 27 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Core has a Title->isMainPage() function
Modified paths:
  • /trunk/extensions/ShortUrl/ShortUrl.utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ShortUrl/ShortUrl.utils.php
@@ -13,7 +13,7 @@
1414 exit( 1 );
1515 }
1616
17 -/**
 17+/**
1818 * Utility functions for encoding and decoding short URLs
1919 */
2020 class ShortUrlUtils {
@@ -83,10 +83,10 @@
8484 }
8585
8686 /**
87 - * @param $title Title
 87+ * @param $title Title
8888 * @return Boolean: true if a short URL needs to be displayed
8989 */
9090 public static function needsShortUrl( $title ) {
91 - return $title->exists() && !$title->equals( Title::newMainPage() );
 91+ return $title->exists() && !$title->isMainPage();
9292 }
9393 }

Status & tagging log