http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73948

Revision: 73948
Author:   yaron
Date:     2010-09-29 15:14:39 +0000 (Wed, 29 Sep 2010)

Log Message:
-----------
Fix for periods in template names in page-name formulas; added handling for 
__NORICHEDITOR__

Modified Paths:
--------------
    trunk/extensions/SemanticForms/includes/SF_FormPrinter.php

Modified: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_FormPrinter.php  2010-09-29 
14:24:59 UTC (rev 73947)
+++ trunk/extensions/SemanticForms/includes/SF_FormPrinter.php  2010-09-29 
15:14:39 UTC (rev 73948)
@@ -818,14 +818,14 @@
             } else { // value is not an array
               $cur_value_in_template = $cur_value;
             }
-            if ( $query_template_name == null || $query_template_name == '' )
+            if ( $template_name == null || $template_name == '' )
               $input_name = $field_name;
             elseif ( $allow_multiple )
               // 'num' will get replaced by an actual index, either in PHP
               // or in Javascript, later on
-              $input_name = $query_template_name . '[num][' . $field_name . 
']';
+              $input_name = $template_name . '[num][' . $field_name . ']';
             else
-              $input_name = $query_template_name . '[' . $field_name . ']';
+              $input_name = $template_name . '[' . $field_name . ']';
 
             // if we're creating the page name from a formula based on
             // form values, see if the current input is part of that formula,
@@ -1214,7 +1214,7 @@
     }
     // if the FCKeditor extension is installed, use that for the free text 
input
     global $wgFCKEditorDir;
-    if ( $wgFCKEditorDir ) {
+    if ( $wgFCKEditorDir && strpos( $existing_page_content, '__NORICHEDITOR__' 
) === false ) {
       $showFCKEditor = SFFormUtils::getShowFCKEditor();
       if ( !$form_submitted && ( $showFCKEditor & RTE_VISIBLE ) ) {
         $free_text = SFFormUtils::prepareTextForFCK( $free_text );



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to