Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Number.php |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | } |
84 | 84 | list( $number ) = sscanf( $numstring, "%f" ); |
85 | 85 | if ( count( $parts ) >= 3 ) { |
86 | | - $unit = SMWNumberValue::normalizeUnit( $parts[2] ); |
| 86 | + $unit = self::normalizeUnit( $parts[2] ); |
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | $this->m_unitin = false; |
106 | 106 | $this->m_unitvalues = false; |
107 | 107 | $number = $unit = ''; |
108 | | - $error = SMWNumberValue::parseNumberValue( $value, $number, $unit ); |
| 108 | + $error = self::parseNumberValue( $value, $number, $unit ); |
109 | 109 | if ( $error == 1 ) { // no number found |
110 | 110 | $this->addError( wfMsgForContent( 'smw_nofloat', $value ) ); |
111 | 111 | } elseif ( $error == 2 ) { // number is too large for this platform |
Index: trunk/extensions/SemanticMediaWiki/includes/jobs/SMW_UpdateJob.php |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | } |
58 | 58 | |
59 | 59 | wfProfileIn( __METHOD__ . '-parse' ); |
60 | | - $options = new ParserOptions; |
| 60 | + $options = new ParserOptions(); |
61 | 61 | $output = $wgParser->parse( $revision->getText(), $this->title, $options, true, true, $revision->getID() ); |
62 | 62 | |
63 | 63 | wfProfileOut( __METHOD__ . '-parse' ); |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php |
— | — | @@ -298,6 +298,19 @@ |
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
| 302 | + * A function for registering/overwriting dataitems for SMW. Should be |
| 303 | + * called from within the hook 'smwInitDatatypes'. |
| 304 | + * |
| 305 | + * @since 0.8 |
| 306 | + * |
| 307 | + * @param string $id |
| 308 | + * @param string $className |
| 309 | + */ |
| 310 | + static public function registerDataItem( $id, $className ) { |
| 311 | + self::$mTypeDiClasses[$id] = $className; |
| 312 | + } |
| 313 | + |
| 314 | + /** |
302 | 315 | * A function for registering/overwriting datatypes for SMW. Should be |
303 | 316 | * called from within the hook 'smwInitDatatypes'. |
304 | 317 | * |