$this->addDescription( <<<TEXT
This script will find all rows in the categorylinks table whose collation is
$this->addDescription( <<<TEXT
This script will find all rows in the categorylinks table whose collation is
using the page title and cl_sortkey_prefix. If all collations are
up-to-date, it will do nothing.
TEXT
using the page title and cl_sortkey_prefix. If all collations are
up-to-date, it will do nothing.
TEXT
$dbw = $this->getDB( DB_MASTER );
$dbr = $this->getDB( DB_REPLICA );
$force = $this->getOption( 'force' );
$dbw = $this->getDB( DB_MASTER );
$dbr = $this->getDB( DB_REPLICA );
$force = $this->getOption( 'force' );
$collationName = $this->getOption( 'target-collation' );
$collation = Collation::factory( $collationName );
} else {
$collationName = $this->getOption( 'target-collation' );
$collation = Collation::factory( $collationName );
} else {
if ( $this->hasOption( 'previous-collation' ) ) {
$collationConds['cl_collation'] = $this->getOption( 'previous-collation' );
} else {
if ( $this->hasOption( 'previous-collation' ) ) {
$collationConds['cl_collation'] = $this->getOption( 'previous-collation' );
} else {
}
# cl_type will be wrong for lots of pages if cl_collation is 0,
# so let's update it while we're here.
}
# cl_type will be wrong for lots of pages if cl_collation is 0,
# so let's update it while we're here.
for ( $coarseIndex = 0; $coarseIndex < $numBins - 1; $coarseIndex++ ) {
if ( $coarseBoundaries[$coarseIndex] > $i ) {
$coarseHistogram[$coarseIndex] += $val;
for ( $coarseIndex = 0; $coarseIndex < $numBins - 1; $coarseIndex++ ) {
if ( $coarseBoundaries[$coarseIndex] > $i ) {
$coarseHistogram[$coarseIndex] += $val;
$boundary = $coarseBoundaries[$coarseIndex];
$this->output( sprintf( "%-10s %-10d |%s\n",
$prevBoundary . '-' . ( $boundary - 1 ) . ': ',
$boundary = $coarseBoundaries[$coarseIndex];
$this->output( sprintf( "%-10s %-10d |%s\n",
$prevBoundary . '-' . ( $boundary - 1 ) . ': ',