r44300 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44299‎ | r44300 | r44301 >
Date:04:52, 8 December 2008
Author:yaron
Status:deferred
Tags:
Comment:
Added new 'sfEditFormPreloadText' hook
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_AddData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_AddData.php
@@ -120,8 +120,10 @@
121121 $page_is_source = true;
122122 $page_contents = SFFormUtils::getPreloadedText($wgRequest->getVal('preload'));
123123 } else {
124 - $page_is_source = false;
125124 $page_contents = null;
 125+ // let other extensions preload the page, if they want
 126+ wfRunHooks('sfEditFormPreloadText', array(&$page_contents, $target_title, $form_title));
 127+ $page_is_source = ($page_contents != null);
126128 }
127129 list ($form_text, $javascript_text, $data_text, $form_page_title, $generated_page_name) =
128130 $sfgFormPrinter->formHTML($form_definition, $form_submitted, $page_is_source, $page_contents, $page_title, $page_name_formula);

Status & tagging log