*/
private function lockSearchindex( $db ) {
$write = array( 'searchindex' );
- $read = array( 'page', 'revision', 'text', 'interwiki', 'l10n_cache', 'user', 'page_restrictions' );
+ $read = array(
+ 'page',
+ 'revision',
+ 'text',
+ 'interwiki',
+ 'l10n_cache',
+ 'user',
+ 'page_restrictions'
+ );
$db->lockTables( $read, $write, __CLASS__ . '::' . __METHOD__ );
}
* is thrown.
*
* @param string $id The revision id to get the text for
- * @param string|bool|null $model The content model used to determine applicable export transformations.
- * If $model is null, it will be determined from the database.
+ * @param string|bool|null $model The content model used to determine
+ * applicable export transformations.
+ * If $model is null, it will be determined from the database.
* @param string|null $format The content format used when applying export transformations.
*
* @throws MWException
class CheckComposerLockUpToDate extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = 'Checks whether your composer.lock file is up to date with the current composer.json';
+ $this->mDescription =
+ 'Checks whether your composer.lock file is up to date with the current composer.json';
}
public function execute() {
// Maybe they're using mediawiki/vendor?
$lockLocation = "$IP/vendor/composer.lock";
if ( !file_exists( $lockLocation ) ) {
- $this->error( 'Could not find composer.lock file. Have you run "composer install"?', 1 );
+ $this->error(
+ 'Could not find composer.lock file. Have you run "composer install"?',
+ 1
+ );
}
}
foreach ( $json->getRequiredDependencies() as $name => $version ) {
if ( isset( $installed[$name] ) ) {
if ( $installed[$name]['version'] !== $version ) {
- $this->output( "$name: {$installed[$name]['version']} installed, $version required.\n" );
+ $this->output(
+ "$name: {$installed[$name]['version']} installed, $version required.\n"
+ );
$found = true;
}
} else {
}
}
if ( $found ) {
- $this->error( 'Error: your composer.lock file is not up to date, run "composer update" to install newer dependencies', 1 );
+ $this->error(
+ 'Error: your composer.lock file is not up to date. ' .
+ 'Run "composer update" to install newer dependencies',
+ 1
+ );
} else {
- // The hash is the entire composer.json file, so it can be updated without any of the dependencies changing
+ // The hash is the entire composer.json file,
+ // so it can be updated without any of the dependencies changing
// We couldn't find any out-of-date dependencies, so assume everything is ok!
$this->output( "Your composer.lock file is up to date with current dependencies!\n" );
}
class FetchText extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Fetch the raw revision blob from an old_id.";
- $this->mDescription .= "\nNOTE: Export transformations are NOT applied. This is left to backupTextPass.php";
+ $this->mDescription = "Fetch the raw revision blob from an old_id.\n" .
+ "NOTE: Export transformations are NOT applied. " .
+ "This is left to backupTextPass.php";
}
/**
$retval = array();
while ( true ) {
- $json = Http::get( wfAppendQuery( 'http://www.mediawiki.org/w/api.php', $params ), array(), __METHOD__ );
+ $json = Http::get(
+ wfAppendQuery( 'http://www.mediawiki.org/w/api.php', $params ),
+ array(),
+ __METHOD__
+ );
$data = FormatJson::decode( $json, true );
foreach ( $data['query']['categorymembers'] as $page ) {
if ( preg_match( '/Manual\:Hooks\/([a-zA-Z0-9- :]+)/', $page['title'], $m ) ) {