r74884 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74883‎ | r74884 | r74885 >
Date:08:59, 17 October 2010
Author:maxsem
Status:ok
Tags:
Comment:
Fix for r74849: use 'default' instead of 0 to indicate no memory-limit change.
Modified paths:
  • /trunk/phase3/maintenance/Maintenance.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/Maintenance.php
@@ -351,7 +351,7 @@
352352 $this->addOption( 'conf', 'Location of LocalSettings.php, if not default', false, true );
353353 $this->addOption( 'wiki', 'For specifying the wiki ID', false, true );
354354 $this->addOption( 'globals', 'Output globals at the end of processing for debugging' );
355 - $this->addOption( 'memory-limit', 'Set a specific memory limit for the script, -1 for no limit or 0 to avoid changing it' );
 355+ $this->addOption( 'memory-limit', 'Set a specific memory limit for the script, -1 for no limit or "default" to avoid changing it' );
356356 // If we support a DB, show the options
357357 if ( $this->getDbType() > 0 ) {
358358 $this->addOption( 'dbuser', 'The DB user to use for this script', false, true );
@@ -476,7 +476,7 @@
477477 * Adjusts PHP's memory limit to better suit our needs, if needed.
478478 */
479479 protected function adjustMemoryLimit() {
480 - if ( $this->memoryLimit() != 0 ) {
 480+ if ( $this->memoryLimit() != 'default' ) {
481481 ini_set( 'memory_limit', $this->memoryLimit() );
482482 }
483483 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74849Follow-up r74841:...maxsem18:33, 16 October 2010

Status & tagging log