From 73e83a48b990bc598a268cdf57e4f981a5e17895 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 7 Jan 2012 03:46:54 +0000 Subject: [PATCH] * Fixed bogus dollar signs left in $tmpGlobals array keys in r108300. * Various documentation cleanups. --- includes/filerepo/backend/FileBackend.php | 5 +++++ .../filerepo/backend/lockmanager/DBLockManager.php | 1 + .../filerepo/backend/lockmanager/FSLockManager.php | 11 ++++++++++- .../filerepo/backend/lockmanager/LSLockManager.php | 1 + tests/phpunit/includes/parser/NewParserTest.php | 1 - tests/phpunit/suites/UploadFromUrlTestSuite.php | 14 +++++++------- 6 files changed, 24 insertions(+), 9 deletions(-) diff --git a/includes/filerepo/backend/FileBackend.php b/includes/filerepo/backend/FileBackend.php index 35f74a0080..2a8bb8d94f 100644 --- a/includes/filerepo/backend/FileBackend.php +++ b/includes/filerepo/backend/FileBackend.php @@ -527,6 +527,7 @@ abstract class FileBackend extends FileBackendBase { /** * Create a file in the backend with the given contents. * Do not call this function from places outside FileBackend and FileOp. + * * $params include: * content : the raw file contents * dst : destination storage path @@ -549,6 +550,7 @@ abstract class FileBackend extends FileBackendBase { /** * Store a file into the backend from a file on disk. * Do not call this function from places outside FileBackend and FileOp. + * * $params include: * src : source path on disk * dst : destination storage path @@ -571,6 +573,7 @@ abstract class FileBackend extends FileBackendBase { /** * Copy a file from one storage path to another in the backend. * Do not call this function from places outside FileBackend and FileOp. + * * $params include: * src : source storage path * dst : destination storage path @@ -593,6 +596,7 @@ abstract class FileBackend extends FileBackendBase { /** * Delete a file at the storage path. * Do not call this function from places outside FileBackend and FileOp. + * * $params include: * src : source storage path * ignoreMissingSource : do nothing if the source file does not exist @@ -614,6 +618,7 @@ abstract class FileBackend extends FileBackendBase { /** * Move a file from one storage path to another in the backend. * Do not call this function from places outside FileBackend and FileOp. + * * $params include: * src : source storage path * dst : destination storage path diff --git a/includes/filerepo/backend/lockmanager/DBLockManager.php b/includes/filerepo/backend/lockmanager/DBLockManager.php index 3110d5b1d1..ac9c0791d6 100644 --- a/includes/filerepo/backend/lockmanager/DBLockManager.php +++ b/includes/filerepo/backend/lockmanager/DBLockManager.php @@ -32,6 +32,7 @@ class DBLockManager extends LockManager { /** * Construct a new instance from configuration. + * * $config paramaters include: * 'dbServers' : Associative array of DB names to server configuration. * Configuration is an associative array that includes: diff --git a/includes/filerepo/backend/lockmanager/FSLockManager.php b/includes/filerepo/backend/lockmanager/FSLockManager.php index beb708715c..be5fda9b62 100644 --- a/includes/filerepo/backend/lockmanager/FSLockManager.php +++ b/includes/filerepo/backend/lockmanager/FSLockManager.php @@ -5,7 +5,7 @@ * All locks are non-blocking, which avoids deadlocks. * * This should work fine for small sites running off one server. - * Do not use this with 'lockDir' set to an NFS mount unless the + * Do not use this with 'lockDirectory' set to an NFS mount unless the * NFS client is at least version 2.6.12. Otherwise, the BSD flock() * locks will be ignored; see http://nfs.sourceforge.net/#section_d. * @@ -24,7 +24,16 @@ class FSLockManager extends LockManager { /** @var Array Map of (locked key => lock type => lock file handle) */ protected $handles = array(); + /** + * Construct a new instance from configuration. + * + * $config includes: + * 'lockDirectory' : Directory containing the lock files + * + * @param array $config + */ function __construct( array $config ) { + parent::__construct( $config ); $this->lockDir = $config['lockDirectory']; } diff --git a/includes/filerepo/backend/lockmanager/LSLockManager.php b/includes/filerepo/backend/lockmanager/LSLockManager.php index 45ccaaeb55..383c77c53a 100644 --- a/includes/filerepo/backend/lockmanager/LSLockManager.php +++ b/includes/filerepo/backend/lockmanager/LSLockManager.php @@ -33,6 +33,7 @@ class LSLockManager extends LockManager { /** * Construct a new instance from configuration. + * * $config paramaters include: * 'lockServers' : Associative array of server names to configuration. * Configuration is an associative array that includes: diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 7a0299bac8..c4ccececde 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -243,7 +243,6 @@ class NewParserTest extends MediaWikiTestCase { 'containerPaths' => array( 'local-public' => "$this->uploadDir", 'local-thumb' => "$this->uploadDir/thumb", - 'local-temp' => "$this->uploadDir/temp", ) ) ) ), diff --git a/tests/phpunit/suites/UploadFromUrlTestSuite.php b/tests/phpunit/suites/UploadFromUrlTestSuite.php index 7b0b8e990d..5f82b5272b 100644 --- a/tests/phpunit/suites/UploadFromUrlTestSuite.php +++ b/tests/phpunit/suites/UploadFromUrlTestSuite.php @@ -22,13 +22,13 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite { $tmpGlobals = array(); - $tmpGlobals['$wgScript'] = '/index.php'; - $tmpGlobals['$wgScriptPath'] = '/'; - $tmpGlobals['$wgArticlePath'] = '/wiki/$1'; - $tmpGlobals['$wgStyleSheetPath'] = '/skins'; - $tmpGlobals['$wgStylePath'] = '/skins'; - $tmpGlobals['$wgThumbnailScriptPath'] = false; - $tmpGlobals['$wgLocalFileRepo'] = array( + $tmpGlobals['wgScript'] = '/index.php'; + $tmpGlobals['wgScriptPath'] = '/'; + $tmpGlobals['wgArticlePath'] = '/wiki/$1'; + $tmpGlobals['wgStyleSheetPath'] = '/skins'; + $tmpGlobals['wgStylePath'] = '/skins'; + $tmpGlobals['wgThumbnailScriptPath'] = false; + $tmpGlobals['wgLocalFileRepo'] = array( 'class' => 'LocalRepo', 'name' => 'local', 'url' => 'http://example.com/images', -- 2.20.1