mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-23 22:33:48 +00:00
build: Updating mediawiki/mediawiki-phan-config to 0.9.0
Depends-On: I76cbaf355462a41aec40d239577123de6b04223a Change-Id: I7780d46c2828947cf753ea2390d3b1dd645b6758
This commit is contained in:
parent
6332b4497d
commit
3fe88580cb
|
@ -4,7 +4,7 @@
|
|||
"mediawiki/mediawiki-codesniffer": "28.0.0",
|
||||
"jakub-onderka/php-console-highlighter": "0.3.2",
|
||||
"mediawiki/minus-x": "0.3.2",
|
||||
"mediawiki/mediawiki-phan-config": "0.8.0"
|
||||
"mediawiki/mediawiki-phan-config": "0.9.0"
|
||||
},
|
||||
"scripts": {
|
||||
"fix": [
|
||||
|
|
|
@ -32,7 +32,7 @@ class ReplaceTextJob extends Job {
|
|||
* @param Title $title
|
||||
* @param array|bool $params Cannot be === true
|
||||
*/
|
||||
function __construct( $title, $params = '' ) {
|
||||
function __construct( $title, $params = [] ) {
|
||||
parent::__construct( 'replaceText', $title, $params );
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ class ReplaceTextSearch {
|
|||
/**
|
||||
* @param string $search
|
||||
* @param array $namespaces
|
||||
* @param string $category
|
||||
* @param string $prefix
|
||||
* @param string|null $category
|
||||
* @param string|null $prefix
|
||||
* @param bool $use_regex
|
||||
* @return IResultWrapper Resulting rows
|
||||
*/
|
||||
|
@ -65,7 +65,7 @@ class ReplaceTextSearch {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $category
|
||||
* @param string|null $category
|
||||
* @param array &$tables
|
||||
* @param array &$conds
|
||||
*/
|
||||
|
@ -79,7 +79,7 @@ class ReplaceTextSearch {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $prefix
|
||||
* @param string|null $prefix
|
||||
* @param array &$conds
|
||||
*/
|
||||
public static function prefixCondition( $prefix, &$conds ) {
|
||||
|
@ -93,6 +93,7 @@ class ReplaceTextSearch {
|
|||
$prefix = $title->getDbKey();
|
||||
}
|
||||
$any = $dbr->anyString();
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable strval makes this non-null
|
||||
$conds[] = 'page_title ' . $dbr->buildLike( $prefix, $any );
|
||||
}
|
||||
|
||||
|
@ -114,8 +115,8 @@ class ReplaceTextSearch {
|
|||
/**
|
||||
* @param string $str
|
||||
* @param array $namespaces
|
||||
* @param string $category
|
||||
* @param string $prefix
|
||||
* @param string|null $category
|
||||
* @param string|null $prefix
|
||||
* @param bool $use_regex
|
||||
* @return IResultWrapper Resulting rows
|
||||
*/
|
||||
|
|
|
@ -272,10 +272,10 @@ class SpecialReplaceText extends SpecialPage {
|
|||
foreach ( $request->getValues() as $key => $value ) {
|
||||
if ( $value == '1' && $key !== 'replace' && $key !== 'use_regex' ) {
|
||||
if ( strpos( $key, 'move-' ) !== false ) {
|
||||
$title = Title::newFromID( substr( $key, 5 ) );
|
||||
$title = Title::newFromID( (int)substr( $key, 5 ) );
|
||||
$replacement_params['move_page'] = true;
|
||||
} else {
|
||||
$title = Title::newFromID( $key );
|
||||
$title = Title::newFromID( (int)$key );
|
||||
}
|
||||
if ( $title !== null ) {
|
||||
$jobs[] = new ReplaceTextJob( $title, $replacement_params );
|
||||
|
|
Loading…
Reference in a new issue