From 058cb69308bb2ce1443aa772f09476d80eed8143 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 7 Feb 2011 20:56:27 -0800 Subject: [PATCH] Use the long-form "?P<...>" for named capturing subgroups since some versions of stuff choke on the short form. Summary: Test Plan: Reviewers: CC: --- ...AphrontDefaultApplicationConfiguration.php | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php index 26ce23278d..82240be5db 100644 --- a/src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php @@ -31,8 +31,8 @@ class AphrontDefaultApplicationConfiguration '/repository/' => array( '$' => 'RepositoryListController', 'new/$' => 'RepositoryEditController', - 'edit/(?\d+)/$' => 'RepositoryEditController', - 'delete/(?\d+)/$' => 'RepositoryDeleteController', + 'edit/(?P\d+)/$' => 'RepositoryEditController', + 'delete/(?P\d+)/$' => 'RepositoryDeleteController', ), '/' => array( '$' => 'PhabricatorDirectoryMainController', @@ -40,89 +40,89 @@ class AphrontDefaultApplicationConfiguration '/directory/' => array( 'item/$' => 'PhabricatorDirectoryItemListController', - 'item/edit/(?:(?\d+)/)?$' + 'item/edit/(?:(?P\d+)/)?$' => 'PhabricatorDirectoryItemEditController', - 'item/delete/(?\d+)/' + 'item/delete/(?P\d+)/' => 'PhabricatorDirectoryItemDeleteController', 'category/$' => 'PhabricatorDirectoryCategoryListController', - 'category/edit/(?:(?\d+)/)?$' + 'category/edit/(?:(?P\d+)/)?$' => 'PhabricatorDirectoryCategoryEditController', - 'category/delete/(?\d+)/' + 'category/delete/(?P\d+)/' => 'PhabricatorDirectoryCategoryDeleteController', ), '/file/' => array( '$' => 'PhabricatorFileListController', 'upload/$' => 'PhabricatorFileUploadController', - '(?info)/(?[^/]+)/' => 'PhabricatorFileViewController', - '(?view)/(?[^/]+)/' => 'PhabricatorFileViewController', - '(?download)/(?[^/]+)/' => 'PhabricatorFileViewController', + '(?Pinfo)/(?P[^/]+)/' => 'PhabricatorFileViewController', + '(?Pview)/(?P[^/]+)/' => 'PhabricatorFileViewController', + '(?Pdownload)/(?P[^/]+)/' => 'PhabricatorFileViewController', ), '/phid/' => array( '$' => 'PhabricatorPHIDLookupController', 'list/$' => 'PhabricatorPHIDListController', 'type/$' => 'PhabricatorPHIDTypeListController', - 'type/edit/(?:(?\d+)/)?$' => 'PhabricatorPHIDTypeEditController', + 'type/edit/(?:(?P\d+)/)?$' => 'PhabricatorPHIDTypeEditController', 'new/$' => 'PhabricatorPHIDAllocateController', ), '/people/' => array( '$' => 'PhabricatorPeopleListController', - 'edit/(?:(?\w+)/)?$' => 'PhabricatorPeopleEditController', + 'edit/(?:(?P\w+)/)?$' => 'PhabricatorPeopleEditController', ), - '/p/(?\w+)/$' => 'PhabricatorPeopleProfileController', + '/p/(?P\w+)/$' => 'PhabricatorPeopleProfileController', '/conduit/' => array( '$' => 'PhabricatorConduitConsoleController', - 'method/(?[^/]+)$' => 'PhabricatorConduitConsoleController', + 'method/(?P[^/]+)$' => 'PhabricatorConduitConsoleController', 'log/$' => 'PhabricatorConduitLogController', ), - '/api/(?[^/]+)$' => 'PhabricatorConduitAPIController', + '/api/(?P[^/]+)$' => 'PhabricatorConduitAPIController', - '/D(?\d+)' => 'DifferentialRevisionViewController', + '/D(?P\d+)' => 'DifferentialRevisionViewController', '/differential/' => array( '$' => 'DifferentialRevisionListController', - 'filter/(?\w+)/$' => 'DifferentialRevisionListController', + 'filter/(?P\w+)/$' => 'DifferentialRevisionListController', 'diff/' => array( - '(?\d+)/$' => 'DifferentialDiffViewController', + '(?P\d+)/$' => 'DifferentialDiffViewController', 'create/$' => 'DifferentialDiffCreateController', ), 'changeset/$' => 'DifferentialChangesetViewController', - 'revision/edit/(?:(?\d+)/)?$' + 'revision/edit/(?:(?P\d+)/)?$' => 'DifferentialRevisionEditController', 'comment/' => array( - 'preview/(?\d+)/$' => 'DifferentialCommentPreviewController', + 'preview/(?P\d+)/$' => 'DifferentialCommentPreviewController', 'save/$' => 'DifferentialCommentSaveController', 'inline/' => array( - 'preview/(?\d+)/$' => + 'preview/(?P\d+)/$' => 'DifferentialInlineCommentPreviewController', - 'edit/(?\d+)/$' => 'DifferentialInlineCommentEditController', + 'edit/(?P\d+)/$' => 'DifferentialInlineCommentEditController', ), ), ), '/res/' => array( - '(?pkg/)?(?[a-f0-9]{8})/(?.+\.(?:css|js))$' + '(?Ppkg/)?(?P[a-f0-9]{8})/(?P.+\.(?:css|js))$' => 'CelerityResourceController', ), '/typeahead/' => array( - 'common/(?\w+)/$' + 'common/(?P\w+)/$' => 'PhabricatorTypeaheadCommonDatasourceController', ), '/mail/' => array( '$' => 'PhabricatorMetaMTAListController', 'send/$' => 'PhabricatorMetaMTASendController', - 'view/(?\d+)/$' => 'PhabricatorMetaMTAViewController', + 'view/(?P\d+)/$' => 'PhabricatorMetaMTAViewController', 'lists/$' => 'PhabricatorMetaMTAMailingListsController', - 'lists/edit/(?:(?\d+)/)?$' + 'lists/edit/(?:(?P\d+)/)?$' => 'PhabricatorMetaMTAMailingListEditController', ), '/login/' => array( '$' => 'PhabricatorLoginController', 'email/$' => 'PhabricatorEmailLoginController', - 'etoken/(?\w+)/$' => 'PhabricatorEmailTokenController', + 'etoken/(?P\w+)/$' => 'PhabricatorEmailTokenController', ), '/logout/$' => 'PhabricatorLogoutController', '/facebook-auth/' => array( @@ -131,13 +131,13 @@ class AphrontDefaultApplicationConfiguration ), '/xhprof/' => array( - 'profile/(?[^/]+)/$' => 'PhabricatorXHProfProfileController', + 'profile/(?P[^/]+)/$' => 'PhabricatorXHProfProfileController', ), '/~/' => 'DarkConsoleController', '/settings/' => array( - '(?:page/(?[^/]+)/)?$' => 'PhabricatorUserSettingsController', + '(?:page/(?P[^/]+)/)?$' => 'PhabricatorUserSettingsController', ), ); }