diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index ce2caee3ea..c9e540312e 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1129,6 +1129,7 @@ phutil_register_library_map(array( 'PhabricatorApplicationSlowvote' => 'applications/slowvote/application/PhabricatorApplicationSlowvote.php', 'PhabricatorApplicationStatusView' => 'applications/meta/view/PhabricatorApplicationStatusView.php', 'PhabricatorApplicationSubscriptions' => 'applications/subscriptions/application/PhabricatorApplicationSubscriptions.php', + 'PhabricatorApplicationSystem' => 'applications/system/application/PhabricatorApplicationSystem.php', 'PhabricatorApplicationTest' => 'applications/base/controller/__tests__/PhabricatorApplicationTest.php', 'PhabricatorApplicationTokens' => 'applications/tokens/application/PhabricatorApplicationTokens.php', 'PhabricatorApplicationTransaction' => 'applications/transactions/storage/PhabricatorApplicationTransaction.php', @@ -1420,7 +1421,7 @@ phutil_register_library_map(array( 'PhabricatorDashboardTransactionQuery' => 'applications/dashboard/query/PhabricatorDashboardTransactionQuery.php', 'PhabricatorDashboardViewController' => 'applications/dashboard/controller/PhabricatorDashboardViewController.php', 'PhabricatorDataNotAttachedException' => 'infrastructure/storage/lisk/PhabricatorDataNotAttachedException.php', - 'PhabricatorDebugController' => 'applications/system/PhabricatorDebugController.php', + 'PhabricatorDebugController' => 'applications/system/controller/PhabricatorDebugController.php', 'PhabricatorDefaultFileStorageEngineSelector' => 'applications/files/engineselector/PhabricatorDefaultFileStorageEngineSelector.php', 'PhabricatorDefaultSearchEngineSelector' => 'applications/search/selector/PhabricatorDefaultSearchEngineSelector.php', 'PhabricatorDeveloperConfigOptions' => 'applications/config/option/PhabricatorDeveloperConfigOptions.php', @@ -1960,6 +1961,7 @@ phutil_register_library_map(array( 'PhabricatorRepositoryURINormalizerTestCase' => 'applications/repository/data/__tests__/PhabricatorRepositoryURINormalizerTestCase.php', 'PhabricatorRepositoryURITestCase' => 'applications/repository/storage/__tests__/PhabricatorRepositoryURITestCase.php', 'PhabricatorRepositoryVCSPassword' => 'applications/repository/storage/PhabricatorRepositoryVCSPassword.php', + 'PhabricatorRobotsController' => 'applications/system/controller/PhabricatorRobotsController.php', 'PhabricatorS3FileStorageEngine' => 'applications/files/engine/PhabricatorS3FileStorageEngine.php', 'PhabricatorSQLPatchList' => 'infrastructure/storage/patch/PhabricatorSQLPatchList.php', 'PhabricatorSSHKeyGenerator' => 'infrastructure/util/PhabricatorSSHKeyGenerator.php', @@ -2077,7 +2079,7 @@ phutil_register_library_map(array( 'PhabricatorStandardCustomFieldText' => 'infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php', 'PhabricatorStandardCustomFieldUsers' => 'infrastructure/customfield/standard/PhabricatorStandardCustomFieldUsers.php', 'PhabricatorStandardPageView' => 'view/page/PhabricatorStandardPageView.php', - 'PhabricatorStatusController' => 'applications/system/PhabricatorStatusController.php', + 'PhabricatorStatusController' => 'applications/system/controller/PhabricatorStatusController.php', 'PhabricatorStorageFixtureScopeGuard' => 'infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php', 'PhabricatorStorageManagementAPI' => 'infrastructure/storage/management/PhabricatorStorageManagementAPI.php', 'PhabricatorStorageManagementDatabasesWorkflow' => 'infrastructure/storage/management/workflow/PhabricatorStorageManagementDatabasesWorkflow.php', @@ -3785,6 +3787,7 @@ phutil_register_library_map(array( 'PhabricatorApplicationSlowvote' => 'PhabricatorApplication', 'PhabricatorApplicationStatusView' => 'AphrontView', 'PhabricatorApplicationSubscriptions' => 'PhabricatorApplication', + 'PhabricatorApplicationSystem' => 'PhabricatorApplication', 'PhabricatorApplicationTest' => 'PhabricatorApplication', 'PhabricatorApplicationTokens' => 'PhabricatorApplication', 'PhabricatorApplicationTransaction' => @@ -4759,6 +4762,7 @@ phutil_register_library_map(array( 'PhabricatorRepositoryURINormalizerTestCase' => 'PhabricatorTestCase', 'PhabricatorRepositoryURITestCase' => 'PhabricatorTestCase', 'PhabricatorRepositoryVCSPassword' => 'PhabricatorRepositoryDAO', + 'PhabricatorRobotsController' => 'PhabricatorController', 'PhabricatorS3FileStorageEngine' => 'PhabricatorFileStorageEngine', 'PhabricatorSSHKeyGenerator' => 'Phobject', 'PhabricatorSSHLog' => 'Phobject', diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php index edd247afc6..fed91b0338 100644 --- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php @@ -23,15 +23,9 @@ class AphrontDefaultApplicationConfiguration '' => 'DarkConsoleController', 'data/(?P[^/]+)/' => 'DarkConsoleDataController', ), - - '/status/' => 'PhabricatorStatusController', - - '/help/' => array( 'keyboardshortcut/' => 'PhabricatorHelpKeyboardShortcutController', ), - - '/debug/' => 'PhabricatorDebugController', ); } diff --git a/src/applications/home/controller/PhabricatorHomeController.php b/src/applications/home/controller/PhabricatorHomeController.php index ffbdfa6272..d302d8d7e8 100644 --- a/src/applications/home/controller/PhabricatorHomeController.php +++ b/src/applications/home/controller/PhabricatorHomeController.php @@ -24,6 +24,7 @@ abstract class PhabricatorHomeController extends PhabricatorController { $applications = id(new PhabricatorApplicationQuery()) ->setViewer($user) ->withInstalled(true) + ->withUnlisted(false) ->execute(); foreach ($applications as $key => $application) { diff --git a/src/applications/settings/panel/PhabricatorSettingsPanelHomePreferences.php b/src/applications/settings/panel/PhabricatorSettingsPanelHomePreferences.php index 276463861f..117aa59169 100644 --- a/src/applications/settings/panel/PhabricatorSettingsPanelHomePreferences.php +++ b/src/applications/settings/panel/PhabricatorSettingsPanelHomePreferences.php @@ -59,21 +59,16 @@ final class PhabricatorSettingsPanelHomePreferences $output = array(); - $applications = PhabricatorApplication::getAllInstalledApplications(); + $app_groups = mgroup($apps, 'getApplicationGroup'); + $app_groups = array_select_keys($app_groups, array_keys($group_map)); - $applications = mgroup($applications, 'getApplicationGroup'); - - $applications = array_select_keys( - $applications, - array_keys($group_map)); - - foreach ($applications as $group => $apps) { + foreach ($app_groups as $group => $apps) { $group_name = $group_map[$group]; $rows = array(); foreach ($apps as $app) { if (!$app->shouldAppearInLaunchView()) { - continue; + continue; } $default = $app->getDefaultTileDisplay($user); @@ -81,8 +76,6 @@ final class PhabricatorSettingsPanelHomePreferences continue; } - - $default_name = PhabricatorApplication::getTileDisplayName($default); $hide = PhabricatorApplication::TILE_HIDE; diff --git a/src/applications/system/application/PhabricatorApplicationSystem.php b/src/applications/system/application/PhabricatorApplicationSystem.php new file mode 100644 index 0000000000..0c642cc484 --- /dev/null +++ b/src/applications/system/application/PhabricatorApplicationSystem.php @@ -0,0 +1,21 @@ + 'PhabricatorStatusController', + '/debug/' => 'PhabricatorDebugController', + '/robots.txt' => 'PhabricatorRobotsController', + ); + } + +} diff --git a/src/applications/system/PhabricatorDebugController.php b/src/applications/system/controller/PhabricatorDebugController.php similarity index 100% rename from src/applications/system/PhabricatorDebugController.php rename to src/applications/system/controller/PhabricatorDebugController.php diff --git a/src/applications/system/controller/PhabricatorRobotsController.php b/src/applications/system/controller/PhabricatorRobotsController.php new file mode 100644 index 0000000000..bfc548fc04 --- /dev/null +++ b/src/applications/system/controller/PhabricatorRobotsController.php @@ -0,0 +1,37 @@ +setContent($content) + ->setCacheDurationInSeconds(phutil_units('2 hours in seconds')); + } +} diff --git a/src/applications/system/PhabricatorStatusController.php b/src/applications/system/controller/PhabricatorStatusController.php similarity index 100% rename from src/applications/system/PhabricatorStatusController.php rename to src/applications/system/controller/PhabricatorStatusController.php