r108679 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108678‎ | r108679 | r108680 >
Date:20:52, 11 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Default wgShortUrlPrefix to false

Use it's value if it's a string
Modified paths:
  • /trunk/extensions/ShortUrl/ShortUrl.hooks.php (modified) (history)
  • /trunk/extensions/ShortUrl/ShortUrl.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ShortUrl/ShortUrl.php
@@ -19,10 +19,10 @@
2020 * Configuration variables
2121 * Prefix to use for the shortened URL. mod_rewrite (or equivalent) needs to be setup
2222 * to produce a shorter URL
23 - * Default is 'null' which just uses the (not so short) URL that all Special Pages get
 23+ * Default is false which just uses the (not so short) URL that all Special Pages get
2424 * Eg: http://en.wikipedia.org/wiki/Special:ShortUrl/5234
2525 */
26 -$wgShortUrlPrefix = null;
 26+$wgShortUrlPrefix = false;
2727
2828 // Extension credits that will show up on Special:Version
2929 $wgExtensionCredits['specialpage'][] = array(
Index: trunk/extensions/ShortUrl/ShortUrl.hooks.php
@@ -21,7 +21,7 @@
2222 public static function addToolboxLink( &$tpl ) {
2323 global $wgOut, $wgShortUrlPrefix;
2424
25 - if ( $wgShortUrlPrefix === null ) {
 25+ if ( !is_string( $wgShortUrlPrefix ) ) {
2626 $urlPrefix = SpecialPage::getTitleFor( 'ShortUrl' )->getCanonicalUrl() . '/';
2727 } else {
2828 $urlPrefix = $wgShortUrlPrefix;

Follow-up revisions

RevisionCommit summaryAuthorDate
r108680MFT r108679reedy20:56, 11 January 2012

Status & tagging log