Simplify the logic to decide whether to show "variant" and "noconvertlink" on Special...
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Mon, 22 Apr 2013 09:20:42 +0000 (11:20 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 24 Apr 2013 13:38:31 +0000 (13:38 +0000)
commit87840cb811dac42525b3d20cd26ab510e0a51d0f
tree35622769ae25f6f27216656c10f2baaab6ede2d1
parentedf169b44836ad9e778f787eb5fc414a40b058fe
Simplify the logic to decide whether to show "variant" and "noconvertlink" on Special:Preferences

- Group common checks; $wgDisableLangConversion and count( $variants ) only be need to be
  executed once to decide to show or not both fields
- Move the check for existence of multiple variant directly after calling getVariants(),
  so there is no need to run unnecessary code when a language doesn't have variants
- Move the declaration of $variantArray to where it will actually be used
- fix comment style

Change-Id: I2d621424904d0210336845cd82f96bb68a022514
includes/Preferences.php