]> source.dussan.org Git - nextcloud-server.git/commitdiff
Rename variable
authorJuan Pablo Villafáñez <jvillafanez@solidgear.es>
Tue, 7 Jun 2016 16:25:17 +0000 (18:25 +0200)
committerJuan Pablo Villafáñez <jvillafanez@solidgear.es>
Tue, 7 Jun 2016 16:25:17 +0000 (18:25 +0200)
apps/files_external/js/settings.js
apps/files_external/js/statusmanager.js
apps/files_external/lib/Controller/GlobalStoragesController.php
apps/files_external/lib/Controller/StoragesController.php
apps/files_external/lib/Controller/UserGlobalStoragesController.php
apps/files_external/lib/Controller/UserStoragesController.php
apps/files_external/lib/config.php

index 4d5a08a5de4fc3ff6a3e7fe18882647ec65c4b4a..2477f513db3d3862e234d72dc68e6163857e7afd 100644 (file)
@@ -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();
index 57acc562deb42172ec97b0721c6a89526253e129..91974f2d04d6bfb2e5cc6190e0266bcd0eaa904b 100644 (file)
@@ -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;
index af71a4831cdfe4c030152e7286f212119e273170..e606bacd8c28daff62f66ac4ae8f52afd10e0677 100644 (file)
@@ -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,
index 213518ff4a063ebc74dcbdf0d83e8c0dc414e1a9..8eb5506d534571f7c72e8412068228e6f50b1290 100644 (file)
@@ -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(
                                [
index 5050962a52e7b746e1e58a27eadb539d9d365830..8376a00559d6cf97e8a2831ae69730d5bdd352ad 100644 (file)
@@ -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(
index 73f7178b1422ef20ab0e10acbc9a3f4955c9e3ec..ca949df8a05c4df029361a670fbc10369c7dd5cd 100644 (file)
@@ -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,
index 51d624497828a0b077de98240c76ea71626a3d6c..95220f86cf7fe6bf66fd795b7978629e3204f3fa 100644 (file)
@@ -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;