r108304 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108303‎ | r108304 | r108305 >
Date:03:46, 7 January 2012
Author:aaron
Status:ok
Tags:
Comment:
* Fixed bogus dollar signs left in $tmpGlobals array keys in r108300.
* Various documentation cleanups.
Modified paths:
  • /trunk/phase3/includes/filerepo/backend/FileBackend.php (modified) (history)
  • /trunk/phase3/includes/filerepo/backend/lockmanager/DBLockManager.php (modified) (history)
  • /trunk/phase3/includes/filerepo/backend/lockmanager/FSLockManager.php (modified) (history)
  • /trunk/phase3/includes/filerepo/backend/lockmanager/LSLockManager.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/suites/UploadFromUrlTestSuite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php
@@ -243,7 +243,6 @@
244244 'containerPaths' => array(
245245 'local-public' => "$this->uploadDir",
246246 'local-thumb' => "$this->uploadDir/thumb",
247 - 'local-temp' => "$this->uploadDir/temp",
248247 )
249248 ) )
250249 ),
Index: trunk/phase3/tests/phpunit/suites/UploadFromUrlTestSuite.php
@@ -22,13 +22,13 @@
2323
2424 $tmpGlobals = array();
2525
26 - $tmpGlobals['$wgScript'] = '/index.php';
27 - $tmpGlobals['$wgScriptPath'] = '/';
28 - $tmpGlobals['$wgArticlePath'] = '/wiki/$1';
29 - $tmpGlobals['$wgStyleSheetPath'] = '/skins';
30 - $tmpGlobals['$wgStylePath'] = '/skins';
31 - $tmpGlobals['$wgThumbnailScriptPath'] = false;
32 - $tmpGlobals['$wgLocalFileRepo'] = array(
 26+ $tmpGlobals['wgScript'] = '/index.php';
 27+ $tmpGlobals['wgScriptPath'] = '/';
 28+ $tmpGlobals['wgArticlePath'] = '/wiki/$1';
 29+ $tmpGlobals['wgStyleSheetPath'] = '/skins';
 30+ $tmpGlobals['wgStylePath'] = '/skins';
 31+ $tmpGlobals['wgThumbnailScriptPath'] = false;
 32+ $tmpGlobals['wgLocalFileRepo'] = array(
3333 'class' => 'LocalRepo',
3434 'name' => 'local',
3535 'url' => 'http://example.com/images',
Index: trunk/phase3/includes/filerepo/backend/lockmanager/DBLockManager.php
@@ -32,6 +32,7 @@
3333
3434 /**
3535 * Construct a new instance from configuration.
 36+ *
3637 * $config paramaters include:
3738 * 'dbServers' : Associative array of DB names to server configuration.
3839 * Configuration is an associative array that includes:
Index: trunk/phase3/includes/filerepo/backend/lockmanager/FSLockManager.php
@@ -5,7 +5,7 @@
66 * All locks are non-blocking, which avoids deadlocks.
77 *
88 * This should work fine for small sites running off one server.
9 - * Do not use this with 'lockDir' set to an NFS mount unless the
 9+ * Do not use this with 'lockDirectory' set to an NFS mount unless the
1010 * NFS client is at least version 2.6.12. Otherwise, the BSD flock()
1111 * locks will be ignored; see http://nfs.sourceforge.net/#section_d.
1212 *
@@ -24,7 +24,16 @@
2525 /** @var Array Map of (locked key => lock type => lock file handle) */
2626 protected $handles = array();
2727
 28+ /**
 29+ * Construct a new instance from configuration.
 30+ *
 31+ * $config includes:
 32+ * 'lockDirectory' : Directory containing the lock files
 33+ *
 34+ * @param array $config
 35+ */
2836 function __construct( array $config ) {
 37+ parent::__construct( $config );
2938 $this->lockDir = $config['lockDirectory'];
3039 }
3140
Index: trunk/phase3/includes/filerepo/backend/lockmanager/LSLockManager.php
@@ -33,6 +33,7 @@
3434
3535 /**
3636 * Construct a new instance from configuration.
 37+ *
3738 * $config paramaters include:
3839 * 'lockServers' : Associative array of server names to configuration.
3940 * Configuration is an associative array that includes:
Index: trunk/phase3/includes/filerepo/backend/FileBackend.php
@@ -527,6 +527,7 @@
528528 /**
529529 * Create a file in the backend with the given contents.
530530 * Do not call this function from places outside FileBackend and FileOp.
 531+ *
531532 * $params include:
532533 * content : the raw file contents
533534 * dst : destination storage path
@@ -549,6 +550,7 @@
550551 /**
551552 * Store a file into the backend from a file on disk.
552553 * Do not call this function from places outside FileBackend and FileOp.
 554+ *
553555 * $params include:
554556 * src : source path on disk
555557 * dst : destination storage path
@@ -571,6 +573,7 @@
572574 /**
573575 * Copy a file from one storage path to another in the backend.
574576 * Do not call this function from places outside FileBackend and FileOp.
 577+ *
575578 * $params include:
576579 * src : source storage path
577580 * dst : destination storage path
@@ -593,6 +596,7 @@
594597 /**
595598 * Delete a file at the storage path.
596599 * Do not call this function from places outside FileBackend and FileOp.
 600+ *
597601 * $params include:
598602 * src : source storage path
599603 * ignoreMissingSource : do nothing if the source file does not exist
@@ -614,6 +618,7 @@
615619 /**
616620 * Move a file from one storage path to another in the backend.
617621 * Do not call this function from places outside FileBackend and FileOp.
 622+ *
618623 * $params include:
619624 * src : source storage path
620625 * dst : destination storage path

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108300In FileBackend/FileOp:...aaron01:33, 7 January 2012

Status & tagging log