r82722 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82721‎ | r82722 | r82723 >
Date:14:27, 24 February 2011
Author:reedy
Status:ok
Tags:
Comment:
Only set Narayam.checkbox.href= if we have a valid title object
Modified paths:
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.php
@@ -146,7 +146,9 @@
147147 $str .= sprintf( "Narayam.shortcut.key= '%s';\n", $wgNarayamConfig['shortcut_key'] );
148148 $str .= sprintf( "Narayam.checkbox.text= '%s ('+Narayam.shortcut.toString()+')';\n", wfMsgForContent( 'narayam-toggle-ime' ) /* $wgNarayamConfig['checkbox']['text'] */ );
149149 $title = Title::newFromText( wfMsgForContent( 'narayam-help-page' ) );
150 - $str .= sprintf( "Narayam.checkbox.href= '%s';\n", $title->getFullURL() );
 150+ if ( $title ) {
 151+ $str .= sprintf( "Narayam.checkbox.href= '%s';\n", $title->getFullURL() );
 152+ }
151153 $str .= sprintf( "Narayam.checkbox.tooltip= '%s';\n", wfMsgForContent( 'narayam-checkbox-tooltip' ) );
152154 // $str .= 'Narayam.default_state = ' . Narayam::boolToString($wgNarayamConfig['default_state']) . ";\n";
153155 $str .= "Narayam.schemes = [\n";

Status & tagging log