From 49c45b10c0375120f28dff297103489db440942e Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 1 Oct 2012 14:05:12 -0700 Subject: [PATCH] Add a PhabricatorApplication for files Summary: Basic step toward modernizing Files, makes it appear on /applications/ and in typeahead. Test Plan: Looked at /applications/. Reviewers: btrahan, vrana Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D3575 --- src/__phutil_library_map__.php | 2 + ...AphrontDefaultApplicationConfiguration.php | 20 ------- .../PhabricatorApplicationFiles.php | 56 +++++++++++++++++++ 3 files changed, 58 insertions(+), 20 deletions(-) create mode 100644 src/applications/files/application/PhabricatorApplicationFiles.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index fa9061bf3c..9cdc676350 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -562,6 +562,7 @@ phutil_register_library_map(array( 'PhabricatorApplicationDiffusion' => 'applications/diffusion/application/PhabricatorApplicationDiffusion.php', 'PhabricatorApplicationDiviner' => 'applications/diviner/application/PhabricatorApplicationDiviner.php', 'PhabricatorApplicationFact' => 'applications/fact/application/PhabricatorApplicationFact.php', + 'PhabricatorApplicationFiles' => 'applications/files/application/PhabricatorApplicationFiles.php', 'PhabricatorApplicationFlags' => 'applications/flag/application/PhabricatorApplicationFlags.php', 'PhabricatorApplicationHerald' => 'applications/herald/application/PhabricatorApplicationHerald.php', 'PhabricatorApplicationLaunchView' => 'applications/meta/view/PhabricatorApplicationLaunchView.php', @@ -1726,6 +1727,7 @@ phutil_register_library_map(array( 'PhabricatorApplicationDiffusion' => 'PhabricatorApplication', 'PhabricatorApplicationDiviner' => 'PhabricatorApplication', 'PhabricatorApplicationFact' => 'PhabricatorApplication', + 'PhabricatorApplicationFiles' => 'PhabricatorApplication', 'PhabricatorApplicationFlags' => 'PhabricatorApplication', 'PhabricatorApplicationHerald' => 'PhabricatorApplication', 'PhabricatorApplicationLaunchView' => 'AphrontView', diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php index fa528116fa..7487a234d5 100644 --- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php @@ -39,26 +39,6 @@ class AphrontDefaultApplicationConfiguration '(?:(?P[^/]+)/)?' => 'PhabricatorDirectoryMainController', ), - '/F(?P\d+)' => 'PhabricatorFileShortcutController', - '/file/' => array( - '' => 'PhabricatorFileListController', - 'filter/(?P\w+)/' => 'PhabricatorFileListController', - 'upload/' => 'PhabricatorFileUploadController', - 'dropupload/' => 'PhabricatorFileDropUploadController', - 'delete/(?P\d+)/' => 'PhabricatorFileDeleteController', - 'info/(?P[^/]+)/' => 'PhabricatorFileInfoController', - - 'data/(?P[^/]+)/(?P[^/]+)/.*' - => 'PhabricatorFileDataController', - // TODO: This is a deprecated version of /data/. Remove it after - // old links have had a chance to rot. - 'alt/(?P[^/]+)/(?P[^/]+)/' - => 'PhabricatorFileDataController', - - 'proxy/' => 'PhabricatorFileProxyController', - 'xform/(?P[^/]+)/(?P[^/]+)/' - => 'PhabricatorFileTransformController', - ), '/typeahead/' => array( 'common/(?P\w+)/' diff --git a/src/applications/files/application/PhabricatorApplicationFiles.php b/src/applications/files/application/PhabricatorApplicationFiles.php new file mode 100644 index 0000000000..f0b8e2e47d --- /dev/null +++ b/src/applications/files/application/PhabricatorApplicationFiles.php @@ -0,0 +1,56 @@ +\d+)' => 'PhabricatorFileShortcutController', + '/file/' => array( + '' => 'PhabricatorFileListController', + 'filter/(?P\w+)/' => 'PhabricatorFileListController', + 'upload/' => 'PhabricatorFileUploadController', + 'dropupload/' => 'PhabricatorFileDropUploadController', + 'delete/(?P\d+)/' => 'PhabricatorFileDeleteController', + 'info/(?P[^/]+)/' => 'PhabricatorFileInfoController', + 'data/(?P[^/]+)/(?P[^/]+)/.*' + => 'PhabricatorFileDataController', + 'proxy/' => 'PhabricatorFileProxyController', + 'xform/(?P[^/]+)/(?P[^/]+)/' + => 'PhabricatorFileTransformController', + ), + ); + } + +}