From 17badfacac311f5a8b9a2593525d6be620aeaa15 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Fri, 11 Jul 2014 20:20:37 -0700 Subject: [PATCH] Fix PhabricatorProjectCustomFields to use storage correctly. Summary: Prevents infinite recursion when trying to save custom fields on projects. Test Plan: Add a custom field (that is a class, not one configured in the UI) to a project, and try to save it. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Projects: #phabricator Maniphest Tasks: T5606 Differential Revision: https://secure.phabricator.com/D9908 --- .../customfield/PhabricatorProjectCustomField.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/applications/project/customfield/PhabricatorProjectCustomField.php b/src/applications/project/customfield/PhabricatorProjectCustomField.php index a16302fe0e..c9e5873583 100644 --- a/src/applications/project/customfield/PhabricatorProjectCustomField.php +++ b/src/applications/project/customfield/PhabricatorProjectCustomField.php @@ -3,5 +3,16 @@ abstract class PhabricatorProjectCustomField extends PhabricatorCustomField { + public function newStorageObject() { + return new PhabricatorProjectCustomFieldStorage(); + } + + protected function newStringIndexStorage() { + return new PhabricatorProjectCustomFieldStringIndex(); + } + + protected function newNumericIndexStorage() { + return new PhabricatorProjectCustomFieldNumericIndex(); + } }