Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -1008,14 +1008,16 @@ |
1009 | 1009 | // call hooks - unfortunately this has to be split into two |
1010 | 1010 | // separate calls, because of the different variable names in |
1011 | 1011 | // each case |
1012 | | - if ( $form_submitted ) |
| 1012 | + if ( $form_submitted ) { |
1013 | 1013 | wfRunHooks( 'sfCreateFormField', array( &$form_field, &$cur_value_in_template, true ) ); |
1014 | | - else |
| 1014 | + } else { |
1015 | 1015 | wfRunHooks( 'sfCreateFormField', array( &$form_field, &$cur_value, false ) ); |
| 1016 | + } |
1016 | 1017 | // if this is not part of a 'multiple' template, increment the |
1017 | 1018 | // global tab index (used for correct tabbing) |
1018 | | - if ( ! array_key_exists( 'part_of_multiple', $field_args ) ) |
| 1019 | + if ( ! array_key_exists( 'part_of_multiple', $field_args ) ) { |
1019 | 1020 | $sfgTabIndex++; |
| 1021 | + } |
1020 | 1022 | // increment the global field number regardless |
1021 | 1023 | $sfgFieldNum++; |
1022 | 1024 | // if the field is a date field, and its default value was set |
— | — | @@ -1366,17 +1368,11 @@ |
1367 | 1369 | $page_article = new Article( $this->mPageTitle ); |
1368 | 1370 | $edittime = $page_article->getTimestamp(); |
1369 | 1371 | if ( !$is_query ) { |
1370 | | - $form_text .= <<<END |
1371 | | - |
1372 | | - <input type="hidden" value="$starttime" name="wpStarttime" /> |
1373 | | - <input type="hidden" value="$edittime" name="wpEdittime" /> |
1374 | | -END; |
| 1372 | + $form_text .= "\t" . Xml::hidden( 'wpStarttime', wfTimestampNow() ) . "\n"; |
| 1373 | + $form_text .= "\t" . Xml::hidden( 'wpEdittime', $page_article->getTimestamp() ) . "\n"; |
1375 | 1374 | } |
1376 | | - $form_text .= <<<END |
1377 | | - </form> |
| 1375 | + $form_text .= "\t</form>\n"; |
1378 | 1376 | |
1379 | | -END; |
1380 | | - |
1381 | 1377 | // add Javascript code for form-wide use |
1382 | 1378 | $javascript_text = ""; |
1383 | 1379 | if ( $free_text_was_included && $showFCKEditor > 0 ) { |