r71619 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71618‎ | r71619 | r71620 >
Date:02:37, 25 August 2010
Author:tstarling
Status:deferred
Tags:
Comment:
Use JAVASCRIPT instead of END in heredoc syntax, to make vim switch syntax highlighting modes.
Modified paths:
  • /trunk/extensions/SemanticFormsInputs/SFI_Inputs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticFormsInputs/SFI_Inputs.php
@@ -28,7 +28,7 @@
2929
3030 wfLoadExtensionMessages( 'SemanticFormsInputs' );
3131
32 - $jstext = <<<END
 32+ $jstext = <<<JAVASCRIPT
3333 function validate_input_with_regexp(input_number, re, inverse, message, multiple){
3434
3535 if (multiple) {
@@ -59,7 +59,7 @@
6060 }
6161 }
6262 }
63 -END;
 63+JAVASCRIPT;
6464
6565 $wgOut->addInlineScript( $jstext );
6666 }
@@ -222,7 +222,7 @@
223223 "}\n" .
224224 "addOnloadHook(datePickerSetLocale);";
225225
226 - $jstext = <<<END
 226+ $jstext = <<<JAVASCRIPT
227227 function toggle_datepicker(toggle_button) {
228228
229229 var id = toggle_button.id.replace("_button","");
@@ -319,8 +319,8 @@
320320 var id = toggle_button.id.replace("_resetbutton","");
321321 if (sfiElements[id]) sfiElements[id].clear();
322322 document.getElementById(id).value="";
323 - }
324 -END;
 323+ }
 324+JAVASCRIPT;
325325
326326 $jstext .= $locString;
327327
@@ -625,14 +625,14 @@
626626 if ( count( $parts ) == 3 ) {
627627 $defaultDateString = '"' . $parts[1] . '/' . $parts[0] . '/' . $parts[2] . '"';
628628
629 - $setDefaultDateString = <<<END
 629+ $setDefaultDateString = <<<JAVASCRIPT
630630 document.getElementById("input_{$sfgFieldNum}").value=
631631 YAHOO.util.Date.format(
632632 new Date(Date.parse($defaultDateString)),
633633 {format:"$dateFormatString"},
634634 'wiki'
635635 );
636 -END;
 636+JAVASCRIPT;
637637
638638 }
639639 }
@@ -715,7 +715,7 @@
716716 } elseif ( $is_disabled ) {
717717 $jstext = '';
718718 } else {
719 - $jstext = <<<END
 719+ $jstext = <<<JAVASCRIPT
720720 function setup_input_{$sfgFieldNum}() {
721721
722722 sfiElements['settings_$sfgFieldNum'] = new Object();
@@ -736,7 +736,7 @@
737737 }
738738
739739 addOnloadHook(setup_input_{$sfgFieldNum});
740 -END;
 740+JAVASCRIPT;
741741 }
742742
743743 return array( $htmltext, $jstext );

Status & tagging log