User "Dantman" posted a comment on MediaWiki.r93422.

Full URL: 
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/93422#c20285
Commit summary:

Revert r90286 for FCKeditor. I'm not sure why this broke the extension, but it 
did.

Comment:

Sounds precisely about right.
JavaScript works like all other C-style languages and uses `} else if {`... 
Which I guess originated with the if implicitly applying to the else as if `if 
( ... ) { ... } else if ( ... ) { ... }` was interpreted like `if ( ... ) { ... 
} else { if ( ... ) { ... } }` same functional purpose, same if/else parsing, 
no special elseif handling... I could be wrong of course that's just a guess.
PHP however is the ugly duck. Technically `} else if {` is supposed to work, 
likely due to what I just mentioned of how elseif functions the same as if you 
put an if inside the else. However supposedly php does this inefficiently (it 
could be a myth, but php has never really done things sanely) and the elseif 
construct is faster than else if and is preferred to use.
I suppose elseif also plays an important role in php's alternative conditional 
syntax `if ( ... ): endif;` since you can't have `else if:` only `elseif:` 
works.

This code can actually be un-reverted if you make sure to keep the `elseif` -> 
`else if` change inside trunk/extensions/FCKeditor/FCKeditor.body.php which 
appears to be the only JS in this diff.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to