$status = $this->storeBatch( [ [ $srcPath, $dstZone, $dstRel ] ], $flags );
if ( $status->successCount == 0 ) {
- $status->ok = false;
+ $status->setOK( false );
}
return $status;
$status = $this->publishBatch(
[ [ $src, $dstRel, $archiveRel, $options ] ], $flags );
if ( $status->successCount == 0 ) {
- $status->ok = false;
+ $status->setOK( false );
}
if ( isset( $status->value[0] ) ) {
$status->value = $status->value[0];
/** @var array */
protected $fileFromRowFactory = [ 'ForeignDBFile', 'newFromRow' ];
+ /** @var bool */
+ protected $hasSharedCache;
+
/**
* @param array|null $info
*/
*/
function pageCount() {
if ( !isset( $this->pageCount ) ) {
+ // @FIXME: callers expect File objects
if ( $this->getHandler() && $this->handler->isMultiPage( $this ) ) {
$this->pageCount = $this->handler->pageCount( $this );
} else {
* @ingroup FileAbstraction
*/
class ForeignAPIFile extends File {
+ /** @var bool */
private $mExists;
+ /** @var array */
+ private $mInfo = [];
protected $repoClass = 'ForeignApiRepo';
public function getUser( $type = 'text' ) {
if ( $type == 'text' ) {
return isset( $this->mInfo['user'] ) ? strval( $this->mInfo['user'] ) : null;
- } elseif ( $type == 'id' ) {
+ } else {
return 0; // What makes sense here, for a remote user?
}
}
return $files;
}
- /**
- * @see File::purgeCache()
- */
function purgeCache( $options = [] ) {
$this->purgeThumbnails( $options );
$this->purgeDescriptionPage();
);
if ( isset( $status->value['revision'] ) ) {
+ /** @var $rev Revision */
+ $rev = $status->value['revision'];
// Associate new page revision id
- $logEntry->setAssociatedRevId( $status->value['revision']->getId() );
+ $logEntry->setAssociatedRevId( $rev->getId() );
}
// This relies on the resetArticleID() call in WikiPage::insertOn(),
// which is triggered on $descTitle by doEditContent() above.
// Even if some files could be copied, fail entirely as that is the
// easiest thing to do without data loss
$this->cleanupFailedBatch( $storeStatus, $storeBatch );
- $status->ok = false;
+ $status->setOk( false );
$this->file->unlock();
return $status;
if ( !$statusDb->isGood() ) {
$destFile->unlock();
$this->file->unlock();
- $statusDb->ok = false;
+ $statusDb->setOK( false );
return $statusDb;
}
$this->file->unlock();
wfDebugLog( 'imagemove', "Error in moving files: "
. $statusMove->getWikiText( false, false, 'en' ) );
- $statusMove->ok = false;
+ $statusMove->setOK( false );
return $statusMove;
}