dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
StringUtils: Clarify that isValidRegex is for PCRE regexps
[lhc/web/wiklou.git]
/
maintenance
/
updateDoubleWidthSearch.php
diff --git
a/maintenance/updateDoubleWidthSearch.php
b/maintenance/updateDoubleWidthSearch.php
index
796cedd
..
d28ae27
100644
(file)
--- a/
maintenance/updateDoubleWidthSearch.php
+++ b/
maintenance/updateDoubleWidthSearch.php
@@
-1,6
+1,6
@@
<?php
/**
<?php
/**
- * Normalize double-byte
l
atin UTF-8 characters
+ * Normalize double-byte
L
atin UTF-8 characters
*
* Usage: php updateDoubleWidthSearch.php
*
*
* Usage: php updateDoubleWidthSearch.php
*
@@
-26,7
+26,7
@@
require_once __DIR__ . '/Maintenance.php';
/**
require_once __DIR__ . '/Maintenance.php';
/**
- * Maintenance script to normalize double-byte
l
atin UTF-8 characters.
+ * Maintenance script to normalize double-byte
L
atin UTF-8 characters.
*
* @ingroup Maintenance
*/
*
* @ingroup Maintenance
*/
@@
-34,7
+34,7
@@
class UpdateDoubleWidthSearch extends Maintenance {
public function __construct() {
parent::__construct();
public function __construct() {
parent::__construct();
- $this->
mDescription = "Script to normalize double-byte latin UTF-8 characters"
;
+ $this->
addDescription( 'Script to normalize double-byte Latin UTF-8 characters' )
;
$this->addOption( 'q', 'quiet', false, true );
$this->addOption(
'l',
$this->addOption( 'q', 'quiet', false, true );
$this->addOption(
'l',
@@
-51,13
+51,13
@@
class UpdateDoubleWidthSearch extends Maintenance {
public function execute() {
$maxLockTime = $this->getOption( 'l', 20 );
public function execute() {
$maxLockTime = $this->getOption( 'l', 20 );
- $dbw =
wfG
etDB( DB_MASTER );
+ $dbw =
$this->g
etDB( DB_MASTER );
if ( $dbw->getType() !== 'mysql' ) {
if ( $dbw->getType() !== 'mysql' ) {
- $this->
error( "This change is only needed on MySQL, quitting.\n", true
);
+ $this->
fatalError( "This change is only needed on MySQL, quitting.\n"
);
}
$res = $this->findRows( $dbw );
}
$res = $this->findRows( $dbw );
- $this->updateSearchIndex( $maxLockTime,
array( $this, 'searchIndexUpdateCallback' )
, $dbw, $res );
+ $this->updateSearchIndex( $maxLockTime,
[ $this, 'searchIndexUpdateCallback' ]
, $dbw, $res );
$this->output( "Done\n" );
}
$this->output( "Done\n" );
}
@@
-77,5
+77,5
@@
class UpdateDoubleWidthSearch extends Maintenance {
}
}
}
}
-$maintClass =
"UpdateDoubleWidthSearch"
;
+$maintClass =
UpdateDoubleWidthSearch::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;