r59986 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59985‎ | r59986 | r59987 >
Date:23:42, 11 December 2009
Author:yaron
Status:ok
Tags:
Comment:
Changed inline code to a full 'if' statement
Modified paths:
  • /trunk/extensions/TemplateInfo/TemplateInfo.classes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TemplateInfo/TemplateInfo.classes.php
@@ -47,7 +47,11 @@
4848
4949 static function tableRowHTML($css_class, $data_type, $value = null) {
5050 $data_type = htmlspecialchars($data_type);
51 - $content = is_null($value) ? $data_type : "$data_type: " . HTML::element('span', array('class' => 'rowValue'), $value);
 51+ if (is_null($value)) {
 52+ $content = $data_type;
 53+ } else {
 54+ $content = "$data_type: " . HTML::element('span', array('class' => 'rowValue'), $value);
 55+ }
5256 $cell = HTML::rawElement('td', array('colspan' => 2), $content);
5357 $text = HTML::rawElement('tr', array('class' => $css_class), $cell);
5458 $text .= "\n";

Status & tagging log