r28818 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28817‎ | r28818 | r28819 >
Date:01:14, 24 December 2007
Author:yaron
Status:old
Tags:
Comment:
SMW 1.0 now supports Boolean type
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormClasses.inc (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormClasses.inc
@@ -295,9 +295,11 @@
296296 $email_type = $datatypeLabels['_ema'];
297297 $float_type = $datatypeLabels['_num'];
298298 $int_type = $datatypeLabels['_num'];
299 - // just a placeholder until SMW 1.0 supports Boolean types -
300 - // should be $datatypeLabels['_boo'];
301 - $bool_type = 'boolean';
 299+ // some old versions of SMW 1.0 don't support Boolean types
 300+ if (array_key_exists('_boo', $datatypeLabels))
 301+ $bool_type = $datatypeLabels['_boo'];
 302+ else
 303+ $bool_type = 'boolean';
302304 $date_type = $datatypeLabels['_dat'];
303305 $enum_type = 'enumeration'; // not a real type
304306 $page_type = $datatypeLabels['_wpg'];
Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc
@@ -51,9 +51,11 @@
5252 $float_type = $datatypeLabels['_num'];
5353 $int_type = 'integer'; // placeholder - no longer exists
5454 }
55 - // just a placeholder until SMW 1.0 supports Boolean types -
56 - // should be $datatypeLabels['_boo'];
57 - $bool_type = 'boolean';
 55+ // some old versions of SMW 1.0 don't support Boolean types
 56+ if (array_key_exists('_boo', $datatypeLabels))
 57+ $bool_type = $datatypeLabels['_boo'];
 58+ else
 59+ $bool_type = 'boolean';
5860 $date_type = $datatypeLabels['_dat'];
5961 $enum_type = 'enumeration'; // not a real type
6062 $page_type = $datatypeLabels['_wpg'];

Status & tagging log