r108796 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108795‎ | r108796 | r108797 >
Date:08:55, 13 January 2012
Author:raymond
Status:ok
Tags:
Comment:
MFT r93422: Un-break FCKEditor
Modified paths:
  • /branches/REL1_18/extensions/FCKeditor (modified) (history)
  • /branches/REL1_18/extensions/FCKeditor/FCKeditor.body.php (modified) (history)
  • /branches/REL1_18/extensions/FCKeditor/FCKeditorParser.body.php (modified) (history)
  • /branches/REL1_18/extensions/FCKeditor/FCKeditorSajax.body.php (modified) (history)
  • /branches/REL1_18/extensions/FCKeditor/FCKeditorSkin.body.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/extensions/FCKeditor/FCKeditorSkin.body.php
@@ -68,18 +68,18 @@
6969 if( $thumb ) {
7070 $ret .= "_fck_mw_type=\"thumb"."\" ";
7171 $class .= "fck_mw_frame";
72 - } elseif( $framed ) {
 72+ } else if( $framed ) {
7373 $ret .= "_fck_mw_type=\"frame"."\" ";
7474 $class .= "fck_mw_frame";
7575 }
7676
7777 if( $align == 'right' ) {
7878 $class .= ( $class ? ' ' : '' ) . 'fck_mw_right';
79 - } elseif( $align == 'center' ) {
 79+ } else if( $align == 'center' ) {
8080 $class .= ( $class ? ' ' : '' ) . 'fck_mw_center';
81 - } elseif( $align == 'left' ) {
 81+ } else if( $align == 'left' ) {
8282 $class .= ( $class ? ' ' : '' ) . 'fck_mw_left';
83 - } elseif( $framed || $thumb ) {
 83+ } else if( $framed || $thumb ) {
8484 $class .= ( $class ? ' ' : '' ) . 'fck_mw_right';
8585 }
8686
Index: branches/REL1_18/extensions/FCKeditor/FCKeditorSajax.body.php
@@ -109,19 +109,19 @@
110110 $ns = NS_CATEGORY;
111111 $term = substr( $term, 9 );
112112 $prefix = 'Category:';
113 - } elseif( strpos( strtolower( $term ), ':category:' ) === 0 ) {
 113+ } else if( strpos( strtolower( $term ), ':category:' ) === 0 ) {
114114 $ns = NS_CATEGORY;
115115 $term = substr( $term, 10 );
116116 $prefix = ':Category:';
117 - } elseif( strpos( strtolower( $term ), 'media:' ) === 0 ) {
 117+ } else if( strpos( strtolower( $term ), 'media:' ) === 0 ) {
118118 $ns = NS_IMAGE;
119119 $term = substr( $term, 6 );
120120 $prefix = 'Media:';
121 - } elseif( strpos( strtolower( $term ), ':image:' ) === 0 ) {
 121+ } else if( strpos( strtolower( $term ), ':image:' ) === 0 ) {
122122 $ns = NS_IMAGE;
123123 $term = substr( strtolower( $term ), 7 );
124124 $prefix = ':Image:';
125 - } elseif( strpos( $term, ':' ) && is_array( $wgExtraNamespaces ) ) {
 125+ } else if( strpos( $term, ':' ) && is_array( $wgExtraNamespaces ) ) {
126126 $pos = strpos( $term, ':' );
127127 $find_ns = array_search( substr( $term, 0, $pos ), $wgExtraNamespaces );
128128 if( $find_ns ) {
@@ -201,7 +201,7 @@
202202 /// @todo FIXME: should use Database class
203203 $sql = "SELECT tmpSelectCatPage.page_title AS title FROM ".$dbr->tableName('categorylinks')." AS tmpSelectCat ".
204204 "LEFT JOIN ".$dbr->tableName('page')." AS tmpSelectCatPage ON tmpSelectCat.cl_from = tmpSelectCatPage.page_id ".
205 - "WHERE tmpSelectCat.cl_to LIKE ".$dbr->addQuotes($m_root)." AND tmpSelectCatPage.page_namespace = $ns";
 205+ "WHERE tmpSelectCat.cl_to LIKE ".$dbr->addQuotes($m_root)." AND tmpSelectCatPage.page_namespace = $ns";
206206
207207 $res = $dbr->query( $sql, __METHOD__ );
208208 $ret = '';
Index: branches/REL1_18/extensions/FCKeditor/FCKeditorParser.body.php
@@ -389,7 +389,7 @@
390390 if( $sum == 1 && $lastSum == 0 ) {
391391 $stringToParse .= strtr( substr( $text, $startingPos, $pos - $startingPos ), $strtr );
392392 $startingPos = $pos;
393 - } elseif( $sum == 0 ) {
 393+ } else if( $sum == 0 ) {
394394 $stringToParse .= 'Fckmw' . $this->fck_mw_strtr_span_counter . 'fckmw';
395395 $inner = htmlspecialchars( strtr( substr( $text, $startingPos, $pos - $startingPos + 19 ), $strtr ) );
396396 $this->fck_mw_strtr_span['href="Fckmw' . $this->fck_mw_strtr_span_counter . 'fckmw"'] = 'href="' . $inner . '"';
@@ -627,7 +627,7 @@
628628 } else {
629629 $inBlockElem = true;
630630 }
631 - } elseif ( !$inBlockElem && !$this->mInPre ) {
 631+ } else if ( !$inBlockElem && !$this->mInPre ) {
632632 if ( ' ' == $t{0} and ( $this->mLastSection == 'pre' or trim( $t ) != '' ) ) {
633633 // pre
634634 if( $this->mLastSection != 'pre' ) {
@@ -657,7 +657,7 @@
658658 $output .= $paragraphStack;
659659 $paragraphStack = false;
660660 $this->mLastSection = 'p';
661 - } elseif ($this->mLastSection != 'p') {
 661+ } else if ($this->mLastSection != 'p') {
662662 $output .= $this->closeParagraph().'<p>';
663663 $this->mLastSection = 'p';
664664 }
Index: branches/REL1_18/extensions/FCKeditor/FCKeditor.body.php
@@ -465,7 +465,7 @@
466466
467467 if ( !( typeof(oDoc.FCK) == "undefined" ) && !( typeof(oDoc.FCK.EditingArea) == "undefined" ) ){
468468 txtarea = oDoc.FCK.EditingArea.Textarea;
469 - } elseif( oDoc.editform ){
 469+ } else if( oDoc.editform ){
470470 // if we have FCK enabled, behave differently...
471471 if ( showFCKEditor & RTE_VISIBLE ){
472472 SRCiframe = oDoc.getElementById( 'wpTextbox1___Frame' );
@@ -501,7 +501,7 @@
502502 // save window scroll position
503503 if ( oDoc.documentElement && oDoc.documentElement.scrollTop )
504504 var winScroll = oDoc.documentElement.scrollTop;
505 - elseif ( oDoc.body )
 505+ else if ( oDoc.body )
506506 var winScroll = oDoc.body.scrollTop;
507507
508508 // get current selection
@@ -522,10 +522,10 @@
523523 // restore window scroll position
524524 if ( oDoc.documentElement && oDoc.documentElement.scrollTop )
525525 oDoc.documentElement.scrollTop = winScroll;
526 - elseif ( oDoc.body )
 526+ else if ( oDoc.body )
527527 oDoc.body.scrollTop = winScroll;
528528
529 - } elseif ( txtarea.selectionStart || txtarea.selectionStart == '0' ){ // Mozilla
 529+ } else if ( txtarea.selectionStart || txtarea.selectionStart == '0' ){ // Mozilla
530530
531531 // save textarea scroll position
532532 var textScroll = txtarea.scrollTop;
@@ -539,7 +539,7 @@
540540 if( !selText ){
541541 selText = sampleText;
542542 isSample = true;
543 - } elseif( selText.charAt(selText.length - 1) == ' ' ){ //exclude ending space char
 543+ } else if( selText.charAt(selText.length - 1) == ' ' ){ //exclude ending space char
544544 selText = selText.substring(0, selText.length - 1);
545545 tagClose += ' ';
546546 }
@@ -563,7 +563,7 @@
564564 if( !selText ) {
565565 selText = sampleText;
566566 isSample = true;
567 - } elseif( selText.charAt(selText.length - 1) == ' ' ) { //exclude ending space char
 567+ } else if( selText.charAt(selText.length - 1) == ' ' ) { //exclude ending space char
568568 selText = selText.substring(0, selText.length - 1);
569569 tagClose += ' '
570570 }
@@ -594,7 +594,7 @@
595595 // Remove the mwSetupToolbar onload hook to avoid a JavaScript error with FF.
596596 if ( window.removeEventListener )
597597 window.removeEventListener( 'load', mwSetupToolbar, false );
598 - elseif ( window.detachEvent )
 598+ else if ( window.detachEvent )
599599 window.detachEvent( 'onload', mwSetupToolbar );
600600 mwSetupToolbar = function(){ return false ; };
601601
Property changes on: branches/REL1_18/extensions/FCKeditor/FCKeditor.body.php
___________________________________________________________________
Modified: svn:mergeinfo
602602 Merged /trunk/extensions/FCKeditor/FCKeditor.body.php:r93422
Property changes on: branches/REL1_18/extensions/FCKeditor
___________________________________________________________________
Added: svn:mergeinfo
603603 Merged /trunk/extensions/FCKeditor:r93422,97886-97887,97899,97969,98054,98179,98432,98497,98607,98654,98773,98801,98960,98982,99022,99059,99097,99164,99167,99187,99193,99653,99897,100092,100504,100516,100573,100689,100692,100699,102848,102962,103675,104049,104162,104337,104360,104621,104867,107043,107120,107337

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93422Revert r90286 for FCKeditor. I'm not sure why this broke the extension, but i...emufarmers19:54, 28 July 2011

Status & tagging log