From: Tim Düsterhus Date: Sun, 24 May 2015 12:45:22 +0000 (+0200) Subject: Deprecate AJAXProxyAction::getData() X-Git-Tag: 2.1.5~40 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07736a3a5a67f1ecb4c8bfbf60bef56fdc0b3ad1;p=GitHub%2FWoltLab%2FWCF.git Deprecate AJAXProxyAction::getData() --- diff --git a/wcfsetup/install/files/lib/action/AJAXProxyAction.class.php b/wcfsetup/install/files/lib/action/AJAXProxyAction.class.php index 9546c29cbb..b6d53ee24e 100644 --- a/wcfsetup/install/files/lib/action/AJAXProxyAction.class.php +++ b/wcfsetup/install/files/lib/action/AJAXProxyAction.class.php @@ -81,10 +81,9 @@ class AJAXProxyAction extends AJAXInvokeAction { } /** - * Gets the values of object data variables - * - * @param mixed $response - * @return mixed + * @deprecated This function makes it too easy to accidentally expose private information. + * It will be removed in Community Framework 2.2. + * Consider using \JsonSerializable beginning with Community Framework 2.2. */ protected function getData($response) { if ($response instanceof IStorableObject) { diff --git a/wcfsetup/install/files/lib/data/DatabaseObject.class.php b/wcfsetup/install/files/lib/data/DatabaseObject.class.php index 5adeb0bb24..6a3dec05dd 100644 --- a/wcfsetup/install/files/lib/data/DatabaseObject.class.php +++ b/wcfsetup/install/files/lib/data/DatabaseObject.class.php @@ -118,6 +118,7 @@ abstract class DatabaseObject implements IStorableObject { } /** + * @deprecated This method was introduced for a function in AJAXProxy that is deprecated. * @see \wcf\data\IStorableObject::getData() */ public function getData() { diff --git a/wcfsetup/install/files/lib/data/IStorableObject.class.php b/wcfsetup/install/files/lib/data/IStorableObject.class.php index 1ed561ad4a..a6ee64bc69 100644 --- a/wcfsetup/install/files/lib/data/IStorableObject.class.php +++ b/wcfsetup/install/files/lib/data/IStorableObject.class.php @@ -32,6 +32,7 @@ interface IStorableObject { /** * Returns the value of all object data variables. * + * @deprecated This method was introduced for a function in AJAXProxy that is deprecated. * @return array array */ public function getData();