Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller/OCSController.php')
-rw-r--r--core/Controller/OCSController.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/core/Controller/OCSController.php b/core/Controller/OCSController.php
index 60ea12f017c..63a25591ef0 100644
--- a/core/Controller/OCSController.php
+++ b/core/Controller/OCSController.php
@@ -1,7 +1,9 @@
<?php
/**
+ * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl>
*
- *
+ * @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 Lukas Reschke <lukas@statuscode.ch>
@@ -16,14 +18,13 @@
*
* 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
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-
namespace OC\Core\Controller;
use OC\CapabilitiesManager;
@@ -91,7 +92,7 @@ class OCSController extends \OCP\AppFramework\OCSController {
*/
public function getCapabilities() {
$result = [];
- list($major, $minor, $micro) = \OCP\Util::getVersion();
+ [$major, $minor, $micro] = \OCP\Util::getVersion();
$result['version'] = [
'major' => $major,
'minor' => $minor,
@@ -101,13 +102,15 @@ class OCSController extends \OCP\AppFramework\OCSController {
'extendedSupport' => \OCP\Util::hasExtendedSupport()
];
- if($this->userSession->isLoggedIn()) {
+ if ($this->userSession->isLoggedIn()) {
$result['capabilities'] = $this->capabilitiesManager->getCapabilities();
} else {
$result['capabilities'] = $this->capabilitiesManager->getCapabilities(true);
}
- return new DataResponse($result);
+ $response = new DataResponse($result);
+ $response->setETag(md5(json_encode($result)));
+ return $response;
}
/**
@@ -144,7 +147,7 @@ class OCSController extends \OCP\AppFramework\OCSController {
public function getIdentityProof($cloudId) {
$userObject = $this->userManager->get($cloudId);
- if($userObject !== null) {
+ if ($userObject !== null) {
$key = $this->keyManager->getKey($userObject);
$data = [
'public' => $key->getPublic(),