summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/AppPasswordController.php5
-rw-r--r--core/Controller/AutoCompleteController.php6
-rw-r--r--core/Controller/AvatarController.php40
-rw-r--r--core/Controller/CSRFTokenController.php5
-rw-r--r--core/Controller/ClientFlowLoginController.php7
-rw-r--r--core/Controller/ClientFlowLoginV2Controller.php4
-rw-r--r--core/Controller/CollaborationResourcesController.php8
-rw-r--r--core/Controller/ContactsMenuController.php4
-rw-r--r--core/Controller/CssController.php5
-rw-r--r--core/Controller/GuestAvatarController.php16
-rw-r--r--core/Controller/JsController.php6
-rw-r--r--core/Controller/LoginController.php14
-rw-r--r--core/Controller/LostController.php7
-rw-r--r--core/Controller/NavigationController.php1
-rw-r--r--core/Controller/OCJSController.php3
-rw-r--r--core/Controller/OCSController.php2
-rw-r--r--core/Controller/PreviewController.php4
-rw-r--r--core/Controller/RecommendedAppsController.php53
-rw-r--r--core/Controller/SearchController.php4
-rw-r--r--core/Controller/SetupController.php16
-rw-r--r--core/Controller/SvgController.php11
-rw-r--r--core/Controller/TwoFactorChallengeController.php4
-rw-r--r--core/Controller/UserController.php2
-rw-r--r--core/Controller/WalledGardenController.php2
-rw-r--r--core/Controller/WhatsNewController.php2
-rw-r--r--core/Controller/WipeController.php2
26 files changed, 172 insertions, 61 deletions
diff --git a/core/Controller/AppPasswordController.php b/core/Controller/AppPasswordController.php
index a66acb3c5f3..2f8c1184def 100644
--- a/core/Controller/AppPasswordController.php
+++ b/core/Controller/AppPasswordController.php
@@ -1,8 +1,11 @@
<?php
+
declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2018, Roeland Jago Douma <roeland@famdouma.nl>
*
+ * @author Daniel Kesselberg <mail@danielkesselberg.de>
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
@@ -18,7 +21,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/AutoCompleteController.php b/core/Controller/AutoCompleteController.php
index 1e45bb63a76..12414b50f30 100644
--- a/core/Controller/AutoCompleteController.php
+++ b/core/Controller/AutoCompleteController.php
@@ -1,9 +1,13 @@
<?php
+
declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de>
*
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ * @author Joas Schilling <coding@schilljs.com>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
@@ -18,7 +22,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php
index cef68ec8348..7ec338467c6 100644
--- a/core/Controller/AvatarController.php
+++ b/core/Controller/AvatarController.php
@@ -3,12 +3,12 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
+ * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Vincent Petry <pvince81@owncloud.com>
- * @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license AGPL-3.0
*
@@ -22,13 +22,14 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OC\Core\Controller;
use OC\AppFramework\Utility\TimeFactory;
+use OCP\Accounts\IAccountManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataDisplayResponse;
@@ -77,19 +78,9 @@ class AvatarController extends Controller {
/** @var TimeFactory */
protected $timeFactory;
+ /** @var IAccountManager */
+ private $accountManager;
- /**
- * @param string $appName
- * @param IRequest $request
- * @param IAvatarManager $avatarManager
- * @param ICache $cache
- * @param IL10N $l10n
- * @param IUserManager $userManager
- * @param IRootFolder $rootFolder
- * @param ILogger $logger
- * @param string $userId
- * @param TimeFactory $timeFactory
- */
public function __construct($appName,
IRequest $request,
IAvatarManager $avatarManager,
@@ -99,7 +90,8 @@ class AvatarController extends Controller {
IRootFolder $rootFolder,
ILogger $logger,
$userId,
- TimeFactory $timeFactory) {
+ TimeFactory $timeFactory,
+ IAccountManager $accountManager) {
parent::__construct($appName, $request);
$this->avatarManager = $avatarManager;
@@ -110,6 +102,7 @@ class AvatarController extends Controller {
$this->logger = $logger;
$this->userId = $userId;
$this->timeFactory = $timeFactory;
+ $this->accountManager = $accountManager;
}
@@ -131,6 +124,19 @@ class AvatarController extends Controller {
$size = 64;
}
+ $user = $this->userManager->get($userId);
+ if ($user === null) {
+ return new JSONResponse([], Http::STATUS_NOT_FOUND);
+ }
+
+ $account = $this->accountManager->getAccount($user);
+ $scope = $account->getProperty(IAccountManager::PROPERTY_AVATAR)->getScope();
+
+ if ($scope !== IAccountManager::VISIBILITY_PUBLIC && $this->userId === null) {
+ // Public avatar access is not allowed
+ return new JSONResponse([], Http::STATUS_NOT_FOUND);
+ }
+
try {
$avatar = $this->avatarManager->getAvatar($userId);
$avatarFile = $avatar->getFile($size);
@@ -140,9 +146,7 @@ class AvatarController extends Controller {
['Content-Type' => $avatarFile->getMimeType()]
);
} catch (\Exception $e) {
- $resp = new Http\Response();
- $resp->setStatus(Http::STATUS_NOT_FOUND);
- return $resp;
+ return new JSONResponse([], Http::STATUS_NOT_FOUND);
}
// Cache for 30 minutes
diff --git a/core/Controller/CSRFTokenController.php b/core/Controller/CSRFTokenController.php
index 24888e2179f..1ae4dce6a13 100644
--- a/core/Controller/CSRFTokenController.php
+++ b/core/Controller/CSRFTokenController.php
@@ -1,10 +1,11 @@
<?php
+
declare(strict_types=1);
/**
* @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
*
- * @author 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @license GNU AGPL version 3 or any later version
*
@@ -19,7 +20,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php
index ba594469a7f..ffdfd9f9f0a 100644
--- a/core/Controller/ClientFlowLoginController.php
+++ b/core/Controller/ClientFlowLoginController.php
@@ -3,10 +3,13 @@
* @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
*
* @author Bjoern Schiessle <bjoern@schiessle.org>
+ * @author Daniel Kesselberg <mail@danielkesselberg.de>
* @author Lukas Reschke <lukas@statuscode.ch>
+ * @author Mario Danic <mario@lovelyhq.com>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Russell Ault <russell@auksnest.ca>
+ * @author RussellAult <RussellAult@users.noreply.github.com>
+ * @author Sergej Nikolaev <kinolaev@gmail.com>
*
* @license GNU AGPL version 3 or any later version
*
@@ -21,7 +24,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php
index cb73b3241a0..836606d301b 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -1,5 +1,7 @@
<?php
+
declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
*
@@ -18,7 +20,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/CollaborationResourcesController.php b/core/Controller/CollaborationResourcesController.php
index caa1f1a16d0..72bcf351db0 100644
--- a/core/Controller/CollaborationResourcesController.php
+++ b/core/Controller/CollaborationResourcesController.php
@@ -1,8 +1,14 @@
<?php
+
declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2018 Joas Schilling <coding@schilljs.com>
*
+ * @author Joas Schilling <coding@schilljs.com>
+ * @author Julius Härtl <jus@bitgrid.net>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +22,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/ContactsMenuController.php b/core/Controller/ContactsMenuController.php
index db6383cb2ac..8b7962f97ef 100644
--- a/core/Controller/ContactsMenuController.php
+++ b/core/Controller/ContactsMenuController.php
@@ -2,7 +2,7 @@
/**
* @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
*
- * @author Christoph Wurst <christoph@owncloud.com>
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Georg Ehrke <oc.list@georgehrke.com>
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
@@ -19,7 +19,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/CssController.php b/core/Controller/CssController.php
index bb9b7a37d8f..b332ee1aa26 100644
--- a/core/Controller/CssController.php
+++ b/core/Controller/CssController.php
@@ -1,5 +1,7 @@
<?php
+
declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2016, John Molakvoæ (skjnldsv@protonmail.com)
*
@@ -7,6 +9,7 @@ declare(strict_types=1);
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Roeland Jago Douma <roeland@famdouma.nl>
+ * @author Thomas Citharel <tcit@tcit.fr>
*
* @license GNU AGPL version 3 or any later version
*
@@ -21,7 +24,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/GuestAvatarController.php b/core/Controller/GuestAvatarController.php
index 76e140fee30..38b5cfd2941 100644
--- a/core/Controller/GuestAvatarController.php
+++ b/core/Controller/GuestAvatarController.php
@@ -4,19 +4,21 @@
*
* @author Michael Weimann <mail@michael-weimann.eu>
*
- * @license AGPL-3.0
+ * @license GNU AGPL version 3 or any later version
*
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
*/
namespace OC\Core\Controller;
diff --git a/core/Controller/JsController.php b/core/Controller/JsController.php
index 207b7113ab5..f2accc21b45 100644
--- a/core/Controller/JsController.php
+++ b/core/Controller/JsController.php
@@ -1,11 +1,15 @@
<?php
+
declare(strict_types=1);
+
/**
* @copyright 2017, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Joas Schilling <coding@schilljs.com>
+ * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Roeland Jago Douma <roeland@famdouma.nl>
+ * @author Thomas Citharel <tcit@tcit.fr>
*
* @license GNU AGPL version 3 or any later version
*
@@ -20,7 +24,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 705a8ec4429..13aef8f67ab 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -4,16 +4,14 @@
* @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Christoph Wurst <christoph@owncloud.com>
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @author Daniel Kesselberg <mail@danielkesselberg.de>
* @author Joas Schilling <coding@schilljs.com>
* @author Julius Härtl <jus@bitgrid.net>
- * @author justin-sleep <justin@quarterfull.com>
* @author Lukas Reschke <lukas@statuscode.ch>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Sandro Lutz <sandro.lutz@temparus.ch>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Ujjwal Bhardwaj <ujjwalb1996@gmail.com>
+ * @author Michael Weimann <mail@michael-weimann.eu>
+ * @author Rayn0r <andrew@ilpss8.myfirewall.org>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license AGPL-3.0
*
@@ -27,7 +25,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php
index 1a3f86f95d3..e8d9b8675b6 100644
--- a/core/Controller/LostController.php
+++ b/core/Controller/LostController.php
@@ -2,13 +2,18 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @author Bjoern Schiessle <bjoern@schiessle.org>
* @author Björn Schießle <bjoern@schiessle.org>
+ * @author Daniel Kesselberg <mail@danielkesselberg.de>
* @author Joas Schilling <coding@schilljs.com>
* @author Julius Haertl <jus@bitgrid.net>
+ * @author Julius Härtl <jus@bitgrid.net>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
+ * @author Rémy Jacquin <remy@remyj.fr>
+ * @author Robin Appelman <robin@icewind.nl>
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Victor Dubiniuk <dubiniuk@owncloud.com>
@@ -25,7 +30,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
diff --git a/core/Controller/NavigationController.php b/core/Controller/NavigationController.php
index 654cb6d253d..ad88985ce76 100644
--- a/core/Controller/NavigationController.php
+++ b/core/Controller/NavigationController.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
diff --git a/core/Controller/OCJSController.php b/core/Controller/OCJSController.php
index 8ffc6d99290..617f6b25236 100644
--- a/core/Controller/OCJSController.php
+++ b/core/Controller/OCJSController.php
@@ -2,6 +2,7 @@
/**
* @copyright Copyright (c) 2016, Roeland Jago Douma <roeland@famdouma.nl>
*
+ * @author Bjoern Schiessle <bjoern@schiessle.org>
* @author Joas Schilling <coding@schilljs.com>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
@@ -20,7 +21,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/OCSController.php b/core/Controller/OCSController.php
index ce08fb657e2..664909b0fb9 100644
--- a/core/Controller/OCSController.php
+++ b/core/Controller/OCSController.php
@@ -20,7 +20,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php
index edda49d0ded..3fd1ce2c868 100644
--- a/core/Controller/PreviewController.php
+++ b/core/Controller/PreviewController.php
@@ -1,5 +1,7 @@
<?php
+
declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2016, Roeland Jago Douma <roeland@famdouma.nl>
*
@@ -19,7 +21,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/RecommendedAppsController.php b/core/Controller/RecommendedAppsController.php
new file mode 100644
index 00000000000..9f3f6187d29
--- /dev/null
+++ b/core/Controller/RecommendedAppsController.php
@@ -0,0 +1,53 @@
+<?php declare(strict_types=1);
+
+/**
+ * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace OC\Core\Controller;
+
+use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http\ContentSecurityPolicy;
+use OCP\AppFramework\Http\Response;
+use OCP\AppFramework\Http\StandaloneTemplateResponse;
+use OCP\IInitialStateService;
+use OCP\IRequest;
+
+class RecommendedAppsController extends Controller {
+
+ /** @var IInitialStateService */
+ private $initialStateService;
+
+ public function __construct(IRequest $request,
+ IInitialStateService $initialStateService) {
+ parent::__construct('core', $request);
+ $this->initialStateService = $initialStateService;
+ }
+
+ /**
+ * @NoCSRFRequired
+ * @return Response
+ */
+ public function index(): Response {
+ $this->initialStateService->provideInitialState('core', 'defaultPageUrl', \OC_Util::getDefaultPageUrl());
+ return new StandaloneTemplateResponse($this->appName, 'recommendedapps', [], 'guest');
+ }
+
+}
diff --git a/core/Controller/SearchController.php b/core/Controller/SearchController.php
index b32609bb4b2..8d3a6f623b7 100644
--- a/core/Controller/SearchController.php
+++ b/core/Controller/SearchController.php
@@ -1,5 +1,7 @@
<?php
+
declare(strict_types=1);
+
/**
* @copyright 2018, Roeland Jago Douma <roeland@famdouma.nl>
*
@@ -18,7 +20,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php
index 3dd02fc31dc..302edccf7a6 100644
--- a/core/Controller/SetupController.php
+++ b/core/Controller/SetupController.php
@@ -2,13 +2,16 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Damjan Georgievski <gdamjan@gmail.com>
* @author ideaship <ideaship@users.noreply.github.com>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
*
* @license AGPL-3.0
@@ -23,7 +26,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
@@ -31,6 +34,7 @@ namespace OC\Core\Controller;
use OC\Setup;
use OCP\ILogger;
+use function urlencode;
class SetupController {
/** @var Setup */
@@ -76,7 +80,7 @@ class SetupController {
$options = array_merge($opts, $post, $errors);
$this->display($options);
} else {
- $this->finishSetup();
+ $this->finishSetup(isset($post['install-recommended-apps']));
}
} else {
$options = array_merge($opts, $post);
@@ -105,7 +109,7 @@ class SetupController {
\OC_Template::printGuestPage('', 'installation', $parameters);
}
- public function finishSetup() {
+ private function finishSetup(bool $installRecommended) {
if( file_exists( $this->autoConfigFile )) {
unlink($this->autoConfigFile);
}
@@ -117,6 +121,12 @@ class SetupController {
}
}
+ if ($installRecommended) {
+ $urlGenerator = \OC::$server->getURLGenerator();
+ $location = $urlGenerator->getAbsoluteURL('index.php/core/apps/recommended');
+ header('Location: ' . $location);
+ exit();
+ }
\OC_Util::redirectToDefaultPage();
}
diff --git a/core/Controller/SvgController.php b/core/Controller/SvgController.php
index a94394e6ffe..63105e1c0f1 100644
--- a/core/Controller/SvgController.php
+++ b/core/Controller/SvgController.php
@@ -1,9 +1,16 @@
<?php
-declare (strict_types = 1);
+
+declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv@protonmail.com)
*
+ * @author Joas Schilling <coding@schilljs.com>
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
+ * @author Julius Härtl <jus@bitgrid.net>
+ * @author Michael Weimann <mail@michael-weimann.eu>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ * @author Thomas Citharel <tcit@tcit.fr>
*
* @license GNU AGPL version 3 or any later version
*
@@ -18,7 +25,7 @@ declare (strict_types = 1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/TwoFactorChallengeController.php b/core/Controller/TwoFactorChallengeController.php
index 07e77352bac..4209e48e648 100644
--- a/core/Controller/TwoFactorChallengeController.php
+++ b/core/Controller/TwoFactorChallengeController.php
@@ -2,7 +2,7 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
- * @author Christoph Wurst <christoph@owncloud.com>
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Cornelius Kölbel <cornelius.koelbel@netknights.it>
* @author Joas Schilling <coding@schilljs.com>
* @author Lukas Reschke <lukas@statuscode.ch>
@@ -20,7 +20,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
diff --git a/core/Controller/UserController.php b/core/Controller/UserController.php
index a04e350b2b1..23b2eda4e26 100644
--- a/core/Controller/UserController.php
+++ b/core/Controller/UserController.php
@@ -18,7 +18,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
diff --git a/core/Controller/WalledGardenController.php b/core/Controller/WalledGardenController.php
index be34b25b904..5bd66225076 100644
--- a/core/Controller/WalledGardenController.php
+++ b/core/Controller/WalledGardenController.php
@@ -17,7 +17,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/WhatsNewController.php b/core/Controller/WhatsNewController.php
index c3a6d28cea2..159e88e1474 100644
--- a/core/Controller/WhatsNewController.php
+++ b/core/Controller/WhatsNewController.php
@@ -17,7 +17,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/core/Controller/WipeController.php b/core/Controller/WipeController.php
index 4b9d9ae38b5..378fb112850 100644
--- a/core/Controller/WipeController.php
+++ b/core/Controller/WipeController.php
@@ -20,7 +20,7 @@ declare(strict_types=1);
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/