From 07736a3a5a67f1ecb4c8bfbf60bef56fdc0b3ad1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 24 May 2015 14:45:22 +0200 Subject: [PATCH] Deprecate AJAXProxyAction::getData() --- .../install/files/lib/action/AJAXProxyAction.class.php | 7 +++---- wcfsetup/install/files/lib/data/DatabaseObject.class.php | 1 + wcfsetup/install/files/lib/data/IStorableObject.class.php | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) 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(); -- 2.20.1