mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Add Spaces to Projects
Summary: See PHI774. Ref T13164. There is no reason projects //don't// support Spaces, just a vague concern that it's not hugely useful and might be a bit confusing. However, it's at least somewhat useful (to improve consistency and reduce special casing) and doesn't necessarily seem more confusing than Projects are anyway. Support is trivial from a technical point of view, so just hook it up. Test Plan: Created new projects, shifted projects between spaces. The support is all pretty much automatic. Reviewers: amckinley Reviewed By: amckinley Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13164 Differential Revision: https://secure.phabricator.com/D19549
This commit is contained in:
parent
81a7c9ac43
commit
13cac5c362
3 changed files with 15 additions and 1 deletions
2
resources/sql/autopatches/20180730.project.01.spaces.sql
Normal file
2
resources/sql/autopatches/20180730.project.01.spaces.sql
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE {$NAMESPACE}_project.project
|
||||||
|
ADD COLUMN spacePHID VARBINARY(64) DEFAULT NULL;
|
|
@ -9752,6 +9752,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorFerretInterface',
|
'PhabricatorFerretInterface',
|
||||||
'PhabricatorConduitResultInterface',
|
'PhabricatorConduitResultInterface',
|
||||||
'PhabricatorColumnProxyInterface',
|
'PhabricatorColumnProxyInterface',
|
||||||
|
'PhabricatorSpacesInterface',
|
||||||
),
|
),
|
||||||
'PhabricatorProjectAddHeraldAction' => 'PhabricatorProjectHeraldAction',
|
'PhabricatorProjectAddHeraldAction' => 'PhabricatorProjectHeraldAction',
|
||||||
'PhabricatorProjectApplication' => 'PhabricatorApplication',
|
'PhabricatorProjectApplication' => 'PhabricatorApplication',
|
||||||
|
|
|
@ -11,7 +11,8 @@ final class PhabricatorProject extends PhabricatorProjectDAO
|
||||||
PhabricatorFulltextInterface,
|
PhabricatorFulltextInterface,
|
||||||
PhabricatorFerretInterface,
|
PhabricatorFerretInterface,
|
||||||
PhabricatorConduitResultInterface,
|
PhabricatorConduitResultInterface,
|
||||||
PhabricatorColumnProxyInterface {
|
PhabricatorColumnProxyInterface,
|
||||||
|
PhabricatorSpacesInterface {
|
||||||
|
|
||||||
protected $name;
|
protected $name;
|
||||||
protected $status = PhabricatorProjectStatus::STATUS_ACTIVE;
|
protected $status = PhabricatorProjectStatus::STATUS_ACTIVE;
|
||||||
|
@ -38,6 +39,7 @@ final class PhabricatorProject extends PhabricatorProjectDAO
|
||||||
protected $projectPathKey;
|
protected $projectPathKey;
|
||||||
|
|
||||||
protected $properties = array();
|
protected $properties = array();
|
||||||
|
protected $spacePHID;
|
||||||
|
|
||||||
private $memberPHIDs = self::ATTACHABLE;
|
private $memberPHIDs = self::ATTACHABLE;
|
||||||
private $watcherPHIDs = self::ATTACHABLE;
|
private $watcherPHIDs = self::ATTACHABLE;
|
||||||
|
@ -82,6 +84,7 @@ final class PhabricatorProject extends PhabricatorProjectDAO
|
||||||
->setViewPolicy($view_policy)
|
->setViewPolicy($view_policy)
|
||||||
->setEditPolicy($edit_policy)
|
->setEditPolicy($edit_policy)
|
||||||
->setJoinPolicy($join_policy)
|
->setJoinPolicy($join_policy)
|
||||||
|
->setSpacePHID($actor->getDefaultSpacePHID())
|
||||||
->setIsMembershipLocked(0)
|
->setIsMembershipLocked(0)
|
||||||
->attachMemberPHIDs(array())
|
->attachMemberPHIDs(array())
|
||||||
->attachSlugs(array())
|
->attachSlugs(array())
|
||||||
|
@ -697,6 +700,14 @@ final class PhabricatorProject extends PhabricatorProjectDAO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -( PhabricatorSpacesInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
public function getSpacePHID() {
|
||||||
|
return $this->spacePHID;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue