Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions lib/private/legacy/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,6 @@ public static function checkAdminUser() {
}
}

/**
* Check is a given user exists - send json error msg if not
* @param string $user
* @deprecated Use a AppFramework JSONResponse instead
* @suppress PhanDeprecatedFunction
*/
public static function checkUserExists($user) {
if (!\OC::$server->getUserManager()->userExists($user)) {
$l = \OC::$server->getL10N('lib');
OCP\JSON::error(array('data' => array('message' => $l->t('Unknown user'), 'error' => 'unknown_user' )));
exit;
}
}


/**
* Check if the user is a subadmin, send json error msg if not
* @deprecated Use annotation based ACLs from the AppFramework instead
Expand Down
32 changes: 0 additions & 32 deletions lib/public/JSON.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,6 @@
* @deprecated 8.1.0 Use a AppFramework JSONResponse instead
*/
class JSON {
/**
* Encode and print $data in JSON format
* @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);
}

/**
* Check if the user is logged in, send json error msg if not.
*
Expand Down Expand Up @@ -135,16 +123,6 @@ public static function error( $data = array() ) {
\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);
}

/**
* Check if the App is enabled and send JSON error message instead
*
Expand Down Expand Up @@ -196,14 +174,4 @@ public static function checkAdminUser() {
public static function encode($data) {
return \OC_JSON::encode($data);
}

/**
* 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);
}
}