https://bugzilla.wikimedia.org/show_bug.cgi?id=36505
--- Comment #4 from Sal Quintanilla <[email protected]> 2012-06-11 20:18:59 UTC --- Thanks and done. In the mean time, with respect to SF 2.4.2, moving the default or preloaded text assignment to $cur_value beneath the "If the user is editing a page, and that page contains a call to the template being processed, get the current field's value from the template call" code seems like the right thing to do to set fields that are mandatory and empty. In testing it's doing the same thing it did before in all combinations of (mandatory/not mandatory) and (default/no default), with the exception that if the field is empty, it selects the default instead of None. I know you don't necessarily have time to look at it now, but it's here in case you get an immediate fire alarm because of some side effect this causes that I've missed. diff SF_FormPrinter.php.orig SF_FormPrinter.php 917,925d916 < if ( empty( $cur_value ) && !$form_submitted ) { < if ( !is_null( $default_value ) ) { < // Set to the default value specified in the form, if it's there. < $cur_value = $default_value; < } elseif ( $preload_page ) { < $cur_value = SFFormUtils::getPreloadedText( $preload_page ); < } < } < 953a945,953 > if ( empty( $cur_value ) && > !$form_submitted ) { > if ( !is_null( $default_value ) > ) { > // Set to the default > value specified in the form, if it's there. > $cur_value = > $default_value; > } elseif ( $preload_page ) { > $cur_value = > SFFormUtils::getPreloadedText( $preload_page ); > } > } > -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
