Rename variable
This commit is contained in:
parent
8526bbb347
commit
110edd3d3c
|
@ -300,7 +300,7 @@ StorageConfig.prototype = {
|
|||
backend: this.backend,
|
||||
authMechanism: this.authMechanism,
|
||||
backendOptions: this.backendOptions,
|
||||
origin: 'settings'
|
||||
testOnly: true
|
||||
};
|
||||
if (this.id) {
|
||||
data.id = this.id;
|
||||
|
@ -327,7 +327,7 @@ StorageConfig.prototype = {
|
|||
$.ajax({
|
||||
type: 'GET',
|
||||
url: OC.generateUrl(this._url + '/{id}', {id: this.id}),
|
||||
data: {'origin': 'settings'},
|
||||
data: {'testOnly': true},
|
||||
success: options.success,
|
||||
error: options.error
|
||||
});
|
||||
|
@ -910,7 +910,7 @@ MountConfigListView.prototype = _.extend({
|
|||
$.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();
|
||||
|
|
|
@ -78,7 +78,7 @@ OCA.External.StatusManager = {
|
|||
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;
|
||||
|
|
|
@ -140,7 +140,7 @@ class GlobalStoragesController extends StoragesController {
|
|||
$applicableUsers,
|
||||
$applicableGroups,
|
||||
$priority,
|
||||
$origin = null
|
||||
$testOnly = null
|
||||
) {
|
||||
$storage = $this->createStorage(
|
||||
$mountPoint,
|
||||
|
@ -173,7 +173,7 @@ class GlobalStoragesController extends StoragesController {
|
|||
);
|
||||
}
|
||||
|
||||
$this->updateStorageStatus($storage, $origin);
|
||||
$this->updateStorageStatus($storage, $testOnly);
|
||||
|
||||
return new DataResponse(
|
||||
$storage,
|
||||
|
|
|
@ -238,7 +238,7 @@ abstract class StoragesController extends Controller {
|
|||
*
|
||||
* @param StorageConfig $storage storage configuration
|
||||
*/
|
||||
protected function updateStorageStatus(StorageConfig &$storage, $origin = null) {
|
||||
protected function updateStorageStatus(StorageConfig &$storage, $testOnly = null) {
|
||||
try {
|
||||
$this->manipulateStorageConfig($storage);
|
||||
|
||||
|
@ -250,7 +250,7 @@ abstract class StoragesController extends Controller {
|
|||
$backend->getStorageClass(),
|
||||
$storage->getBackendOptions(),
|
||||
false,
|
||||
$origin
|
||||
$testOnly
|
||||
)
|
||||
);
|
||||
} catch (InsufficientDataForMeaningfulAnswerException $e) {
|
||||
|
@ -294,11 +294,11 @@ abstract class StoragesController extends Controller {
|
|||
*
|
||||
* @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(
|
||||
[
|
||||
|
|
|
@ -111,11 +111,11 @@ class UserGlobalStoragesController extends StoragesController {
|
|||
*
|
||||
* @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(
|
||||
[
|
||||
|
@ -147,7 +147,7 @@ class UserGlobalStoragesController extends StoragesController {
|
|||
public function update(
|
||||
$id,
|
||||
$backendOptions,
|
||||
$origin = null
|
||||
$testOnly = null
|
||||
) {
|
||||
try {
|
||||
$storage = $this->service->getStorage($id);
|
||||
|
@ -172,7 +172,7 @@ class UserGlobalStoragesController extends StoragesController {
|
|||
);
|
||||
}
|
||||
|
||||
$this->updateStorageStatus($storage);
|
||||
$this->updateStorageStatus($storage, $testOnly);
|
||||
$this->sanitizeStorage($storage);
|
||||
|
||||
return new DataResponse(
|
||||
|
|
|
@ -101,8 +101,8 @@ class UserStoragesController extends StoragesController {
|
|||
*
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function show($id, $origin = null) {
|
||||
return parent::show($id, $origin);
|
||||
public function show($id, $testOnly = null) {
|
||||
return parent::show($id, $testOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -171,7 +171,7 @@ class UserStoragesController extends StoragesController {
|
|||
$authMechanism,
|
||||
$backendOptions,
|
||||
$mountOptions,
|
||||
$origin = null
|
||||
$testOnly = null
|
||||
) {
|
||||
$storage = $this->createStorage(
|
||||
$mountPoint,
|
||||
|
@ -201,7 +201,7 @@ class UserStoragesController extends StoragesController {
|
|||
);
|
||||
}
|
||||
|
||||
$this->updateStorageStatus($storage, $origin);
|
||||
$this->updateStorageStatus($storage, $testOnly);
|
||||
|
||||
return new DataResponse(
|
||||
$storage,
|
||||
|
|
|
@ -215,7 +215,7 @@ class OC_Mount_Config {
|
|||
* @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;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ class OC_Mount_Config {
|
|||
$storage = new $class($options);
|
||||
|
||||
try {
|
||||
$result = $storage->test($isPersonal, $origin);
|
||||
$result = $storage->test($isPersonal, $testOnly);
|
||||
$storage->setAvailability($result);
|
||||
if ($result) {
|
||||
return StorageNotAvailableException::STATUS_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue