tosfos has uploaded a new change for review.
https://gerrit.wikimedia.org/r/165106
Change subject: Introduce sfBeforeFreeTextSubstitution hook, replacing the now
deprecated sfModifyFreeTextField hook
......................................................................
Introduce sfBeforeFreeTextSubstitution hook, replacing the now deprecated
sfModifyFreeTextField hook
Change-Id: I7103b0d039b0efc141588dd60b77d936f011c51a
---
M includes/SF_FormPrinter.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms
refs/changes/06/165106/1
diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php
index 9e874e3..60e6f55 100644
--- a/includes/SF_FormPrinter.php
+++ b/includes/SF_FormPrinter.php
@@ -1728,7 +1728,12 @@
$data_text = str_replace( '!free_text!',
'<onlyinclude>!free_text!</onlyinclude>', $data_text );
}
+ // The first hook here is deprecated. Use the second.
+ // Note: wfRunHooks can take a third argument which indicates a
deprecated hook, but it
+ // expects a MediaWiki version, not an extension version.
wfRunHooks( 'sfModifyFreeTextField', array( &$free_text,
$existing_page_content ) );
+ wfRunHooks( 'sfBeforeFreeTextSubstitution',
+ array( &$free_text, $existing_page_content, &$data_text
) );
// now that we have it, substitute free text into the form and
page
$escaped_free_text = Sanitizer::safeEncodeAttribute( $free_text
);
--
To view, visit https://gerrit.wikimedia.org/r/165106
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7103b0d039b0efc141588dd60b77d936f011c51a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: tosfos <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits