r90995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90994‎ | r90995 | r90996 >
Date:20:31, 28 June 2011
Author:yaron
Status:ok
Tags:
Comment:
Revert of changes in r90288 - changes of "else if" to "elseif" are fine in PHP code, but not in Javascript code (which has no elseif) - and these were all in Javascript code
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -481,7 +481,7 @@
482482 if (x.currentStyle) {
483483 // IE
484484 var y = x.currentStyle['lineheight'];
485 - } elseif (window.getComputedStyle) {
 485+ } else if (window.getComputedStyle) {
486486 // FF, Opera
487487 var y = document.defaultView.getComputedStyle(x,null).getPropertyValue('line-height');
488488 }
@@ -527,7 +527,7 @@
528528 {
529529 txtarea = oDoc.FCK.EditingArea.Textarea ;
530530 }
531 - elseif (oDoc.editform)
 531+ else if (oDoc.editform)
532532 {
533533 // if we have FCK enabled, behave differently...
534534 if ( showFCKEditor & RTE_VISIBLE )
@@ -573,7 +573,7 @@
574574 //save window scroll position
575575 if ( oDoc.documentElement && oDoc.documentElement.scrollTop )
576576 var winScroll = oDoc.documentElement.scrollTop ;
577 - elseif ( oDoc.body )
 577+ else if ( oDoc.body )
578578 var winScroll = oDoc.body.scrollTop ;
579579
580580 //get current selection
@@ -595,11 +595,11 @@
596596 //restore window scroll position
597597 if ( oDoc.documentElement && oDoc.documentElement.scrollTop )
598598 oDoc.documentElement.scrollTop = winScroll ;
599 - elseif ( oDoc.body )
 599+ else if ( oDoc.body )
600600 oDoc.body.scrollTop = winScroll ;
601601
602602 }
603 - elseif ( txtarea.selectionStart || txtarea.selectionStart == '0' )
 603+ else if ( txtarea.selectionStart || txtarea.selectionStart == '0' )
604604 { // Mozilla
605605
606606 //save textarea scroll position
@@ -616,7 +616,7 @@
617617 selText = sampleText ;
618618 isSample = true ;
619619 }
620 - elseif (selText.charAt(selText.length - 1) == ' ')
 620+ else if (selText.charAt(selText.length - 1) == ' ')
621621 { //exclude ending space char
622622 selText = selText.substring(0, selText.length - 1) ;
623623 tagClose += ' ' ;
@@ -645,7 +645,7 @@
646646 if (!selText) {
647647 selText = sampleText;
648648 isSample = true;
649 - } elseif (selText.charAt(selText.length - 1) == ' ') { //exclude ending space char
 649+ } else if (selText.charAt(selText.length - 1) == ' ') { //exclude ending space char
650650 selText = selText.substring(0, selText.length - 1);
651651 tagClose += ' '
652652 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90288Swap else if for elseif...reedy16:27, 17 June 2011

Status & tagging log