summaryrefslogtreecommitdiffstats
path: root/apps/files_external/controller
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-16 12:18:01 +0100
committerVincent Petry <pvince81@owncloud.com>2015-03-16 12:18:01 +0100
commit72632ad402bd905107db836ed0f9bfae825d6c52 (patch)
tree509bb82f2db24bb5d27bd4dea2b926f68ff8dddc /apps/files_external/controller
parentfb4cf532533d99abfd1b4f40ef6319d484f6ef85 (diff)
downloadnextcloud-server-72632ad402bd905107db836ed0f9bfae825d6c52.tar.gz
nextcloud-server-72632ad402bd905107db836ed0f9bfae825d6c52.zip
Generate storage config ids when missing
When reading in old mount.json files, they do not contain config ids. Since these are needed to be able to use the UI and the new service classes, these will be generated automatically. The config grouping is based on a config hash.
Diffstat (limited to 'apps/files_external/controller')
-rw-r--r--apps/files_external/controller/globalstoragescontroller.php13
-rw-r--r--apps/files_external/controller/userstoragescontroller.php13
2 files changed, 16 insertions, 10 deletions
diff --git a/apps/files_external/controller/globalstoragescontroller.php b/apps/files_external/controller/globalstoragescontroller.php
index e5aff4f95a2..815f24ee2be 100644
--- a/apps/files_external/controller/globalstoragescontroller.php
+++ b/apps/files_external/controller/globalstoragescontroller.php
@@ -15,6 +15,7 @@ namespace OCA\Files_External\Controller;
use \OCP\IConfig;
use \OCP\IUserSession;
use \OCP\IRequest;
+use \OCP\IL10N;
use \OCP\AppFramework\Http\DataResponse;
use \OCP\AppFramework\Controller;
use \OCP\AppFramework\Http;
@@ -24,15 +25,17 @@ use \OCA\Files_external\Lib\StorageConfig;
class GlobalStoragesController extends StoragesController {
/**
- * @param string $appName
- * @param IRequest $request
- * @param IConfig $config
- * @param GlobalStoragesService $globalStoragesService
+ * Creates a new global storages controller.
+ *
+ * @param string $AppName application name
+ * @param IRequest $request request object
+ * @param IL10N $l10n l10n service
+ * @param GlobalStoragesService $globalStoragesService storage service
*/
public function __construct(
$AppName,
IRequest $request,
- \OCP\IL10N $l10n,
+ IL10N $l10n,
GlobalStoragesService $globalStoragesService
){
parent::__construct(
diff --git a/apps/files_external/controller/userstoragescontroller.php b/apps/files_external/controller/userstoragescontroller.php
index 64202b5e542..ed7ec453ccd 100644
--- a/apps/files_external/controller/userstoragescontroller.php
+++ b/apps/files_external/controller/userstoragescontroller.php
@@ -15,6 +15,7 @@ namespace OCA\Files_External\Controller;
use \OCP\IConfig;
use \OCP\IUserSession;
use \OCP\IRequest;
+use \OCP\IL10N;
use \OCP\AppFramework\Http\DataResponse;
use \OCP\AppFramework\Controller;
use \OCP\AppFramework\Http;
@@ -24,15 +25,17 @@ use \OCA\Files_external\Lib\StorageConfig;
class UserStoragesController extends StoragesController {
/**
- * @param string $appName
- * @param IRequest $request
- * @param IConfig $config
- * @param UserStoragesService $userStoragesService
+ * Creates a new user storages controller.
+ *
+ * @param string $AppName application name
+ * @param IRequest $request request object
+ * @param IL10N $l10n l10n service
+ * @param UserStoragesService $userStoragesService storage service
*/
public function __construct(
$AppName,
IRequest $request,
- \OCP\IL10N $l10n,
+ IL10N $l10n,
UserStoragesService $userStoragesService
){
parent::__construct(