diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index 91acc55a8f..004a38e44a 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -1,504 +1,498 @@ pht('Core Applications'), - self::GROUP_COMMUNICATION => pht('Communication'), - self::GROUP_ORGANIZATION => pht('Organization'), self::GROUP_UTILITIES => pht('Utilities'), self::GROUP_ADMIN => pht('Administration'), self::GROUP_DEVELOPER => pht('Developer Tools'), - self::GROUP_MISC => pht('Miscellaneous Applications'), ); } public static function getTileDisplayName($constant) { $names = array( self::TILE_INVISIBLE => pht('Invisible'), self::TILE_HIDE => pht('Hidden'), self::TILE_SHOW => pht('Show Small Tile'), self::TILE_FULL => pht('Show Large Tile'), ); return idx($names, $constant); } /* -( Application Information )-------------------------------------------- */ public function getName() { return substr(get_class($this), strlen('PhabricatorApplication')); } public function getShortDescription() { return $this->getName().' Application'; } public function isInstalled() { if (!$this->canUninstall()) { return true; } $beta = PhabricatorEnv::getEnvConfig('phabricator.show-beta-applications'); if (!$beta && $this->isBeta()) { return false; } $uninstalled = PhabricatorEnv::getEnvConfig( 'phabricator.uninstalled-applications'); return empty($uninstalled[get_class($this)]); } public function isBeta() { return false; } /** * Return true if this application should not appear in application lists in * the UI. Primarily intended for unit test applications or other * pseudo-applications. * * @return bool True to remove application from UI lists. */ public function isUnlisted() { return false; } /** * Returns true if an application is first-party (developed by Phacility) * and false otherwise. * * @return bool True if this application is developed by Phacility. */ final public function isFirstParty() { $where = id(new ReflectionClass($this))->getFileName(); $root = phutil_get_library_root('phabricator'); if (!Filesystem::isDescendant($where, $root)) { return false; } if (Filesystem::isDescendant($where, $root.'/extensions')) { return false; } return true; } public function canUninstall() { return true; } public function getPHID() { return 'PHID-APPS-'.get_class($this); } public function getTypeaheadURI() { return $this->getBaseURI(); } public function getBaseURI() { return null; } public function getApplicationURI($path = '') { return $this->getBaseURI().ltrim($path, '/'); } public function getIconURI() { return null; } public function getIconName() { return 'application'; } public function shouldAppearInLaunchView() { return true; } public function getApplicationOrder() { return PHP_INT_MAX; } public function getApplicationGroup() { - return self::GROUP_MISC; + return self::GROUP_CORE; } public function getTitleGlyph() { return null; } public function getHelpURI() { return null; } public function getOverview() { return null; } public function getEventListeners() { return array(); } public function getDefaultTileDisplay(PhabricatorUser $user) { switch ($this->getApplicationGroup()) { case self::GROUP_CORE: return self::TILE_FULL; case self::GROUP_UTILITIES: case self::GROUP_DEVELOPER: return self::TILE_HIDE; case self::GROUP_ADMIN: if ($user->getIsAdmin()) { return self::TILE_SHOW; } else { return self::TILE_INVISIBLE; } break; default: return self::TILE_SHOW; } } public function getRemarkupRules() { return array(); } /* -( URI Routing )-------------------------------------------------------- */ public function getRoutes() { return array(); } /* -( Fact Integration )--------------------------------------------------- */ public function getFactObjectsForAnalysis() { return array(); } /* -( UI Integration )----------------------------------------------------- */ /** * Render status elements (like "3 Waiting Reviews") for application list * views. These provide a way to alert users to new or pending action items * in applications. * * @param PhabricatorUser Viewing user. * @return list Application status elements. * @task ui */ public function loadStatus(PhabricatorUser $user) { return array(); } /** * You can provide an optional piece of flavor text for the application. This * is currently rendered in application launch views if the application has no * status elements. * * @return string|null Flavor text. * @task ui */ public function getFlavorText() { return null; } /** * Build items for the main menu. * * @param PhabricatorUser The viewing user. * @param AphrontController The current controller. May be null for special * pages like 404, exception handlers, etc. * @return list List of menu items. * @task ui */ public function buildMainMenuItems( PhabricatorUser $user, PhabricatorController $controller = null) { return array(); } /** * Build extra items for the main menu. Generally, this is used to render * static dropdowns. * * @param PhabricatorUser The viewing user. * @param AphrontController The current controller. May be null for special * pages like 404, exception handlers, etc. * @return view List of menu items. * @task ui */ public function buildMainMenuExtraNodes( PhabricatorUser $viewer, PhabricatorController $controller = null) { return array(); } /** * Build items for the "quick create" menu. * * @param PhabricatorUser The viewing user. * @return list List of menu items. */ public function getQuickCreateItems(PhabricatorUser $viewer) { return array(); } /* -( Application Management )--------------------------------------------- */ public static function getByClass($class_name) { $selected = null; $applications = PhabricatorApplication::getAllApplications(); foreach ($applications as $application) { if (get_class($application) == $class_name) { $selected = $application; break; } } if (!$selected) { throw new Exception("No application '{$class_name}'!"); } return $selected; } public static function getAllApplications() { static $applications; if ($applications === null) { $apps = id(new PhutilSymbolLoader()) ->setAncestorClass(__CLASS__) ->loadObjects(); // Reorder the applications into "application order". Notably, this // ensures their event handlers register in application order. $apps = msort($apps, 'getApplicationOrder'); $apps = mgroup($apps, 'getApplicationGroup'); $group_order = array_keys(self::getApplicationGroups()); $apps = array_select_keys($apps, $group_order) + $apps; $apps = array_mergev($apps); $applications = $apps; } return $applications; } public static function getAllInstalledApplications() { $all_applications = self::getAllApplications(); $apps = array(); foreach ($all_applications as $app) { if (!$app->isInstalled()) { continue; } $apps[] = $app; } return $apps; } /** * Determine if an application is installed, by application class name. * * To check if an application is installed //and// available to a particular * viewer, user @{method:isClassInstalledForViewer}. * * @param string Application class name. * @return bool True if the class is installed. * @task meta */ public static function isClassInstalled($class) { return self::getByClass($class)->isInstalled(); } /** * Determine if an application is installed and available to a viewer, by * application class name. * * To check if an application is installed at all, use * @{method:isClassInstalled}. * * @param string Application class name. * @param PhabricatorUser Viewing user. * @return bool True if the class is installed for the viewer. * @task meta */ public static function isClassInstalledForViewer( $class, PhabricatorUser $viewer) { if (!self::isClassInstalled($class)) { return false; } return PhabricatorPolicyFilter::hasCapability( $viewer, self::getByClass($class), PhabricatorPolicyCapability::CAN_VIEW); } /* -( PhabricatorPolicyInterface )----------------------------------------- */ public function getCapabilities() { return array_merge( array( PhabricatorPolicyCapability::CAN_VIEW, PhabricatorPolicyCapability::CAN_EDIT, ), array_keys($this->getCustomCapabilities())); } public function getPolicy($capability) { $default = $this->getCustomPolicySetting($capability); if ($default) { return $default; } switch ($capability) { case PhabricatorPolicyCapability::CAN_VIEW: return PhabricatorPolicies::getMostOpenPolicy(); case PhabricatorPolicyCapability::CAN_EDIT: return PhabricatorPolicies::POLICY_ADMIN; default: $spec = $this->getCustomCapabilitySpecification($capability); return idx($spec, 'default', PhabricatorPolicies::POLICY_USER); } } public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { return false; } public function describeAutomaticCapability($capability) { return null; } /* -( Policies )----------------------------------------------------------- */ protected function getCustomCapabilities() { return array(); } private function getCustomPolicySetting($capability) { if (!$this->isCapabilityEditable($capability)) { return null; } $config = PhabricatorEnv::getEnvConfig('phabricator.application-settings'); $app = idx($config, $this->getPHID()); if (!$app) { return null; } $policy = idx($app, 'policy'); if (!$policy) { return null; } return idx($policy, $capability); } private function getCustomCapabilitySpecification($capability) { $custom = $this->getCustomCapabilities(); if (!isset($custom[$capability])) { throw new Exception("Unknown capability '{$capability}'!"); } return $custom[$capability]; } public function getCapabilityLabel($capability) { switch ($capability) { case PhabricatorPolicyCapability::CAN_VIEW: return pht('Can Use Application'); case PhabricatorPolicyCapability::CAN_EDIT: return pht('Can Configure Application'); } $capobj = PhabricatorPolicyCapability::getCapabilityByKey($capability); if ($capobj) { return $capobj->getCapabilityName(); } return null; } public function isCapabilityEditable($capability) { switch ($capability) { case PhabricatorPolicyCapability::CAN_VIEW: return $this->canUninstall(); case PhabricatorPolicyCapability::CAN_EDIT: return false; default: $spec = $this->getCustomCapabilitySpecification($capability); return idx($spec, 'edit', true); } } public function getCapabilityCaption($capability) { switch ($capability) { case PhabricatorPolicyCapability::CAN_VIEW: if (!$this->canUninstall()) { return pht( 'This application is required for Phabricator to operate, so all '. 'users must have access to it.'); } else { return null; } case PhabricatorPolicyCapability::CAN_EDIT: return null; default: $spec = $this->getCustomCapabilitySpecification($capability); return idx($spec, 'caption'); } } } diff --git a/src/applications/calendar/application/PhabricatorApplicationCalendar.php b/src/applications/calendar/application/PhabricatorApplicationCalendar.php index 18c6b12d11..3925792f81 100644 --- a/src/applications/calendar/application/PhabricatorApplicationCalendar.php +++ b/src/applications/calendar/application/PhabricatorApplicationCalendar.php @@ -1,68 +1,64 @@ array( '' => 'PhabricatorCalendarViewController', 'all/' => 'PhabricatorCalendarBrowseController', 'event/' => array( '(?:query/(?P[^/]+)/)?' => 'PhabricatorCalendarEventListController', 'create/' => 'PhabricatorCalendarEventEditController', 'edit/(?P[1-9]\d*)/' => 'PhabricatorCalendarEventEditController', 'delete/(?P[1-9]\d*)/' => 'PhabricatorCalendarEventDeleteController', 'view/(?P[1-9]\d*)/' => 'PhabricatorCalendarEventViewController', ), ), ); } public function getQuickCreateItems(PhabricatorUser $viewer) { $items = array(); $item = id(new PHUIListItemView()) ->setName(pht('Calendar Event')) ->setIcon('fa-calendar') ->setHref($this->getBaseURI().'event/create/'); $items[] = $item; return $items; } } diff --git a/src/applications/chatlog/applications/PhabricatorApplicationChatLog.php b/src/applications/chatlog/applications/PhabricatorApplicationChatLog.php index 018cae36c0..9ef90f6d33 100644 --- a/src/applications/chatlog/applications/PhabricatorApplicationChatLog.php +++ b/src/applications/chatlog/applications/PhabricatorApplicationChatLog.php @@ -1,40 +1,40 @@ array( '' => 'PhabricatorChatLogChannelListController', 'channel/(?P[^/]+)/' => 'PhabricatorChatLogChannelLogController', ), ); } } diff --git a/src/applications/conpherence/application/PhabricatorApplicationConpherence.php b/src/applications/conpherence/application/PhabricatorApplicationConpherence.php index d86cb67722..671066f011 100644 --- a/src/applications/conpherence/application/PhabricatorApplicationConpherence.php +++ b/src/applications/conpherence/application/PhabricatorApplicationConpherence.php @@ -1,63 +1,56 @@ array( '' => 'ConpherenceListController', 'thread/(?P[1-9]\d*)/' => 'ConpherenceListController', '(?P[1-9]\d*)/' => 'ConpherenceViewController', 'new/' => 'ConpherenceNewController', 'panel/' => 'ConpherenceNotificationPanelController', 'widget/(?P[1-9]\d*)/' => 'ConpherenceWidgetController', 'update/(?P[1-9]\d*)/' => 'ConpherenceUpdateController', ), ); } public function getQuickCreateItems(PhabricatorUser $viewer) { $items = array(); $item = id(new PHUIListItemView()) ->setName(pht('Conpherence Thread')) ->setIcon('fa-comments') ->setWorkflow(true) ->setHref($this->getBaseURI().'new/'); $items[] = $item; return $items; } } diff --git a/src/applications/feed/application/PhabricatorApplicationFeed.php b/src/applications/feed/application/PhabricatorApplicationFeed.php index b30da72fe5..12e37a33e7 100644 --- a/src/applications/feed/application/PhabricatorApplicationFeed.php +++ b/src/applications/feed/application/PhabricatorApplicationFeed.php @@ -1,35 +1,31 @@ array( 'public/' => 'PhabricatorFeedPublicStreamController', '(?P\d+)/' => 'PhabricatorFeedDetailController', '(?:query/(?P[^/]+)/)?' => 'PhabricatorFeedListController', ), ); } - public function getApplicationGroup() { - return self::GROUP_COMMUNICATION; - } - } diff --git a/src/applications/herald/application/PhabricatorApplicationHerald.php b/src/applications/herald/application/PhabricatorApplicationHerald.php index c72d73717c..b6dc4be7d8 100644 --- a/src/applications/herald/application/PhabricatorApplicationHerald.php +++ b/src/applications/herald/application/PhabricatorApplicationHerald.php @@ -1,70 +1,70 @@ array( '(?:query/(?P[^/]+)/)?' => 'HeraldRuleListController', 'new/' => 'HeraldNewController', 'rule/(?P[1-9]\d*)/' => 'HeraldRuleViewController', 'edit/(?:(?P[1-9]\d*)/)?' => 'HeraldRuleController', 'disable/(?P[1-9]\d*)/(?P\w+)/' => 'HeraldDisableController', 'history/(?:(?P[1-9]\d*)/)?' => 'HeraldRuleEditHistoryController', 'test/' => 'HeraldTestConsoleController', 'transcript/' => array( '' => 'HeraldTranscriptListController', '(?:query/(?P[^/]+)/)?' => 'HeraldTranscriptListController', '(?P[1-9]\d*)/(?:(?P\w+)/)?' => 'HeraldTranscriptController', ) ) ); } protected function getCustomCapabilities() { return array( HeraldCapabilityManageGlobalRules::CAPABILITY => array( 'caption' => pht('Global rules can bypass access controls.'), 'default' => PhabricatorPolicies::POLICY_ADMIN, ), ); } } diff --git a/src/applications/legalpad/application/PhabricatorApplicationLegalpad.php b/src/applications/legalpad/application/PhabricatorApplicationLegalpad.php index 999e20b646..a8d8d8302c 100644 --- a/src/applications/legalpad/application/PhabricatorApplicationLegalpad.php +++ b/src/applications/legalpad/application/PhabricatorApplicationLegalpad.php @@ -1,66 +1,66 @@ \d+)' => 'LegalpadDocumentSignController', '/legalpad/' => array( '' => 'LegalpadDocumentListController', '(query/(?P[^/]+)/)?' => 'LegalpadDocumentListController', 'create/' => 'LegalpadDocumentEditController', 'edit/(?P\d+)/' => 'LegalpadDocumentEditController', 'comment/(?P\d+)/' => 'LegalpadDocumentCommentController', 'view/(?P\d+)/' => 'LegalpadDocumentViewController', 'verify/(?P[^/]+)/' => 'LegalpadDocumentSignatureVerificationController', 'signatures/(?P\d+)/' => 'LegalpadDocumentSignatureListController', 'document/' => array( 'preview/' => 'PhabricatorMarkupPreviewController'), )); } protected function getCustomCapabilities() { return array( LegalpadCapabilityDefaultView::CAPABILITY => array( ), LegalpadCapabilityDefaultEdit::CAPABILITY => array( ), ); } } diff --git a/src/applications/meta/application/PhabricatorApplicationApplications.php b/src/applications/meta/application/PhabricatorApplicationApplications.php index 847e0f2c2b..00ba761645 100644 --- a/src/applications/meta/application/PhabricatorApplicationApplications.php +++ b/src/applications/meta/application/PhabricatorApplicationApplications.php @@ -1,44 +1,40 @@ array( '(?:query/(?P[^/]+)/)?' => 'PhabricatorApplicationsListController', 'view/(?P\w+)/' => 'PhabricatorApplicationDetailViewController', 'edit/(?P\w+)/' => 'PhabricatorApplicationEditController', '(?P\w+)/(?Pinstall|uninstall)/' => 'PhabricatorApplicationUninstallController', ), ); } } diff --git a/src/applications/people/application/PhabricatorApplicationPeople.php b/src/applications/people/application/PhabricatorApplicationPeople.php index d387b0f882..aebf1383d7 100644 --- a/src/applications/people/application/PhabricatorApplicationPeople.php +++ b/src/applications/people/application/PhabricatorApplicationPeople.php @@ -1,162 +1,158 @@ array( '(query/(?P[^/]+)/)?' => 'PhabricatorPeopleListController', 'logs/(?:query/(?P[^/]+)/)?' => 'PhabricatorPeopleLogsController', 'approve/(?P[1-9]\d*)/' => 'PhabricatorPeopleApproveController', '(?Pdisapprove)/(?P[1-9]\d*)/' => 'PhabricatorPeopleDisableController', '(?Pdisable)/(?P[1-9]\d*)/' => 'PhabricatorPeopleDisableController', 'empower/(?P[1-9]\d*)/' => 'PhabricatorPeopleEmpowerController', 'delete/(?P[1-9]\d*)/' => 'PhabricatorPeopleDeleteController', 'rename/(?P[1-9]\d*)/' => 'PhabricatorPeopleRenameController', 'welcome/(?P[1-9]\d*)/' => 'PhabricatorPeopleWelcomeController', 'create/' => 'PhabricatorPeopleCreateController', 'new/(?P[^/]+)/' => 'PhabricatorPeopleNewController', 'ldap/' => 'PhabricatorPeopleLdapController', 'editprofile/(?P[1-9]\d*)/' => 'PhabricatorPeopleProfileEditController', 'picture/(?P[1-9]\d*)/' => 'PhabricatorPeopleProfilePictureController', ), '/p/(?P[\w._-]+)/' => 'PhabricatorPeopleProfileController', '/p/(?P[\w._-]+)/calendar/' => 'PhabricatorPeopleCalendarController', ); } public function getRemarkupRules() { return array( new PhabricatorRemarkupRuleMention(), ); } protected function getCustomCapabilities() { return array( PeopleCapabilityBrowseUserDirectory::CAPABILITY => array( ), ); } public function loadStatus(PhabricatorUser $user) { if (!$user->getIsAdmin()) { return array(); } $need_approval = id(new PhabricatorPeopleQuery()) ->setViewer($user) ->withIsApproved(false) ->withIsDisabled(false) ->execute(); if (!$need_approval) { return array(); } $status = array(); $count = count($need_approval); $type = PhabricatorApplicationStatusView::TYPE_NEEDS_ATTENTION; $status[] = id(new PhabricatorApplicationStatusView()) ->setType($type) ->setText(pht('%d User(s) Need Approval', $count)) ->setCount($count); return $status; } public function buildMainMenuItems( PhabricatorUser $user, PhabricatorController $controller = null) { $items = array(); if ($user->isLoggedIn() && $user->isUserActivated()) { $image = $user->loadProfileImageURI(); $item = id(new PHUIListItemView()) ->setName($user->getUsername()) ->setHref('/p/'.$user->getUsername().'/') ->addClass('core-menu-item') ->setAural(pht('Profile')) ->setOrder(100); $classes = array( 'phabricator-core-menu-icon', 'phabricator-core-menu-profile-image', ); $item->appendChild( phutil_tag( 'span', array( 'class' => implode(' ', $classes), 'style' => 'background-image: url('.$image.')', ), '')); $items[] = $item; } return $items; } public function getQuickCreateItems(PhabricatorUser $viewer) { $items = array(); if ($viewer->getIsAdmin()) { $item = id(new PHUIListItemView()) ->setName(pht('User Account')) ->setIcon('fa-users') ->setHref($this->getBaseURI().'create/'); $items[] = $item; } return $items; } } diff --git a/src/applications/phame/application/PhabricatorApplicationPhame.php b/src/applications/phame/application/PhabricatorApplicationPhame.php index d254d871cb..e66e02c871 100644 --- a/src/applications/phame/application/PhabricatorApplicationPhame.php +++ b/src/applications/phame/application/PhabricatorApplicationPhame.php @@ -1,66 +1,62 @@ array( '' => 'PhamePostListController', 'r/(?P\d+)/(?P[^/]+)/(?P.*)' => 'PhameResourceController', 'live/(?P[^/]+)/(?P.*)' => 'PhameBlogLiveController', 'post/' => array( '(?:(?Pdraft|all)/)?' => 'PhamePostListController', 'blogger/(?P[\w\.-_]+)/' => 'PhamePostListController', 'delete/(?P[^/]+)/' => 'PhamePostDeleteController', 'edit/(?:(?P[^/]+)/)?' => 'PhamePostEditController', 'view/(?P\d+)/' => 'PhamePostViewController', 'publish/(?P\d+)/' => 'PhamePostPublishController', 'unpublish/(?P\d+)/' => 'PhamePostUnpublishController', 'notlive/(?P\d+)/' => 'PhamePostNotLiveController', 'preview/' => 'PhamePostPreviewController', 'framed/(?P\d+)/' => 'PhamePostFramedController', 'new/' => 'PhamePostNewController', 'move/(?P\d+)/' => 'PhamePostNewController' ), 'blog/' => array( '(?:(?Puser|all)/)?' => 'PhameBlogListController', 'delete/(?P[^/]+)/' => 'PhameBlogDeleteController', 'edit/(?P[^/]+)/' => 'PhameBlogEditController', 'view/(?P[^/]+)/' => 'PhameBlogViewController', 'feed/(?P[^/]+)/' => 'PhameBlogFeedController', 'new/' => 'PhameBlogEditController', ), ), ); } } diff --git a/src/applications/pholio/application/PhabricatorApplicationPholio.php b/src/applications/pholio/application/PhabricatorApplicationPholio.php index 500ee5098b..b93d825402 100644 --- a/src/applications/pholio/application/PhabricatorApplicationPholio.php +++ b/src/applications/pholio/application/PhabricatorApplicationPholio.php @@ -1,89 +1,84 @@ [1-9]\d*)(?:/(?P\d+)/)?' => 'PholioMockViewController', '/pholio/' => array( '(?:query/(?P[^/]+)/)?' => 'PholioMockListController', 'new/' => 'PholioMockEditController', 'edit/(?P\d+)/' => 'PholioMockEditController', 'comment/(?P\d+)/' => 'PholioMockCommentController', 'inline/' => array( '(?P\d+)/' => 'PholioInlineController', 'save/' => 'PholioInlineSaveController', 'delete/(?P\d+)/' => 'PholioInlineDeleteController', 'view/(?P\d+)/' => 'PholioInlineViewController', 'edit/(?P\d+)/' => 'PholioInlineEditController', 'thumb/(?P\d+)/' => 'PholioInlineThumbController' ), 'image/' => array( 'upload/' => 'PholioImageUploadController', 'history/(?P\d+)/' => 'PholioImageHistoryController', ), ), ); } public function getQuickCreateItems(PhabricatorUser $viewer) { $items = array(); $item = id(new PHUIListItemView()) ->setName(pht('Pholio Mock')) ->setIcon('fa-picture-o') ->setHref($this->getBaseURI().'new/'); $items[] = $item; return $items; } protected function getCustomCapabilities() { return array( PholioCapabilityDefaultView::CAPABILITY => array( ), ); } } diff --git a/src/applications/phriction/application/PhabricatorApplicationPhriction.php b/src/applications/phriction/application/PhabricatorApplicationPhriction.php index 6fdc116c65..e6fc014ec7 100644 --- a/src/applications/phriction/application/PhabricatorApplicationPhriction.php +++ b/src/applications/phriction/application/PhabricatorApplicationPhriction.php @@ -1,69 +1,65 @@ /)' => 'PhrictionDocumentController', // Match "/w/x/y/z/" with slug "x/y/z/". '/w/(?P.+/)' => 'PhrictionDocumentController', '/phriction/' => array( '(?:query/(?P[^/]+)/)?' => 'PhrictionListController', 'history(?P/)' => 'PhrictionHistoryController', 'history/(?P.+/)' => 'PhrictionHistoryController', 'edit/(?:(?P[1-9]\d*)/)?' => 'PhrictionEditController', 'delete/(?P[1-9]\d*)/' => 'PhrictionDeleteController', 'new/' => 'PhrictionNewController', 'move/(?:(?P[1-9]\d*)/)?' => 'PhrictionMoveController', 'preview/' => 'PhabricatorMarkupPreviewController', 'diff/(?P[1-9]\d*)/' => 'PhrictionDiffController', ), ); } - public function getApplicationGroup() { - return self::GROUP_COMMUNICATION; - } - public function getApplicationOrder() { return 0.140; } } diff --git a/src/applications/ponder/application/PhabricatorApplicationPonder.php b/src/applications/ponder/application/PhabricatorApplicationPonder.php index 0821533460..2e0279d0e8 100644 --- a/src/applications/ponder/application/PhabricatorApplicationPonder.php +++ b/src/applications/ponder/application/PhabricatorApplicationPonder.php @@ -1,68 +1,64 @@ [1-9]\d*)' => 'PonderQuestionViewController', '/ponder/' => array( '(?:query/(?P[^/]+)/)?' => 'PonderQuestionListController', 'answer/add/' => 'PonderAnswerSaveController', 'answer/edit/(?P\d+)/' => 'PonderAnswerEditController', 'answer/comment/(?P\d+)/' => 'PonderAnswerCommentController', 'answer/history/(?P\d+)/' => 'PonderAnswerHistoryController', 'question/edit/(?:(?P\d+)/)?' => 'PonderQuestionEditController', 'question/comment/(?P\d+)/' => 'PonderQuestionCommentController', 'question/history/(?P\d+)/' => 'PonderQuestionHistoryController', 'preview/' => 'PhabricatorMarkupPreviewController', 'question/(?Popen|close)/(?P[1-9]\d*)/' => 'PonderQuestionStatusController', 'vote/' => 'PonderVoteSaveController', ), ); } } diff --git a/src/applications/project/application/PhabricatorApplicationProject.php b/src/applications/project/application/PhabricatorApplicationProject.php index 60c13fb62e..15268a75c1 100644 --- a/src/applications/project/application/PhabricatorApplicationProject.php +++ b/src/applications/project/application/PhabricatorApplicationProject.php @@ -1,87 +1,83 @@ array( '(?:query/(?P[^/]+)/)?' => 'PhabricatorProjectListController', 'filter/(?P[^/]+)/' => 'PhabricatorProjectListController', 'edit/(?P[1-9]\d*)/' => 'PhabricatorProjectEditMainController', 'details/(?P[1-9]\d*)/' => 'PhabricatorProjectEditDetailsController', 'archive/(?P[1-9]\d*)/' => 'PhabricatorProjectArchiveController', 'members/(?P[1-9]\d*)/' => 'PhabricatorProjectMembersEditController', 'members/(?P[1-9]\d*)/remove/' => 'PhabricatorProjectMembersRemoveController', 'view/(?P[1-9]\d*)/' => 'PhabricatorProjectProfileController', 'picture/(?P[1-9]\d*)/' => 'PhabricatorProjectEditPictureController', 'icon/(?P[1-9]\d*)/' => 'PhabricatorProjectEditIconController', 'create/' => 'PhabricatorProjectCreateController', 'board/(?P[1-9]\d*)/'. '(?Pfilter/)?'. '(?:query/(?P[^/]+)/)?' => 'PhabricatorProjectBoardViewController', 'move/(?P[1-9]\d*)/' => 'PhabricatorProjectMoveController', 'board/(?P[1-9]\d*)/edit/(?:(?P\d+)/)?' => 'PhabricatorProjectBoardEditController', 'board/(?P[1-9]\d*)/delete/(?:(?P\d+)/)?' => 'PhabricatorProjectBoardDeleteController', 'board/(?P[1-9]\d*)/column/(?:(?P\d+)/)?' => 'PhabricatorProjectColumnDetailController', 'update/(?P[1-9]\d*)/(?P[^/]+)/' => 'PhabricatorProjectUpdateController', 'history/(?P[1-9]\d*)/' => 'PhabricatorProjectHistoryController', '(?Pwatch|unwatch)/(?P[1-9]\d*)/' => 'PhabricatorProjectWatchController', ), '/tag/' => array( '(?P[^/]+)/' => 'PhabricatorProjectProfileController', ), ); } protected function getCustomCapabilities() { return array( ProjectCapabilityCreateProjects::CAPABILITY => array( ), ); } } diff --git a/src/applications/releeph/application/PhabricatorApplicationReleeph.php b/src/applications/releeph/application/PhabricatorApplicationReleeph.php index 79f7a24961..78691c3772 100644 --- a/src/applications/releeph/application/PhabricatorApplicationReleeph.php +++ b/src/applications/releeph/application/PhabricatorApplicationReleeph.php @@ -1,88 +1,84 @@ [1-9]\d*)' => 'ReleephRequestViewController', // TODO: Remove these older routes eventually. '/RQ(?P[1-9]\d*)' => 'ReleephRequestViewController', '/releeph/request/(?P[1-9]\d*)/' => 'ReleephRequestViewController', '/releeph/' => array( '' => 'ReleephProductListController', '(?:product|project)/' => array( '(?:query/(?P[^/]+)/)?' => 'ReleephProductListController', 'create/' => 'ReleephProductCreateController', '(?P[1-9]\d*)/' => array( '(?:query/(?P[^/]+)/)?' => 'ReleephProductViewController', 'edit/' => 'ReleephProductEditController', 'cutbranch/' => 'ReleephBranchCreateController', 'action/(?P.+)/' => 'ReleephProductActionController', 'history/' => 'ReleephProductHistoryController', ), ), 'branch/' => array( 'edit/(?P[1-9]\d*)/' => 'ReleephBranchEditController', '(?Pclose|re-open)/(?P[1-9]\d*)/' => 'ReleephBranchAccessController', 'preview/' => 'ReleephBranchNamePreviewController', '(?P[1-9]\d*)/' => array( 'history/' => 'ReleephBranchHistoryController', '(?:query/(?P[^/]+)/)?' => 'ReleephBranchViewController', ), 'pull/(?P[1-9]\d*)/' => 'ReleephRequestEditController', ), 'request/' => array( 'create/' => 'ReleephRequestEditController', 'differentialcreate/' => array( 'D(?P[1-9]\d*)' => 'ReleephRequestDifferentialCreateController', ), 'edit/(?P[1-9]\d*)/' => 'ReleephRequestEditController', 'action/(?P.+)/(?P[1-9]\d*)/' => 'ReleephRequestActionController', 'typeahead/' => 'ReleephRequestTypeaheadController', 'comment/(?P[1-9]\d*)/' => 'ReleephRequestCommentController', ), ) ); } }