backend: this.backend,
authMechanism: this.authMechanism,
backendOptions: this.backendOptions,
- origin: 'settings'
+ testOnly: true
};
if (this.id) {
data.id = this.id;
$.ajax({
type: 'GET',
url: OC.generateUrl(this._url + '/{id}', {id: this.id}),
- data: {'origin': 'settings'},
+ data: {'testOnly': true},
success: options.success,
error: options.error
});
$.ajax({
type: 'GET',
url: OC.generateUrl('apps/files_external/userglobalstorages'),
- data: {'origin' : 'settings'},
+ data: {'testOnly' : true},
contentType: 'application/json',
success: function(result) {
var onCompletion = jQuery.Deferred();
defObj = $.ajax({
type: 'GET',
url: OC.webroot + '/index.php/apps/files_external/' + ((mountData.type === 'personal') ? 'userstorages' : 'userglobalstorages') + '/' + mountData.id,
- data: {'origin' : 'statusmanager'},
+ data: {'testOnly' : false},
success: function (response) {
if (response && response.status === 0) {
self.mountStatus[mountData.mount_point] = response;
$applicableUsers,
$applicableGroups,
$priority,
- $origin = null
+ $testOnly = null
) {
$storage = $this->createStorage(
$mountPoint,
);
}
- $this->updateStorageStatus($storage, $origin);
+ $this->updateStorageStatus($storage, $testOnly);
return new DataResponse(
$storage,
*
* @param StorageConfig $storage storage configuration
*/
- protected function updateStorageStatus(StorageConfig &$storage, $origin = null) {
+ protected function updateStorageStatus(StorageConfig &$storage, $testOnly = null) {
try {
$this->manipulateStorageConfig($storage);
$backend->getStorageClass(),
$storage->getBackendOptions(),
false,
- $origin
+ $testOnly
)
);
} catch (InsufficientDataForMeaningfulAnswerException $e) {
*
* @return DataResponse
*/
- public function show($id, $origin = null) {
+ public function show($id, $testOnly = null) {
try {
$storage = $this->service->getStorage($id);
- $this->updateStorageStatus($storage, $origin);
+ $this->updateStorageStatus($storage, $testOnly);
} catch (NotFoundException $e) {
return new DataResponse(
[
*
* @NoAdminRequired
*/
- public function show($id, $origin = null) {
+ public function show($id, $testOnly = null) {
try {
$storage = $this->service->getStorage($id);
- $this->updateStorageStatus($storage, $origin);
+ $this->updateStorageStatus($storage, $testOnly);
} catch (NotFoundException $e) {
return new DataResponse(
[
public function update(
$id,
$backendOptions,
- $origin = null
+ $testOnly = null
) {
try {
$storage = $this->service->getStorage($id);
);
}
- $this->updateStorageStatus($storage);
+ $this->updateStorageStatus($storage, $testOnly);
$this->sanitizeStorage($storage);
return new DataResponse(
*
* {@inheritdoc}
*/
- public function show($id, $origin = null) {
- return parent::show($id, $origin);
+ public function show($id, $testOnly = null) {
+ return parent::show($id, $testOnly);
}
/**
$authMechanism,
$backendOptions,
$mountOptions,
- $origin = null
+ $testOnly = null
) {
$storage = $this->createStorage(
$mountPoint,
);
}
- $this->updateStorageStatus($storage, $origin);
+ $this->updateStorageStatus($storage, $testOnly);
return new DataResponse(
$storage,
* @return int see self::STATUS_*
* @throws Exception
*/
- public static function getBackendStatus($class, $options, $isPersonal, $origin = null) {
+ public static function getBackendStatus($class, $options, $isPersonal, $testOnly = null) {
if (self::$skipTest) {
return StorageNotAvailableException::STATUS_SUCCESS;
}
$storage = new $class($options);
try {
- $result = $storage->test($isPersonal, $origin);
+ $result = $storage->test($isPersonal, $testOnly);
$storage->setAvailability($result);
if ($result) {
return StorageNotAvailableException::STATUS_SUCCESS;