updateCollation.php: fix PHP error
[lhc/web/wiklou.git] / maintenance / updateCollation.php
index 19fc54a..86e3f5e 100644 (file)
@@ -44,12 +44,11 @@ class UpdateCollation extends Maintenance {
        public function __construct() {
                parent::__construct();
 
-               global $wgCategoryCollation;
                $this->addDescription( <<<TEXT
 This script will find all rows in the categorylinks table whose collation is
-out-of-date (cl_collation != '$wgCategoryCollation') and repopulate cl_sortkey
-using the page title and cl_sortkey_prefix.  If all collations are
-up-to-date, it will do nothing.
+out-of-date (cl_collation is not the same as \$wgCategoryCollation) and
+repopulate cl_sortkey using the page title and cl_sortkey_prefix. If all
+collations are up-to-date, it will do nothing.
 TEXT
                );
 
@@ -70,8 +69,6 @@ TEXT
        }
 
        public function execute() {
-               global $wgCategoryCollation;
-
                $dbw = $this->getDB( DB_MASTER );
                $dbr = $this->getDB( DB_REPLICA );
                $force = $this->getOption( 'force' );
@@ -81,7 +78,7 @@ TEXT
                        $collationName = $this->getOption( 'target-collation' );
                        $collation = Collation::factory( $collationName );
                } else {
-                       $collationName = $wgCategoryCollation;
+                       $collationName = $this->getConfig()->get( 'CategoryCollation' );
                        $collation = Collation::singleton();
                }