r107471 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107470‎ | r107471 | r107472 >
Date:06:37, 28 December 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Check for input in r107336
Modified paths:
  • /trunk/extensions/Translate/TranslateHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateHooks.php
@@ -357,6 +357,7 @@
358358 $title = Title::newFromText( $title );
359359 if ( !$title ) return '';
360360 $handle = new MessageHandle( $title );
 361+ if ( !$handle->isValid() ) return '';
361362 $group = $handle->getGroup();
362363 $callParams = array( $title->getPrefixedText(), $group->getId() );
363364 $call = Xml::encodeJsCall( 'mw.translate.openDialog', $callParams );
@@ -364,7 +365,6 @@
365366 mw.loader.using( 'ext.translate.quickedit', function() { $call; } ); return false;
366367 JAVASCRIPT;
367368
368 -
369369 $a = array(
370370 'href' => $title->getFullUrl( array( 'action' => 'edit' ) ),
371371 'onclick' => $js,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107336Adding POC {{#translationdialog:title}} functionality.nikerabbit19:44, 26 December 2011

Status & tagging log