r23851 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23850‎ | r23851 | r23852 >
Date:17:40, 7 July 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Use empty string as return value for getUnit if there is no unit (DB escapeable).
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Error.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_NAry.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Types.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_URI.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php
@@ -193,7 +193,7 @@
194194 /**
195195 * Return the unit in which the returned value is to be interpreted.
196196 * This string is a plain UTF-8 string without wiki or html markup.
197 - * Returns FALSE if no unit is given for the value.
 197+ * Returns the empty string if no unit is given for the value.
198198 */
199199 abstract public function getUnit();
200200
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Error.php
@@ -64,7 +64,7 @@
6565 }
6666
6767 public function getUnit() {
68 - return array('STDUNIT'=>false, 'ALLUNITS'=>array());
 68+ return ''; // empty unit
6969 }
7070
7171 public function getError() {
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_URI.php
@@ -105,7 +105,7 @@
106106 }
107107
108108 public function getUnit() {
109 - return array('STDUNIT'=>false, 'ALLUNITS'=>array());
 109+ return ''; // empty unit
110110 }
111111
112112 public function getError() {
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Types.php
@@ -90,7 +90,7 @@
9191 }
9292
9393 public function getUnit() {
94 - return false;
 94+ return ''; // empty unit
9595 }
9696
9797 public function getError() {
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php
@@ -72,7 +72,7 @@
7373 }
7474
7575 public function getUnit() {
76 - return array('STDUNIT'=>false, 'ALLUNITS'=>array());
 76+ return ''; // empty unit
7777 }
7878
7979 public function getError() {
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_NAry.php
@@ -170,7 +170,7 @@
171171 }
172172
173173 public function getUnit() {
174 - return false;
 174+ return ''; // empty unit
175175 }
176176
177177 public function getError() {

Status & tagging log