* Various documentation cleanups.
/**
* 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
/**
* 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
/**
* 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
/**
* 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
/**
* 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
/**
* 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:
* 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.
*
/** @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'];
}
/**
* Construct a new instance from configuration.
+ *
* $config paramaters include:
* 'lockServers' : Associative array of server names to configuration.
* Configuration is an associative array that includes:
'containerPaths' => array(
'local-public' => "$this->uploadDir",
'local-thumb' => "$this->uploadDir/thumb",
- 'local-temp' => "$this->uploadDir/temp",
)
) )
),
$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',