X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fupdate.php;h=182a2c4660aab0ee42ece1e7ab26304e2c4ac41d;hb=2acd18dd570dfb1cc3d0731a7c861453c0ca9b40;hp=a51564aff3af1a79d987a82bfcb9a5601a450152;hpb=6125d3fbf7bb046d2765d3ef058ea984871ca36c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/update.php b/maintenance/update.php index a51564aff3..182a2c4660 100755 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -26,7 +26,7 @@ * @ingroup Maintenance */ -if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '5.3.2' ) < 0 ) ) { +if ( !function_exists( 'version_compare' ) || ( version_compare( PHP_VERSION, '5.3.3' ) < 0 ) ) { require dirname( __FILE__ ) . '/../includes/PHPVersionError.php'; wfPHPVersionError( 'cli' ); } @@ -56,6 +56,10 @@ class UpdateMediaWiki extends Maintenance { true ); $this->addOption( 'force', 'Override when $wgAllowSchemaUpdates disables this script' ); + $this->addOption( + 'skip-external-dependencies', + 'Skips checking whether external dependencies are up to date, mostly for developers' + ); } function getDbType() { @@ -131,6 +135,16 @@ class UpdateMediaWiki extends Maintenance { wfCountdown( 5 ); } + // Check external dependencies are up to date + if ( !$this->hasOption( 'skip-external-dependencies' ) ) { + $composerLockUpToDate = $this->runChild( 'CheckComposerLockUpToDate' ); + $composerLockUpToDate->execute(); + } else { + $this->output( + "Skipping checking whether external dependencies are up to date, proceed at your own risk\n" + ); + } + # Attempt to connect to the database as a privileged user # This will vomit up an error if there are permissions problems $db = wfGetDB( DB_MASTER ); @@ -178,11 +192,12 @@ class UpdateMediaWiki extends Maintenance { } } + $updater->setFileAccess(); if ( !$this->hasOption( 'nopurge' ) ) { $updater->purgeCache(); } - $time2 = new MWTimestamp(); + $time2 = new MWTimestamp(); $timeDiff = $time2->diff( $time1 ); $this->output( "\nDone in " . $timeDiff->format( "%i:%S" ) . ".\n" ); }