aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-07-19 15:50:59 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-08-01 08:20:15 +0200
commit80b649c471247296d4034dfd891a9e9f3abf1c06 (patch)
tree35e663fbea654124be54e9e6d20e7fd0512da539 /lib
parent5424d6a40d13f922a19e2b2b0e484a56f4dbe7f3 (diff)
downloadnextcloud-server-80b649c471247296d4034dfd891a9e9f3abf1c06.tar.gz
nextcloud-server-80b649c471247296d4034dfd891a9e9f3abf1c06.zip
Suppress deprecated function in \OCP\JSON
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib')
-rw-r--r--lib/public/JSON.php17
1 files changed, 14 insertions, 3 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);