r73948 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73947‎ | r73948 | r73949 >
Date:15:14, 29 September 2010
Author:yaron
Status:deferred
Tags:
Comment:
Fix for periods in template names in page-name formulas; added handling for __NORICHEDITOR__
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -818,14 +818,14 @@
819819 } else { // value is not an array
820820 $cur_value_in_template = $cur_value;
821821 }
822 - if ( $query_template_name == null || $query_template_name == '' )
 822+ if ( $template_name == null || $template_name == '' )
823823 $input_name = $field_name;
824824 elseif ( $allow_multiple )
825825 // 'num' will get replaced by an actual index, either in PHP
826826 // or in Javascript, later on
827 - $input_name = $query_template_name . '[num][' . $field_name . ']';
 827+ $input_name = $template_name . '[num][' . $field_name . ']';
828828 else
829 - $input_name = $query_template_name . '[' . $field_name . ']';
 829+ $input_name = $template_name . '[' . $field_name . ']';
830830
831831 // if we're creating the page name from a formula based on
832832 // form values, see if the current input is part of that formula,
@@ -1214,7 +1214,7 @@
12151215 }
12161216 // if the FCKeditor extension is installed, use that for the free text input
12171217 global $wgFCKEditorDir;
1218 - if ( $wgFCKEditorDir ) {
 1218+ if ( $wgFCKEditorDir && strpos( $existing_page_content, '__NORICHEDITOR__' ) === false ) {
12191219 $showFCKEditor = SFFormUtils::getShowFCKEditor();
12201220 if ( !$form_submitted && ( $showFCKEditor & RTE_VISIBLE ) ) {
12211221 $free_text = SFFormUtils::prepareTextForFCK( $free_text );

Status & tagging log