mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-23 22:33:48 +00:00
Add phan configuration
Change-Id: I405d1d86e43c99fbaecf027461781bf57110421e
This commit is contained in:
parent
7efd765c85
commit
efd15f5058
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@
|
|||
node_modules/
|
||||
vendor/
|
||||
composer.lock
|
||||
tests/phan/issues
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
"jakub-onderka/php-parallel-lint": "1.0.0",
|
||||
"mediawiki/mediawiki-codesniffer": "18.0.0",
|
||||
"jakub-onderka/php-console-highlighter": "0.3.2",
|
||||
"mediawiki/minus-x": "0.3.1"
|
||||
"mediawiki/minus-x": "0.3.1",
|
||||
"mediawiki/mediawiki-phan-config": "0.2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"fix": [
|
||||
|
|
|
@ -31,7 +31,7 @@ class ReplaceTextHooks {
|
|||
* Adds a link to the Special:ReplaceText page at the end of a successful
|
||||
* regular page move message.
|
||||
*
|
||||
* @param FormLayout &$form MovePageForm
|
||||
* @param MovePageForm &$form
|
||||
* @param Title &$ot Title object of the old article (moved from)
|
||||
* @param Title &$nt Title object of the new article (moved to)
|
||||
*/
|
||||
|
|
|
@ -55,12 +55,7 @@ class ReplaceTextJob extends Job {
|
|||
$create_redirect = $this->params['create_redirect'];
|
||||
$this->title->moveTo( $new_title, true, $reason, $create_redirect );
|
||||
if ( $this->params['watch_page'] ) {
|
||||
if ( class_exists( 'WatchAction' ) ) {
|
||||
// Class was added in MW 1.19
|
||||
WatchAction::doWatch( $new_title, $wgUser );
|
||||
} else {
|
||||
Action::factory( 'watch', new WikiPage( $new_title ) )->execute();
|
||||
}
|
||||
WatchAction::doWatch( $new_title, $wgUser );
|
||||
}
|
||||
$wgUser = $actual_user;
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
|
||||
use Wikimedia\Rdbms\Database;
|
||||
use Wikimedia\Rdbms\DatabasePostgres;
|
||||
use Wikimedia\Rdbms\IResultWrapper;
|
||||
|
||||
class ReplaceTextSearch {
|
||||
|
||||
/**
|
||||
|
@ -69,7 +73,7 @@ class ReplaceTextSearch {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \Wikimedia\Rdbms\Database $dbr
|
||||
* @param Database $dbr
|
||||
* @param string $column
|
||||
* @param string $regex
|
||||
* @return string query condition for regex
|
||||
|
|
|
@ -23,7 +23,7 @@ class SpecialReplaceText extends SpecialPage {
|
|||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @param null|string $query
|
||||
*/
|
||||
function execute( $query ) {
|
||||
global $wgCompressRevisions, $wgExternalStores;
|
||||
|
|
19
tests/phan/config.php
Normal file
19
tests/phan/config.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
$cfg = require __DIR__ . '/../../vendor/mediawiki/mediawiki-phan-config/src/config.php';
|
||||
|
||||
$cfg['directory_list'] = array_merge(
|
||||
$cfg['directory_list'],
|
||||
[
|
||||
'./../../extensions/AdminLinks',
|
||||
]
|
||||
);
|
||||
|
||||
$cfg['exclude_analysis_directory_list'] = array_merge(
|
||||
$cfg['exclude_analysis_directory_list'],
|
||||
[
|
||||
'./../../extensions/AdminLinks',
|
||||
]
|
||||
);
|
||||
|
||||
return $cfg;
|
Loading…
Reference in a new issue