r41929 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41928‎ | r41929 | r41930 >
Date:13:39, 10 October 2008
Author:mkroetzsch
Status:old
Tags:
Comment:
no type hinting for Parser objects, since FCKEditor has its own parser class that creates a runtime error otherwise
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php
@@ -28,7 +28,7 @@
2929 * store this array in the current parser output, using the variable
3030 * mSMWMagicWords.
3131 */
32 - static public function stripMagicWords(&$text, Parser $parser) {
 32+ static public function stripMagicWords(&$text, $parser) {
3333 $words = array();
3434 $mw = MagicWord::get('SMW_NOFACTBOX');
3535 if ($mw->matchAndRemove($text)) {
@@ -47,7 +47,7 @@
4848 * This function retrieves the SMW data from a given parser, and creates
4949 * a new empty container if it is not initiated yet.
5050 */
51 - static public function getSMWdata(Parser $parser) {
 51+ static public function getSMWdata($parser) {
5252 $output = SMWParseData::getOutput($parser);
5353 $title = $parser->getTitle();
5454 if (!isset($output) || !isset($title)) return NULL; // no parsing, create error
@@ -62,7 +62,7 @@
6363 /**
6464 * Clear all stored data for a given parser.
6565 */
66 - static public function clearStorage(Parser $parser) {
 66+ static public function clearStorage($parser) {
6767 $output = SMWParseData::getOutput($parser);
6868 $title = $parser->getTitle();
6969 if (!isset($output) || !isset($title)) return;
@@ -77,7 +77,7 @@
7878 * strings as they might be found in a wiki. The function returns a datavalue
7979 * object that contains the result of the operation.
8080 */
81 - static public function addProperty($propertyname, $value, $caption, Parser $parser, $storeannotation = true) {
 81+ static public function addProperty($propertyname, $value, $caption, $parser, $storeannotation = true) {
8282 wfProfileIn("SMWParseData::addProperty (SMW)");
8383 global $smwgContLang;
8484 // See if this property is a special one, such as e.g. "has type"
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php
@@ -317,7 +317,7 @@
318318 * Usage:
319319 * {{\#declare:Author=Author\#list|Publisher=editor}}
320320 */
321 - static public function doDeclare( Parser &$parser, PPFrame $frame, $args ) {
 321+ static public function doDeclare( &$parser, PPFrame $frame, $args ) {
322322 if ($frame->isTemplate()) {
323323 foreach ($args as $arg)
324324 if (trim($arg) != "") {

Status & tagging log