private $repo;
/**
- * @param User|bool $user Default: false
+ * @param User|bool $user Default: false Sometimes this won't exist, as when running from cron.
* @param UploadStash|bool $stash Default: false
* @param FileRepo|bool $repo Default: false
*/
public function __construct( $user = false, $stash = false, $repo = false ) {
- // user object. sometimes this won't exist, as when running from cron.
- $this->user = $user;
-
if ( $repo ) {
$this->repo = $repo;
} else {
wfDebug( __METHOD__ . " creating new UploadStash instance with no user\n" );
}
- $this->stash = new UploadStash( $this->repo, $this->user );
+ $this->stash = new UploadStash( $this->repo, $user );
}
}