From: MatmaRex Date: Sat, 18 May 2013 19:46:32 +0000 (+0200) Subject: updateCollation.php: sanity check the collation before proceeding X-Git-Tag: 1.31.0-rc.0~19278^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=c9e8cffc810bfa84463010f378efeda3bcf73a17;p=lhc%2Fweb%2Fwiklou.git updateCollation.php: sanity check the collation before proceeding In some cases the constructor will work, but trying to access first letter data will raise an exception, breaking all category pages. Bug: 46615 Change-Id: I77de040f97080653fe0d1734d38490eaa2d322db --- diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index b847c23b05..964b3138d7 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -82,6 +82,10 @@ TEXT; $collation = Collation::singleton(); } + // Collation sanity check: in some cases the constructor will work, + // but this will raise an exception, breaking all category pages + $collation->getFirstLetter( 'MediaWiki' ); + $options = array( 'LIMIT' => self::BATCH_SIZE, 'ORDER BY' => 'cl_to, cl_type, cl_from',