X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FMaintenance.php;h=7825ce950dc5293059706404fd0bc8733f2aa000;hb=843a444b68d671ca19dfbffb77fb14a34ca4fa41;hp=e4ac4675564d61bb349d48cacb103b5e155059dd;hpb=4760e057bb2f4db09ca395ec43d0172c92a42e19;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index e4ac467556..7825ce950d 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -22,7 +22,9 @@ // Bail on old versions of PHP, or if composer has not been run yet to install // dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+. +// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( __FILE__ ) . '/../includes/PHPVersionCheck.php'; +// @codingStandardsIgnoreEnd wfEntryPointCheck( 'cli' ); /** @@ -460,7 +462,7 @@ abstract class Maintenance { } # Save additional script dependant options to display - # them separately in help + #  them separately in help $this->mDependantParameters = array_diff_key( $this->mParams, $this->mGenericParameters ); } @@ -957,10 +959,9 @@ abstract class Maintenance { $wgShowSQLErrors = true; - // @codingStandardsIgnoreStart Allow error suppression. wfSuppressWarnings() - // is not available. - @set_time_limit( 0 ); - // @codingStandardsIgnoreStart + MediaWiki\suppressWarnings(); + set_time_limit( 0 ); + MediaWiki\restoreWarnings(); $this->adjustMemoryLimit(); } @@ -1109,7 +1110,15 @@ abstract class Maintenance { */ 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__ ); }