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:
-rw-r--r--lib/public/JSON.php17
-rw-r--r--ocs/providers.php2
-rw-r--r--remote.php2
3 files changed, 16 insertions, 5 deletions
diff --git a/lib/public/JSON.php b/lib/public/JSON.php
index 7db61ff1571..b289c2038a1 100644
--- a/lib/public/JSON.php
+++ b/lib/public/JSON.php
@@ -45,6 +45,8 @@ class JSON {
* @param array $data The data to use
* @param bool $setContentType the optional content type
* @deprecated 8.1.0 Use a AppFramework JSONResponse instead
+ *
+ * @suppress PhanDeprecatedFunction
*/
public static function encodedPrint( $data, $setContentType=true ) {
\OC_JSON::encodedPrint($data, $setContentType);
@@ -63,6 +65,8 @@ class JSON {
* Add this call to the start of all ajax method files that requires
* an authenticated user.
* @deprecated 8.1.0 Use annotation based ACLs from the AppFramework instead
+ *
+ * @suppress PhanDeprecatedFunction
*/
public static function checkLoggedIn() {
\OC_JSON::checkLoggedIn();
@@ -86,6 +90,8 @@ class JSON {
* parameter to the ajax call, then assign it to the template and finally
* add a hidden input field also named 'requesttoken' containing the value.
* @deprecated 8.1.0 Use annotation based CSRF checks from the AppFramework instead
+ *
+ * @suppress PhanDeprecatedFunction
*/
public static function callCheck() {
\OC_JSON::callCheck();
@@ -98,8 +104,8 @@ class JSON {
* @see \OCP\JSON::error() for the format to use.
*
* @param array $data The data to use
- * @return string json formatted string.
* @deprecated 8.1.0 Use a AppFramework JSONResponse instead
+ * @suppress PhanDeprecatedFunction
*/
public static function success( $data = array() ) {
\OC_JSON::success($data);
@@ -121,17 +127,18 @@ class JSON {
* {"status":"error","data":{"message":"An error happened", "id":[some value]}}
*
* @param array $data The data to use
- * @return string json formatted error string.
* @deprecated 8.1.0 Use a AppFramework JSONResponse instead
+ * @suppress PhanDeprecatedFunction
*/
public static function error( $data = array() ) {
- \OC_JSON::error( $data );
+ \OC_JSON::error($data);
}
/**
* Set Content-Type header to jsonrequest
* @param string $type The content type header
* @deprecated 8.1.0 Use a AppFramework JSONResponse instead
+ * @suppress PhanDeprecatedFunction
*/
public static function setContentTypeHeader( $type='application/json' ) {
\OC_JSON::setContentTypeHeader($type);
@@ -152,6 +159,7 @@ class JSON {
*
* @param string $app The app to check
* @deprecated 8.1.0 Use the AppFramework instead. It will automatically check if the app is enabled.
+ * @suppress PhanDeprecatedFunction
*/
public static function checkAppEnabled( $app ) {
\OC_JSON::checkAppEnabled($app);
@@ -171,6 +179,7 @@ class JSON {
* administrative rights.
*
* @deprecated 8.1.0 Use annotation based ACLs from the AppFramework instead
+ * @suppress PhanDeprecatedFunction
*/
public static function checkAdminUser() {
\OC_JSON::checkAdminUser();
@@ -181,6 +190,7 @@ class JSON {
* @param array $data
* @return string
* @deprecated 8.1.0 Use a AppFramework JSONResponse instead
+ * @suppress PhanDeprecatedFunction
*/
public static function encode($data) {
return \OC_JSON::encode($data);
@@ -190,6 +200,7 @@ class JSON {
* Check is a given user exists - send json error msg if not
* @param string $user
* @deprecated 8.1.0 Use a AppFramework JSONResponse instead
+ * @suppress PhanDeprecatedFunction
*/
public static function checkUserExists($user) {
\OC_JSON::checkUserExists($user);
diff --git a/ocs/providers.php b/ocs/providers.php
index 9efca14768e..1961a68ec2d 100644
--- a/ocs/providers.php
+++ b/ocs/providers.php
@@ -34,7 +34,7 @@ $url = $request->getServerProtocol() . '://' . substr($request->getServerHost()
$writer = new XMLWriter();
$writer->openURI('php://output');
$writer->startDocument('1.0','UTF-8');
-$writer->setIndent(4);
+$writer->setIndent(true);
$writer->startElement('providers');
$writer->startElement('provider');
$writer->writeElement('id', 'ownCloud');
diff --git a/remote.php b/remote.php
index 8e74967365d..1d83e5a7f83 100644
--- a/remote.php
+++ b/remote.php
@@ -41,7 +41,7 @@ class RemoteException extends Exception {
}
/**
- * @param Exception | Error $e
+ * @param Exception|Error $e
*/
function handleException($e) {
$request = \OC::$server->getRequest();