https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114029

Revision: 114029
Author:   foxtrott
Date:     2012-03-16 19:27:12 +0000 (Fri, 16 Mar 2012)
Log Message:
-----------
bugfix (using backtrace does not work for free text)

Modified Paths:
--------------
    trunk/extensions/SemanticForms/includes/forminputs/SF_FormInput.php

Modified: trunk/extensions/SemanticForms/includes/forminputs/SF_FormInput.php
===================================================================
--- trunk/extensions/SemanticForms/includes/forminputs/SF_FormInput.php 
2012-03-16 18:45:27 UTC (rev 114028)
+++ trunk/extensions/SemanticForms/includes/forminputs/SF_FormInput.php 
2012-03-16 19:27:12 UTC (rev 114029)
@@ -301,8 +301,12 @@
                if ( function_exists('get_called_class') ) {
                        $calledClass = get_called_class();
                } else {
-                       $bt = debug_backtrace();
-                       $calledClass = $bt[1]['args'][0][0];
+                       if ( $input_name === 'sf_free_text' ) { // free text
+                               $calledClass = 'SFTextAreaInput';
+                       } else {
+                               $bt = debug_backtrace(false);           
+                               $calledClass = $bt[1]['args'][0][0];
+                       }
                }
                
                $input = new $calledClass ( $sfgFieldNum, $cur_value, 
$input_name, $is_disabled, $other_args );


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

Reply via email to