1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Use the long-form "?P<...>" for named capturing subgroups since some versions of

stuff choke on the short form.

Summary:

Test Plan:

Reviewers:

CC:
This commit is contained in:
epriestley 2011-02-07 20:56:27 -08:00
parent 7aa6943890
commit 058cb69308

View file

@ -31,8 +31,8 @@ class AphrontDefaultApplicationConfiguration
'/repository/' => array( '/repository/' => array(
'$' => 'RepositoryListController', '$' => 'RepositoryListController',
'new/$' => 'RepositoryEditController', 'new/$' => 'RepositoryEditController',
'edit/(?<id>\d+)/$' => 'RepositoryEditController', 'edit/(?P<id>\d+)/$' => 'RepositoryEditController',
'delete/(?<id>\d+)/$' => 'RepositoryDeleteController', 'delete/(?P<id>\d+)/$' => 'RepositoryDeleteController',
), ),
'/' => array( '/' => array(
'$' => 'PhabricatorDirectoryMainController', '$' => 'PhabricatorDirectoryMainController',
@ -40,89 +40,89 @@ class AphrontDefaultApplicationConfiguration
'/directory/' => array( '/directory/' => array(
'item/$' 'item/$'
=> 'PhabricatorDirectoryItemListController', => 'PhabricatorDirectoryItemListController',
'item/edit/(?:(?<id>\d+)/)?$' 'item/edit/(?:(?P<id>\d+)/)?$'
=> 'PhabricatorDirectoryItemEditController', => 'PhabricatorDirectoryItemEditController',
'item/delete/(?<id>\d+)/' 'item/delete/(?P<id>\d+)/'
=> 'PhabricatorDirectoryItemDeleteController', => 'PhabricatorDirectoryItemDeleteController',
'category/$' 'category/$'
=> 'PhabricatorDirectoryCategoryListController', => 'PhabricatorDirectoryCategoryListController',
'category/edit/(?:(?<id>\d+)/)?$' 'category/edit/(?:(?P<id>\d+)/)?$'
=> 'PhabricatorDirectoryCategoryEditController', => 'PhabricatorDirectoryCategoryEditController',
'category/delete/(?<id>\d+)/' 'category/delete/(?P<id>\d+)/'
=> 'PhabricatorDirectoryCategoryDeleteController', => 'PhabricatorDirectoryCategoryDeleteController',
), ),
'/file/' => array( '/file/' => array(
'$' => 'PhabricatorFileListController', '$' => 'PhabricatorFileListController',
'upload/$' => 'PhabricatorFileUploadController', 'upload/$' => 'PhabricatorFileUploadController',
'(?<view>info)/(?<phid>[^/]+)/' => 'PhabricatorFileViewController', '(?P<view>info)/(?P<phid>[^/]+)/' => 'PhabricatorFileViewController',
'(?<view>view)/(?<phid>[^/]+)/' => 'PhabricatorFileViewController', '(?P<view>view)/(?P<phid>[^/]+)/' => 'PhabricatorFileViewController',
'(?<view>download)/(?<phid>[^/]+)/' => 'PhabricatorFileViewController', '(?P<view>download)/(?P<phid>[^/]+)/' => 'PhabricatorFileViewController',
), ),
'/phid/' => array( '/phid/' => array(
'$' => 'PhabricatorPHIDLookupController', '$' => 'PhabricatorPHIDLookupController',
'list/$' => 'PhabricatorPHIDListController', 'list/$' => 'PhabricatorPHIDListController',
'type/$' => 'PhabricatorPHIDTypeListController', 'type/$' => 'PhabricatorPHIDTypeListController',
'type/edit/(?:(?<id>\d+)/)?$' => 'PhabricatorPHIDTypeEditController', 'type/edit/(?:(?P<id>\d+)/)?$' => 'PhabricatorPHIDTypeEditController',
'new/$' => 'PhabricatorPHIDAllocateController', 'new/$' => 'PhabricatorPHIDAllocateController',
), ),
'/people/' => array( '/people/' => array(
'$' => 'PhabricatorPeopleListController', '$' => 'PhabricatorPeopleListController',
'edit/(?:(?<username>\w+)/)?$' => 'PhabricatorPeopleEditController', 'edit/(?:(?P<username>\w+)/)?$' => 'PhabricatorPeopleEditController',
), ),
'/p/(?<username>\w+)/$' => 'PhabricatorPeopleProfileController', '/p/(?P<username>\w+)/$' => 'PhabricatorPeopleProfileController',
'/conduit/' => array( '/conduit/' => array(
'$' => 'PhabricatorConduitConsoleController', '$' => 'PhabricatorConduitConsoleController',
'method/(?<method>[^/]+)$' => 'PhabricatorConduitConsoleController', 'method/(?P<method>[^/]+)$' => 'PhabricatorConduitConsoleController',
'log/$' => 'PhabricatorConduitLogController', 'log/$' => 'PhabricatorConduitLogController',
), ),
'/api/(?<method>[^/]+)$' => 'PhabricatorConduitAPIController', '/api/(?P<method>[^/]+)$' => 'PhabricatorConduitAPIController',
'/D(?<id>\d+)' => 'DifferentialRevisionViewController', '/D(?P<id>\d+)' => 'DifferentialRevisionViewController',
'/differential/' => array( '/differential/' => array(
'$' => 'DifferentialRevisionListController', '$' => 'DifferentialRevisionListController',
'filter/(?<filter>\w+)/$' => 'DifferentialRevisionListController', 'filter/(?P<filter>\w+)/$' => 'DifferentialRevisionListController',
'diff/' => array( 'diff/' => array(
'(?<id>\d+)/$' => 'DifferentialDiffViewController', '(?P<id>\d+)/$' => 'DifferentialDiffViewController',
'create/$' => 'DifferentialDiffCreateController', 'create/$' => 'DifferentialDiffCreateController',
), ),
'changeset/$' => 'DifferentialChangesetViewController', 'changeset/$' => 'DifferentialChangesetViewController',
'revision/edit/(?:(?<id>\d+)/)?$' 'revision/edit/(?:(?P<id>\d+)/)?$'
=> 'DifferentialRevisionEditController', => 'DifferentialRevisionEditController',
'comment/' => array( 'comment/' => array(
'preview/(?<id>\d+)/$' => 'DifferentialCommentPreviewController', 'preview/(?P<id>\d+)/$' => 'DifferentialCommentPreviewController',
'save/$' => 'DifferentialCommentSaveController', 'save/$' => 'DifferentialCommentSaveController',
'inline/' => array( 'inline/' => array(
'preview/(?<id>\d+)/$' => 'preview/(?P<id>\d+)/$' =>
'DifferentialInlineCommentPreviewController', 'DifferentialInlineCommentPreviewController',
'edit/(?<id>\d+)/$' => 'DifferentialInlineCommentEditController', 'edit/(?P<id>\d+)/$' => 'DifferentialInlineCommentEditController',
), ),
), ),
), ),
'/res/' => array( '/res/' => array(
'(?<package>pkg/)?(?<hash>[a-f0-9]{8})/(?<path>.+\.(?:css|js))$' '(?P<package>pkg/)?(?P<hash>[a-f0-9]{8})/(?P<path>.+\.(?:css|js))$'
=> 'CelerityResourceController', => 'CelerityResourceController',
), ),
'/typeahead/' => array( '/typeahead/' => array(
'common/(?<type>\w+)/$' 'common/(?P<type>\w+)/$'
=> 'PhabricatorTypeaheadCommonDatasourceController', => 'PhabricatorTypeaheadCommonDatasourceController',
), ),
'/mail/' => array( '/mail/' => array(
'$' => 'PhabricatorMetaMTAListController', '$' => 'PhabricatorMetaMTAListController',
'send/$' => 'PhabricatorMetaMTASendController', 'send/$' => 'PhabricatorMetaMTASendController',
'view/(?<id>\d+)/$' => 'PhabricatorMetaMTAViewController', 'view/(?P<id>\d+)/$' => 'PhabricatorMetaMTAViewController',
'lists/$' => 'PhabricatorMetaMTAMailingListsController', 'lists/$' => 'PhabricatorMetaMTAMailingListsController',
'lists/edit/(?:(?<id>\d+)/)?$' 'lists/edit/(?:(?P<id>\d+)/)?$'
=> 'PhabricatorMetaMTAMailingListEditController', => 'PhabricatorMetaMTAMailingListEditController',
), ),
'/login/' => array( '/login/' => array(
'$' => 'PhabricatorLoginController', '$' => 'PhabricatorLoginController',
'email/$' => 'PhabricatorEmailLoginController', 'email/$' => 'PhabricatorEmailLoginController',
'etoken/(?<token>\w+)/$' => 'PhabricatorEmailTokenController', 'etoken/(?P<token>\w+)/$' => 'PhabricatorEmailTokenController',
), ),
'/logout/$' => 'PhabricatorLogoutController', '/logout/$' => 'PhabricatorLogoutController',
'/facebook-auth/' => array( '/facebook-auth/' => array(
@ -131,13 +131,13 @@ class AphrontDefaultApplicationConfiguration
), ),
'/xhprof/' => array( '/xhprof/' => array(
'profile/(?<phid>[^/]+)/$' => 'PhabricatorXHProfProfileController', 'profile/(?P<phid>[^/]+)/$' => 'PhabricatorXHProfProfileController',
), ),
'/~/' => 'DarkConsoleController', '/~/' => 'DarkConsoleController',
'/settings/' => array( '/settings/' => array(
'(?:page/(?<page>[^/]+)/)?$' => 'PhabricatorUserSettingsController', '(?:page/(?P<page>[^/]+)/)?$' => 'PhabricatorUserSettingsController',
), ),
); );
} }