diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1556,7 +1556,7 @@ 'PhabricatorActionListView' => 'view/layout/PhabricatorActionListView.php', 'PhabricatorActionView' => 'view/layout/PhabricatorActionView.php', 'PhabricatorActivitySettingsPanel' => 'applications/settings/panel/PhabricatorActivitySettingsPanel.php', - 'PhabricatorAdministratorsPolicyRule' => 'applications/policy/rule/PhabricatorAdministratorsPolicyRule.php', + 'PhabricatorAdministratorsPolicyRule' => 'applications/people/policyrule/PhabricatorAdministratorsPolicyRule.php', 'PhabricatorAjaxRequestExceptionHandler' => 'aphront/handler/PhabricatorAjaxRequestExceptionHandler.php', 'PhabricatorAlmanacApplication' => 'applications/almanac/application/PhabricatorAlmanacApplication.php', 'PhabricatorAmazonAuthProvider' => 'applications/auth/provider/PhabricatorAmazonAuthProvider.php', @@ -2326,7 +2326,7 @@ 'PhabricatorLegalpadApplication' => 'applications/legalpad/application/PhabricatorLegalpadApplication.php', 'PhabricatorLegalpadConfigOptions' => 'applications/legalpad/config/PhabricatorLegalpadConfigOptions.php', 'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php', - 'PhabricatorLegalpadSignaturePolicyRule' => 'applications/policy/rule/PhabricatorLegalpadSignaturePolicyRule.php', + 'PhabricatorLegalpadSignaturePolicyRule' => 'applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php', 'PhabricatorLibraryTestCase' => '__tests__/PhabricatorLibraryTestCase.php', 'PhabricatorLipsumArtist' => 'applications/lipsum/image/PhabricatorLipsumArtist.php', 'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php', @@ -2787,7 +2787,7 @@ 'PhabricatorProjectViewController' => 'applications/project/controller/PhabricatorProjectViewController.php', 'PhabricatorProjectWatchController' => 'applications/project/controller/PhabricatorProjectWatchController.php', 'PhabricatorProjectsEditField' => 'applications/transactions/editfield/PhabricatorProjectsEditField.php', - 'PhabricatorProjectsPolicyRule' => 'applications/policy/rule/PhabricatorProjectsPolicyRule.php', + 'PhabricatorProjectsPolicyRule' => 'applications/project/policyrule/PhabricatorProjectsPolicyRule.php', 'PhabricatorProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorProtocolAdapter.php', 'PhabricatorPygmentSetupCheck' => 'applications/config/check/PhabricatorPygmentSetupCheck.php', 'PhabricatorQuery' => 'infrastructure/query/PhabricatorQuery.php', @@ -3197,7 +3197,7 @@ 'PhabricatorUserTitleField' => 'applications/people/customfield/PhabricatorUserTitleField.php', 'PhabricatorUserTransaction' => 'applications/people/storage/PhabricatorUserTransaction.php', 'PhabricatorUsersEditField' => 'applications/transactions/editfield/PhabricatorUsersEditField.php', - 'PhabricatorUsersPolicyRule' => 'applications/policy/rule/PhabricatorUsersPolicyRule.php', + 'PhabricatorUsersPolicyRule' => 'applications/people/policyrule/PhabricatorUsersPolicyRule.php', 'PhabricatorUsersSearchField' => 'applications/people/searchfield/PhabricatorUsersSearchField.php', 'PhabricatorVCSResponse' => 'applications/repository/response/PhabricatorVCSResponse.php', 'PhabricatorVeryWowEnglishTranslation' => 'infrastructure/internationalization/translation/PhabricatorVeryWowEnglishTranslation.php', diff --git a/src/applications/policy/rule/PhabricatorLegalpadSignaturePolicyRule.php b/src/applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php rename from src/applications/policy/rule/PhabricatorLegalpadSignaturePolicyRule.php rename to src/applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php --- a/src/applications/policy/rule/PhabricatorLegalpadSignaturePolicyRule.php +++ b/src/applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php @@ -66,7 +66,6 @@ ->setViewer($viewer) ->withPHIDs($value) ->execute(); - return mpull($handles, 'getFullName', 'getPHID'); } diff --git a/src/applications/policy/rule/PhabricatorAdministratorsPolicyRule.php b/src/applications/people/policyrule/PhabricatorAdministratorsPolicyRule.php rename from src/applications/policy/rule/PhabricatorAdministratorsPolicyRule.php rename to src/applications/people/policyrule/PhabricatorAdministratorsPolicyRule.php diff --git a/src/applications/policy/rule/PhabricatorUsersPolicyRule.php b/src/applications/people/policyrule/PhabricatorUsersPolicyRule.php rename from src/applications/policy/rule/PhabricatorUsersPolicyRule.php rename to src/applications/people/policyrule/PhabricatorUsersPolicyRule.php diff --git a/src/applications/policy/rule/PhabricatorLunarPhasePolicyRule.php b/src/applications/policy/rule/PhabricatorLunarPhasePolicyRule.php --- a/src/applications/policy/rule/PhabricatorLunarPhasePolicyRule.php +++ b/src/applications/policy/rule/PhabricatorLunarPhasePolicyRule.php @@ -2,8 +2,8 @@ final class PhabricatorLunarPhasePolicyRule extends PhabricatorPolicyRule { - const PHASE_FULL = 'full'; - const PHASE_NEW = 'new'; + const PHASE_FULL = 'full'; + const PHASE_NEW = 'new'; const PHASE_WAXING = 'waxing'; const PHASE_WANING = 'waning'; @@ -27,9 +27,9 @@ return $moon->isWaxing(); case 'waning': return $moon->isWaning(); + default: + return false; } - - return false; } public function getValueControlType() { @@ -39,8 +39,8 @@ public function getValueControlTemplate() { return array( 'options' => array( - self::PHASE_FULL => pht('is full'), - self::PHASE_NEW => pht('is new'), + self::PHASE_FULL => pht('is full'), + self::PHASE_NEW => pht('is new'), self::PHASE_WAXING => pht('is waxing'), self::PHASE_WANING => pht('is waning'), ), diff --git a/src/applications/policy/rule/PhabricatorProjectsPolicyRule.php b/src/applications/project/policyrule/PhabricatorProjectsPolicyRule.php rename from src/applications/policy/rule/PhabricatorProjectsPolicyRule.php rename to src/applications/project/policyrule/PhabricatorProjectsPolicyRule.php --- a/src/applications/policy/rule/PhabricatorProjectsPolicyRule.php +++ b/src/applications/project/policyrule/PhabricatorProjectsPolicyRule.php @@ -1,6 +1,7 @@