X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FMaintenance.php;h=e76426d01a690c0b92064abf51a78c961ca39d98;hb=d31af9bd38d52d7492d95e06d10da34cce6b779c;hp=b446cc12b7c67172ad1704013236f0a3db497cdb;hpb=13e8478a636f003ebf4e80f2db07a1be3f68e757;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index b446cc12b7..e76426d01a 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -23,7 +23,7 @@ // Bail on old versions of PHP, or if composer has not been run yet to install // dependencies. require_once __DIR__ . '/../includes/PHPVersionCheck.php'; -wfEntryPointCheck( 'cli' ); +wfEntryPointCheck( 'text' ); use MediaWiki\Shell\Shell; @@ -1669,7 +1669,6 @@ class FakeMaintenance extends Maintenance { protected $mSelf = "FakeMaintenanceScript"; public function execute() { - return; } } @@ -1700,13 +1699,9 @@ abstract class LoggedUpdateMaintenance extends Maintenance { return false; } - if ( $db->insert( 'updatelog', [ 'ul_key' => $key ], __METHOD__, 'IGNORE' ) ) { - return true; - } else { - $this->output( $this->updatelogFailedMessage() . "\n" ); + $db->insert( 'updatelog', [ 'ul_key' => $key ], __METHOD__, 'IGNORE' ); - return false; - } + return true; } /** @@ -1719,16 +1714,6 @@ abstract class LoggedUpdateMaintenance extends Maintenance { return "Update '{$key}' already logged as completed."; } - /** - * Message to show that the update log was unable to log the completion of this update - * @return string - */ - protected function updatelogFailedMessage() { - $key = $this->getUpdateKey(); - - return "Unable to log update '{$key}' as completed."; - } - /** * Do the actual work. All child classes will need to implement this. * Return true to log the update as done or false (usually on failure).