}
if ( $this->section != '' && $this->section != 'new' ) {
- $matches = array();
if ( !$this->summary && !$this->preview && !$this->diff ) {
$sectionTitle = self::extractSectionTitle( $this->textbox1 );
if ( $sectionTitle !== false ) {
function __construct( array $config ) {
parent::__construct( $config );
$this->containerPaths = (array)$config['containerPaths'];
- foreach ( $this->containerPaths as $container => &$path ) {
+ foreach ( $this->containerPaths as &$path ) {
if ( substr( $path, -1 ) === '/' ) {
$path = substr( $path, 0, -1 ); // remove trailing slash
}
if ( empty( $opts['nonLocking'] ) ) {
// Build up a list of files to lock...
$filesLockEx = $filesLockSh = array();
- foreach ( $performOps as $index => $fileOp ) {
+ foreach ( $performOps as $fileOp ) {
$filesLockSh = array_merge( $filesLockSh, $fileOp->storagePathsRead() );
$filesLockEx = array_merge( $filesLockEx, $fileOp->storagePathsChanged() );
}
// Set "files to lock" from the first batch so we don't try to set all
// locks two or three times over (depending on the number of backends).
// A lock on one storage path is a lock on all the backends.
- foreach ( $performOps as $index => $fileOp ) {
+ foreach ( $performOps as $fileOp ) {
$filesLockSh = array_merge( $filesLockSh, $fileOp->storagePathsRead() );
$filesLockEx = array_merge( $filesLockEx, $fileOp->storagePathsChanged() );
}
* @see FileBackendBase::getFileList()
*/
function getFileList( array $params ) {
- foreach ( $this->backends as $index => $backend ) {
+ foreach ( $this->backends as $backend ) {
# Get results from the first backend
$realParams = $this->substOpPaths( $params, $backend );
return $backend->getFileList( $realParams );
$votesLeft = count( $this->srvsByBucket[$bucket] ); // remaining peers
$quorum = floor( $votesLeft/2 + 1 ); // simple majority
// Get votes for each peer, in order, until we have enough...
- foreach ( $this->srvsByBucket[$bucket] as $index => $lockSrv ) {
+ foreach ( $this->srvsByBucket[$bucket] as $lockSrv ) {
// Attempt to acquire the lock on this peer
if ( !$this->doLockingRequest( $lockSrv, $paths, $type ) ) {
return 'cantacquire'; // vetoed; resource locked
*/
function __destruct() {
$this->releaseLocks();
- foreach ( $this->conns as $lockSrv => $conn ) {
+ foreach ( $this->conns as $conn ) {
fclose( $conn );
}
}
$out->addHTML( $this->getForm( '' ) );
return;
}
- $nt = $userObj->getUserPage();
- $id = $userObj->getID();
$target = $userObj->getName();
$out->addSubtitle( $this->getSubTitle( $userObj ) );