r74772 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74771‎ | r74772 | r74773 >
Date:14:20, 14 October 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Added method to allow overriding the default parser function options
Modified paths:
  • /trunk/extensions/Validator/includes/ParserHook.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/includes/ParserHook.php
@@ -210,10 +210,27 @@
211211
212212 $this->parser = array_shift( $args );
213213
214 - return array( $this->validateAndRender( $args, self::TYPE_FUNCTION ), 'noparse' => true, 'isHTML' => true );
 214+ return array_merge(
 215+ array( $this->validateAndRender( $args, self::TYPE_FUNCTION ) ),
 216+ $this->getFunctionOptions()
 217+ );
215218 }
216219
217220 /**
 221+ * Returns the parser function otpions.
 222+ *
 223+ * @since 0.4
 224+ *
 225+ * @return array
 226+ */
 227+ protected function getFunctionOptions() {
 228+ return array(
 229+ 'noparse' => true,
 230+ 'isHTML' => true
 231+ );
 232+ }
 233+
 234+ /**
218235 * Takes care of validation and rendering, and returns the output.
219236 *
220237 * @since 0.4

Follow-up revisions

RevisionCommit summaryAuthorDate
r74775Follow up to r74772jeroendedauw14:38, 14 October 2010

Status & tagging log