diff --git a/resources/celerity/map.php b/resources/celerity/map.php index c2bee18ab6..43fd7c5ea3 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,10 +7,10 @@ */ return array( 'names' => array( - 'core.pkg.css' => '8aeacc63', - 'core.pkg.js' => '3f15fa62', + 'core.pkg.css' => '6913fe66', + 'core.pkg.js' => '10275c16', 'darkconsole.pkg.js' => 'e7393ebb', - 'differential.pkg.css' => 'a3a7e5df', + 'differential.pkg.css' => 'b3eea3f5', 'differential.pkg.js' => '4b7d8f19', 'diffusion.pkg.css' => '91c5d3a6', 'diffusion.pkg.js' => '3a9a8bfa', @@ -32,7 +32,7 @@ return array( 'rsrc/css/aphront/typeahead.css' => 'd4f16145', 'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af', 'rsrc/css/application/auth/auth.css' => '0877ed6e', - 'rsrc/css/application/base/main-menu-view.css' => 'd00a795a', + 'rsrc/css/application/base/main-menu-view.css' => 'b623169f', 'rsrc/css/application/base/notification-menu.css' => 'f31c0bde', 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', 'rsrc/css/application/base/phui-theme.css' => '027ba77e', @@ -57,7 +57,7 @@ return array( 'rsrc/css/application/dashboard/dashboard.css' => 'bc6f2127', 'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a', 'rsrc/css/application/differential/add-comment.css' => 'c47f8c40', - 'rsrc/css/application/differential/changeset-view.css' => 'febd2372', + 'rsrc/css/application/differential/changeset-view.css' => 'ccfbc869', 'rsrc/css/application/differential/core.css' => '5b7b8ff4', 'rsrc/css/application/differential/phui-inline-comment.css' => '5953c28e', 'rsrc/css/application/differential/revision-comment.css' => '14b8565a', @@ -82,11 +82,11 @@ return array( 'rsrc/css/application/paste/paste.css' => '1898e534', 'rsrc/css/application/people/people-profile.css' => '2473d929', 'rsrc/css/application/phame/phame.css' => '7448a969', - 'rsrc/css/application/pholio/pholio-edit.css' => 'b15fec4a', + 'rsrc/css/application/pholio/pholio-edit.css' => '07676f51', 'rsrc/css/application/pholio/pholio-inline-comments.css' => '8e545e49', 'rsrc/css/application/pholio/pholio.css' => 'ca89d380', 'rsrc/css/application/phortune/phortune-credit-card-form.css' => '8391eb02', - 'rsrc/css/application/phortune/phortune.css' => '9149f103', + 'rsrc/css/application/phortune/phortune.css' => '5b99dae0', 'rsrc/css/application/phrequent/phrequent.css' => 'ffc185ad', 'rsrc/css/application/phriction/phriction-document-css.css' => '4282e4ad', 'rsrc/css/application/policy/policy-edit.css' => '815c66f7', @@ -104,7 +104,7 @@ return array( 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 'rsrc/css/application/uiexample/example.css' => '528b19de', 'rsrc/css/core/core.css' => 'd0801452', - 'rsrc/css/core/remarkup.css' => '787105d6', + 'rsrc/css/core/remarkup.css' => '523d34bb', 'rsrc/css/core/syntax.css' => '9fc496d5', 'rsrc/css/core/z-index.css' => '5b6fcf3f', 'rsrc/css/diviner/diviner-shared.css' => 'aa3656aa', @@ -149,7 +149,7 @@ return array( 'rsrc/css/phui/phui-pager.css' => 'bea33d23', 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', 'rsrc/css/phui/phui-profile-menu.css' => 'c8557f33', - 'rsrc/css/phui/phui-property-list-view.css' => '1d42ee7c', + 'rsrc/css/phui/phui-property-list-view.css' => 'd4bbd0cb', 'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591', 'rsrc/css/phui/phui-segment-bar-view.css' => '46342871', 'rsrc/css/phui/phui-spacing.css' => '042804d6', @@ -258,7 +258,7 @@ return array( 'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadCompositeSource.js' => '503e17fd', 'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadOnDemandSource.js' => '013ffff9', 'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadPreloadedSource.js' => '54f314a0', - 'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadSource.js' => '1bc11c4a', + 'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadSource.js' => 'b25d5444', 'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadStaticSource.js' => '6c0e62fa', 'rsrc/favicons/apple-touch-icon-120x120.png' => '43742962', 'rsrc/favicons/apple-touch-icon-152x152.png' => '669eaec3', @@ -414,7 +414,7 @@ return array( 'rsrc/js/application/owners/OwnersPathEditor.js' => 'aa1733d0', 'rsrc/js/application/owners/owners-path-editor.js' => '7a68dda3', 'rsrc/js/application/passphrase/passphrase-credential-control.js' => '3cb0b2fc', - 'rsrc/js/application/pholio/behavior-pholio-mock-edit.js' => '246dc085', + 'rsrc/js/application/pholio/behavior-pholio-mock-edit.js' => 'bee502c8', 'rsrc/js/application/pholio/behavior-pholio-mock-view.js' => 'fbe497e7', 'rsrc/js/application/phortune/behavior-stripe-payment-form.js' => '3f5d6dbf', 'rsrc/js/application/phortune/behavior-test-payment-form.js' => 'fc91ab6c', @@ -465,7 +465,7 @@ return array( 'rsrc/js/core/KeyboardShortcutManager.js' => 'c1700f6f', 'rsrc/js/core/MultirowRowManager.js' => 'b5d57730', 'rsrc/js/core/Notification.js' => 'ccf1cbf8', - 'rsrc/js/core/Prefab.js' => 'e67df814', + 'rsrc/js/core/Prefab.js' => 'cfd23f37', 'rsrc/js/core/ShapedRequest.js' => '7cbe244b', 'rsrc/js/core/TextAreaUtils.js' => '320810c8', 'rsrc/js/core/Title.js' => 'df5e11d2', @@ -507,6 +507,7 @@ return array( 'rsrc/js/core/behavior-search-typeahead.js' => '06c32383', 'rsrc/js/core/behavior-select-content.js' => 'bf5374ef', 'rsrc/js/core/behavior-select-on-click.js' => '4e3e79a6', + 'rsrc/js/core/behavior-setup-check-https.js' => '491416b3', 'rsrc/js/core/behavior-time-typeahead.js' => '522431f7', 'rsrc/js/core/behavior-toggle-class.js' => '92b9ec77', 'rsrc/js/core/behavior-tokenizer.js' => 'b3a4b884', @@ -552,7 +553,7 @@ return array( 'conpherence-update-css' => 'faf6be09', 'conpherence-widget-pane-css' => '775eaaba', 'd3' => 'a11a5ff2', - 'differential-changeset-view-css' => 'febd2372', + 'differential-changeset-view-css' => 'ccfbc869', 'differential-core-view-css' => '5b7b8ff4', 'differential-inline-comment-editor' => '64a5550f', 'differential-revision-add-comment-css' => 'c47f8c40', @@ -665,7 +666,7 @@ return array( 'javelin-behavior-phabricator-transaction-comment-form' => 'b23b49e6', 'javelin-behavior-phabricator-transaction-list' => '13c739ea', 'javelin-behavior-phabricator-watch-anchor' => '9f36c42d', - 'javelin-behavior-pholio-mock-edit' => '246dc085', + 'javelin-behavior-pholio-mock-edit' => 'bee502c8', 'javelin-behavior-pholio-mock-view' => 'fbe497e7', 'javelin-behavior-phui-dropdown-menu' => '54733475', 'javelin-behavior-phui-file-upload' => 'b003d4fb', @@ -692,6 +693,7 @@ return array( 'javelin-behavior-search-reorder-queries' => 'e9581f08', 'javelin-behavior-select-content' => 'bf5374ef', 'javelin-behavior-select-on-click' => '4e3e79a6', + 'javelin-behavior-setup-check-https' => '491416b3', 'javelin-behavior-slowvote-embed' => '887ad43f', 'javelin-behavior-stripe-payment-form' => '3f5d6dbf', 'javelin-behavior-test-payment-form' => 'fc91ab6c', @@ -732,7 +734,7 @@ return array( 'javelin-typeahead-normalizer' => 'e6e25838', 'javelin-typeahead-ondemand-source' => '013ffff9', 'javelin-typeahead-preloaded-source' => '54f314a0', - 'javelin-typeahead-source' => '1bc11c4a', + 'javelin-typeahead-source' => 'b25d5444', 'javelin-typeahead-static-source' => '6c0e62fa', 'javelin-uri' => 'c989ade3', 'javelin-util' => '93cc50d6', @@ -776,15 +778,15 @@ return array( 'phabricator-flag-css' => '5337623f', 'phabricator-keyboard-shortcut' => '1ae869f2', 'phabricator-keyboard-shortcut-manager' => 'c1700f6f', - 'phabricator-main-menu-view' => 'd00a795a', + 'phabricator-main-menu-view' => 'b623169f', 'phabricator-nav-view-css' => 'ac79a758', 'phabricator-notification' => 'ccf1cbf8', 'phabricator-notification-css' => '3f6c89c9', 'phabricator-notification-menu-css' => 'f31c0bde', 'phabricator-object-selector-css' => '85ee8ce6', 'phabricator-phtize' => 'd254d646', - 'phabricator-prefab' => 'e67df814', - 'phabricator-remarkup-css' => '787105d6', + 'phabricator-prefab' => 'cfd23f37', + 'phabricator-remarkup-css' => '523d34bb', 'phabricator-search-results-css' => '7dea472c', 'phabricator-shaped-request' => '7cbe244b', 'phabricator-side-menu-view-css' => 'dd849797', @@ -808,11 +810,11 @@ return array( 'phabricator-zindex-css' => '5b6fcf3f', 'phame-css' => '7448a969', 'pholio-css' => 'ca89d380', - 'pholio-edit-css' => 'b15fec4a', + 'pholio-edit-css' => '07676f51', 'pholio-inline-comments-css' => '8e545e49', 'phortune-credit-card-form' => '2290aeef', 'phortune-credit-card-form-css' => '8391eb02', - 'phortune-css' => '9149f103', + 'phortune-css' => '5b99dae0', 'phrequent-css' => 'ffc185ad', 'phriction-document-css' => '4282e4ad', 'phui-action-panel-css' => '91c7b835', @@ -851,7 +853,7 @@ return array( 'phui-pager-css' => 'bea33d23', 'phui-pinboard-view-css' => '2495140e', 'phui-profile-menu-css' => 'c8557f33', - 'phui-property-list-view-css' => '1d42ee7c', + 'phui-property-list-view-css' => 'd4bbd0cb', 'phui-remarkup-preview-css' => '1a8f2591', 'phui-segment-bar-view-css' => '46342871', 'phui-spacing-css' => '042804d6', @@ -1043,12 +1045,6 @@ return array( 'javelin-util', 'phabricator-keyboard-shortcut-manager', ), - '1bc11c4a' => array( - 'javelin-install', - 'javelin-util', - 'javelin-dom', - 'javelin-typeahead-normalizer', - ), '1bd28176' => array( 'javelin-install', 'javelin-dom', @@ -1090,16 +1086,6 @@ return array( 'javelin-workflow', 'javelin-util', ), - '246dc085' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-dom', - 'javelin-workflow', - 'javelin-quicksand', - 'phabricator-phtize', - 'phabricator-drag-and-drop-file-upload', - 'phabricator-draggable-list', - ), '2926fff2' => array( 'javelin-behavior', 'javelin-dom', @@ -1214,6 +1200,11 @@ return array( 'phabricator-drag-and-drop-file-upload', 'phabricator-textareautils', ), + '491416b3' => array( + 'javelin-behavior', + 'javelin-uri', + 'phabricator-notification', + ), '49b73b36' => array( 'javelin-behavior', 'javelin-dom', @@ -1779,6 +1770,12 @@ return array( 'javelin-request', 'phabricator-shaped-request', ), + 'b25d5444' => array( + 'javelin-install', + 'javelin-util', + 'javelin-dom', + 'javelin-typeahead-normalizer', + ), 'b2b4fbaf' => array( 'javelin-behavior', 'javelin-dom', @@ -1815,6 +1812,9 @@ return array( 'javelin-dom', 'javelin-util', ), + 'b623169f' => array( + 'phui-theme-css', + ), 'b6993408' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1858,6 +1858,16 @@ return array( 'javelin-util', 'javelin-request', ), + 'bee502c8' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-dom', + 'javelin-workflow', + 'javelin-quicksand', + 'phabricator-phtize', + 'phabricator-drag-and-drop-file-upload', + 'phabricator-draggable-list', + ), 'bf5374ef' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1913,14 +1923,26 @@ return array( 'javelin-util', 'phabricator-notification-css', ), + 'ccfbc869' => array( + 'phui-inline-comment-view-css', + ), 'cf86d16a' => array( 'javelin-behavior', 'javelin-dom', 'javelin-workflow', 'phabricator-drag-and-drop-file-upload', ), - 'd00a795a' => array( - 'phui-theme-css', + 'cfd23f37' => array( + 'javelin-install', + 'javelin-util', + 'javelin-dom', + 'javelin-typeahead', + 'javelin-tokenizer', + 'javelin-typeahead-preloaded-source', + 'javelin-typeahead-ondemand-source', + 'javelin-dom', + 'javelin-stratcom', + 'javelin-util', ), 'd0c516d5' => array( 'javelin-behavior', @@ -2067,18 +2089,6 @@ return array( 'javelin-workflow', 'javelin-magical-init', ), - 'e67df814' => array( - 'javelin-install', - 'javelin-util', - 'javelin-dom', - 'javelin-typeahead', - 'javelin-tokenizer', - 'javelin-typeahead-preloaded-source', - 'javelin-typeahead-ondemand-source', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-util', - ), 'e6e25838' => array( 'javelin-install', ), @@ -2200,9 +2210,6 @@ return array( 'fea0eb47' => array( 'javelin-install', ), - 'febd2372' => array( - 'phui-inline-comment-view-css', - ), ), 'packages' => array( 'core.pkg.css' => array( @@ -2340,6 +2347,7 @@ return array( 'javelin-behavior-durable-column', 'conpherence-thread-manager', 'javelin-behavior-detect-timezone', + 'javelin-behavior-setup-check-https', ), 'darkconsole.pkg.js' => array( 'javelin-behavior-dark-console', diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php index b44707f407..2de94b5a8c 100644 --- a/resources/celerity/packages.php +++ b/resources/celerity/packages.php @@ -82,6 +82,7 @@ return array( 'javelin-behavior-durable-column', 'conpherence-thread-manager', 'javelin-behavior-detect-timezone', + 'javelin-behavior-setup-check-https', ), 'core.pkg.css' => array( 'phabricator-core-css', diff --git a/resources/sql/autopatches/20160603.user.01.removedcenabled.sql b/resources/sql/autopatches/20160603.user.01.removedcenabled.sql new file mode 100644 index 0000000000..92d6c354e3 --- /dev/null +++ b/resources/sql/autopatches/20160603.user.01.removedcenabled.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_user.user + DROP COLUMN consoleEnabled; diff --git a/resources/sql/autopatches/20160603.user.02.removedctab.sql b/resources/sql/autopatches/20160603.user.02.removedctab.sql new file mode 100644 index 0000000000..fea865908b --- /dev/null +++ b/resources/sql/autopatches/20160603.user.02.removedctab.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_user.user + DROP COLUMN consoleTab; diff --git a/resources/sql/autopatches/20160603.user.03.removedcvisible.sql b/resources/sql/autopatches/20160603.user.03.removedcvisible.sql new file mode 100644 index 0000000000..6cf5149f42 --- /dev/null +++ b/resources/sql/autopatches/20160603.user.03.removedcvisible.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_user.user + DROP COLUMN consoleVisible; diff --git a/resources/sql/autopatches/20160604.user.01.stringmailprefs.php b/resources/sql/autopatches/20160604.user.01.stringmailprefs.php new file mode 100644 index 0000000000..791177d8a3 --- /dev/null +++ b/resources/sql/autopatches/20160604.user.01.stringmailprefs.php @@ -0,0 +1,47 @@ +establishConnection('w'); + +// Convert "Mail Format", "Re Prefix" and "Vary Subjects" mail settings to +// string constants to avoid weird stuff where we store "true" and "false" as +// strings in the database. + +// Each of these keys will be converted to the first value if present and +// truthy, or the second value if present and falsey. +$remap = array( + 'html-emails' => array('html', 'text'), + 're-prefix' => array('re', 'none'), + 'vary-subject' => array('vary', 'static'), +); + +foreach (new LiskMigrationIterator($table) as $row) { + $dict = $row->getPreferences(); + + $should_update = false; + foreach ($remap as $key => $value) { + if (isset($dict[$key])) { + if ($dict[$key]) { + $dict[$key] = $value[0]; + } else { + $dict[$key] = $value[1]; + } + $should_update = true; + } + } + + if (!$should_update) { + continue; + } + + queryfx( + $conn_w, + 'UPDATE %T SET preferences = %s WHERE id = %d', + $table->getTableName(), + phutil_json_encode($dict), + $row->getID()); +} + +$prefs_key = PhabricatorUserPreferencesCacheType::KEY_PREFERENCES; +PhabricatorUserCache::clearCacheForAllUsers($prefs_key); diff --git a/resources/sql/autopatches/20160604.user.02.removeimagecache.sql b/resources/sql/autopatches/20160604.user.02.removeimagecache.sql new file mode 100644 index 0000000000..92de984709 --- /dev/null +++ b/resources/sql/autopatches/20160604.user.02.removeimagecache.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_user.user + DROP COLUMN profileImageCache; diff --git a/resources/sql/autopatches/20160605.user.01.prefnulluser.sql b/resources/sql/autopatches/20160605.user.01.prefnulluser.sql new file mode 100644 index 0000000000..e592c4c82f --- /dev/null +++ b/resources/sql/autopatches/20160605.user.01.prefnulluser.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_user.user_preferences + CHANGE userPHID userPHID VARBINARY(64); diff --git a/resources/sql/autopatches/20160605.user.02.prefbuiltin.sql b/resources/sql/autopatches/20160605.user.02.prefbuiltin.sql new file mode 100644 index 0000000000..46b8db6580 --- /dev/null +++ b/resources/sql/autopatches/20160605.user.02.prefbuiltin.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_user.user_preferences + ADD builtinKey VARCHAR(32) COLLATE {$COLLATE_TEXT}; diff --git a/resources/sql/autopatches/20160605.user.03.builtinunique.sql b/resources/sql/autopatches/20160605.user.03.builtinunique.sql new file mode 100644 index 0000000000..ea13010fb8 --- /dev/null +++ b/resources/sql/autopatches/20160605.user.03.builtinunique.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_user.user_preferences + ADD UNIQUE KEY `key_builtin` (builtinKey); diff --git a/scripts/daemon/launch_daemon.php b/scripts/daemon/launch_daemon.php index 0f9eeee1a6..7c75ab671e 100755 --- a/scripts/daemon/launch_daemon.php +++ b/scripts/daemon/launch_daemon.php @@ -5,6 +5,8 @@ // script, except it loads the Phabricator environment and adds some Phabricator // specific flags. +declare(ticks = 1); + $root = dirname(dirname(dirname(__FILE__))); require_once $root.'/scripts/__init_script__.php'; diff --git a/scripts/ssh/ssh-exec.php b/scripts/ssh/ssh-exec.php index 5d8ede2913..56b13ff142 100755 --- a/scripts/ssh/ssh-exec.php +++ b/scripts/ssh/ssh-exec.php @@ -103,6 +103,9 @@ try { 'Invalid username ("%s"). There is no user with this username.', $user_name)); } + + id(new PhabricatorAuthSessionEngine()) + ->willServeRequestForUser($user); } else if (strlen($device_name)) { if (!$remote_address) { throw new Exception( diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 2533344e43..bd8c8c1476 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -312,7 +312,6 @@ phutil_register_library_map(array( 'ConpherenceRoomListController' => 'applications/conpherence/controller/ConpherenceRoomListController.php', 'ConpherenceRoomTestCase' => 'applications/conpherence/__tests__/ConpherenceRoomTestCase.php', 'ConpherenceSchemaSpec' => 'applications/conpherence/storage/ConpherenceSchemaSpec.php', - 'ConpherenceSettings' => 'applications/conpherence/constants/ConpherenceSettings.php', 'ConpherenceTestCase' => 'applications/conpherence/__tests__/ConpherenceTestCase.php', 'ConpherenceThread' => 'applications/conpherence/storage/ConpherenceThread.php', 'ConpherenceThreadIndexEngineExtension' => 'applications/conpherence/engineextension/ConpherenceThreadIndexEngineExtension.php', @@ -542,6 +541,7 @@ phutil_register_library_map(array( 'DifferentialRevisionRequiredActionResultBucket' => 'applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php', 'DifferentialRevisionResultBucket' => 'applications/differential/query/DifferentialRevisionResultBucket.php', 'DifferentialRevisionReviewersHeraldField' => 'applications/differential/herald/DifferentialRevisionReviewersHeraldField.php', + 'DifferentialRevisionSearchConduitAPIMethod' => 'applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php', 'DifferentialRevisionSearchEngine' => 'applications/differential/query/DifferentialRevisionSearchEngine.php', 'DifferentialRevisionStatus' => 'applications/differential/constants/DifferentialRevisionStatus.php', 'DifferentialRevisionSummaryHeraldField' => 'applications/differential/herald/DifferentialRevisionSummaryHeraldField.php', @@ -2145,6 +2145,8 @@ phutil_register_library_map(array( 'PhabricatorConfigVersionsModule' => 'applications/config/module/PhabricatorConfigVersionsModule.php', 'PhabricatorConfigWelcomeController' => 'applications/config/controller/PhabricatorConfigWelcomeController.php', 'PhabricatorConpherenceApplication' => 'applications/conpherence/application/PhabricatorConpherenceApplication.php', + 'PhabricatorConpherenceColumnVisibleSetting' => 'applications/settings/setting/PhabricatorConpherenceColumnVisibleSetting.php', + 'PhabricatorConpherenceNotificationsSetting' => 'applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php', 'PhabricatorConpherencePreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorConpherencePreferencesSettingsPanel.php', 'PhabricatorConpherenceThreadPHIDType' => 'applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php', 'PhabricatorConsoleApplication' => 'applications/console/application/PhabricatorConsoleApplication.php', @@ -2240,6 +2242,8 @@ phutil_register_library_map(array( 'PhabricatorDaemonsSetupCheck' => 'applications/config/check/PhabricatorDaemonsSetupCheck.php', 'PhabricatorDailyRoutineTriggerClock' => 'infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php', 'PhabricatorDarkConsoleSetting' => 'applications/settings/setting/PhabricatorDarkConsoleSetting.php', + 'PhabricatorDarkConsoleTabSetting' => 'applications/settings/setting/PhabricatorDarkConsoleTabSetting.php', + 'PhabricatorDarkConsoleVisibleSetting' => 'applications/settings/setting/PhabricatorDarkConsoleVisibleSetting.php', 'PhabricatorDashboard' => 'applications/dashboard/storage/PhabricatorDashboard.php', 'PhabricatorDashboardAddPanelController' => 'applications/dashboard/controller/PhabricatorDashboardAddPanelController.php', 'PhabricatorDashboardApplication' => 'applications/dashboard/application/PhabricatorDashboardApplication.php', @@ -2302,6 +2306,7 @@ phutil_register_library_map(array( 'PhabricatorDebugController' => 'applications/system/controller/PhabricatorDebugController.php', 'PhabricatorDefaultRequestExceptionHandler' => 'aphront/handler/PhabricatorDefaultRequestExceptionHandler.php', 'PhabricatorDefaultSyntaxStyle' => 'infrastructure/syntax/PhabricatorDefaultSyntaxStyle.php', + 'PhabricatorDesktopNotificationsSetting' => 'applications/settings/setting/PhabricatorDesktopNotificationsSetting.php', 'PhabricatorDesktopNotificationsSettingsPanel' => 'applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php', 'PhabricatorDestructibleInterface' => 'applications/system/interface/PhabricatorDestructibleInterface.php', 'PhabricatorDestructionEngine' => 'applications/system/engine/PhabricatorDestructionEngine.php', @@ -2319,6 +2324,8 @@ phutil_register_library_map(array( 'PhabricatorDifferentialManagementWorkflow' => 'applications/differential/management/PhabricatorDifferentialManagementWorkflow.php', 'PhabricatorDifferentialRevisionTestDataGenerator' => 'applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php', 'PhabricatorDiffusionApplication' => 'applications/diffusion/application/PhabricatorDiffusionApplication.php', + 'PhabricatorDiffusionBlameSetting' => 'applications/settings/setting/PhabricatorDiffusionBlameSetting.php', + 'PhabricatorDiffusionColorSetting' => 'applications/settings/setting/PhabricatorDiffusionColorSetting.php', 'PhabricatorDiffusionConfigOptions' => 'applications/diffusion/config/PhabricatorDiffusionConfigOptions.php', 'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php', 'PhabricatorDisplayPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php', @@ -2364,6 +2371,7 @@ phutil_register_library_map(array( 'PhabricatorEditEngineConfigurationTransactionQuery' => 'applications/transactions/query/PhabricatorEditEngineConfigurationTransactionQuery.php', 'PhabricatorEditEngineConfigurationViewController' => 'applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php', 'PhabricatorEditEngineController' => 'applications/transactions/controller/PhabricatorEditEngineController.php', + 'PhabricatorEditEngineCreateQuickActions' => 'applications/settings/quickmenu/PhabricatorEditEngineCreateQuickActions.php', 'PhabricatorEditEngineExtension' => 'applications/transactions/engineextension/PhabricatorEditEngineExtension.php', 'PhabricatorEditEngineExtensionModule' => 'applications/transactions/engineextension/PhabricatorEditEngineExtensionModule.php', 'PhabricatorEditEngineListController' => 'applications/transactions/controller/PhabricatorEditEngineListController.php', @@ -2371,6 +2379,7 @@ phutil_register_library_map(array( 'PhabricatorEditEngineQuery' => 'applications/transactions/query/PhabricatorEditEngineQuery.php', 'PhabricatorEditEngineSearchEngine' => 'applications/transactions/query/PhabricatorEditEngineSearchEngine.php', 'PhabricatorEditEngineSelectCommentAction' => 'applications/transactions/commentaction/PhabricatorEditEngineSelectCommentAction.php', + 'PhabricatorEditEngineSettingsPanel' => 'applications/settings/panel/PhabricatorEditEngineSettingsPanel.php', 'PhabricatorEditEngineTokenizerCommentAction' => 'applications/transactions/commentaction/PhabricatorEditEngineTokenizerCommentAction.php', 'PhabricatorEditField' => 'applications/transactions/editfield/PhabricatorEditField.php', 'PhabricatorEditPage' => 'applications/transactions/editengine/PhabricatorEditPage.php', @@ -2382,6 +2391,7 @@ phutil_register_library_map(array( 'PhabricatorElasticSearchSetupCheck' => 'applications/config/check/PhabricatorElasticSearchSetupCheck.php', 'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php', 'PhabricatorEmailContentSource' => 'applications/metamta/contentsource/PhabricatorEmailContentSource.php', + 'PhabricatorEmailDeliverySettingsPanel' => 'applications/settings/panel/PhabricatorEmailDeliverySettingsPanel.php', 'PhabricatorEmailFormatSetting' => 'applications/settings/setting/PhabricatorEmailFormatSetting.php', 'PhabricatorEmailFormatSettingsPanel' => 'applications/settings/panel/PhabricatorEmailFormatSettingsPanel.php', 'PhabricatorEmailLoginController' => 'applications/auth/controller/PhabricatorEmailLoginController.php', @@ -2389,6 +2399,7 @@ phutil_register_library_map(array( 'PhabricatorEmailPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php', 'PhabricatorEmailRePrefixSetting' => 'applications/settings/setting/PhabricatorEmailRePrefixSetting.php', 'PhabricatorEmailSelfActionsSetting' => 'applications/settings/setting/PhabricatorEmailSelfActionsSetting.php', + 'PhabricatorEmailTagsSetting' => 'applications/settings/setting/PhabricatorEmailTagsSetting.php', 'PhabricatorEmailVarySubjectsSetting' => 'applications/settings/setting/PhabricatorEmailVarySubjectsSetting.php', 'PhabricatorEmailVerificationController' => 'applications/auth/controller/PhabricatorEmailVerificationController.php', 'PhabricatorEmbedFileRemarkupRule' => 'applications/files/markup/PhabricatorEmbedFileRemarkupRule.php', @@ -2510,6 +2521,7 @@ phutil_register_library_map(array( 'PhabricatorFilesManagementWorkflow' => 'applications/files/management/PhabricatorFilesManagementWorkflow.php', 'PhabricatorFilesOnDiskBuiltinFile' => 'applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php', 'PhabricatorFilesOutboundRequestAction' => 'applications/files/action/PhabricatorFilesOutboundRequestAction.php', + 'PhabricatorFiletreeVisibleSetting' => 'applications/settings/setting/PhabricatorFiletreeVisibleSetting.php', 'PhabricatorFlag' => 'applications/flag/storage/PhabricatorFlag.php', 'PhabricatorFlagAddFlagHeraldAction' => 'applications/flag/herald/PhabricatorFlagAddFlagHeraldAction.php', 'PhabricatorFlagColor' => 'applications/flag/constants/PhabricatorFlagColor.php', @@ -2593,6 +2605,7 @@ phutil_register_library_map(array( 'PhabricatorInlineCommentPreviewController' => 'infrastructure/diff/PhabricatorInlineCommentPreviewController.php', 'PhabricatorInlineSummaryView' => 'infrastructure/diff/view/PhabricatorInlineSummaryView.php', 'PhabricatorInstructionsEditField' => 'applications/transactions/editfield/PhabricatorInstructionsEditField.php', + 'PhabricatorInternalSetting' => 'applications/settings/setting/PhabricatorInternalSetting.php', 'PhabricatorInternationalizationManagementExtractWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementExtractWorkflow.php', 'PhabricatorInternationalizationManagementWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementWorkflow.php', 'PhabricatorInvalidConfigSetupCheck' => 'applications/config/check/PhabricatorInvalidConfigSetupCheck.php', @@ -3004,6 +3017,7 @@ phutil_register_library_map(array( 'PhabricatorPhurlURLTransactionComment' => 'applications/phurl/storage/PhabricatorPhurlURLTransactionComment.php', 'PhabricatorPhurlURLTransactionQuery' => 'applications/phurl/query/PhabricatorPhurlURLTransactionQuery.php', 'PhabricatorPhurlURLViewController' => 'applications/phurl/controller/PhabricatorPhurlURLViewController.php', + 'PhabricatorPinnedApplicationsSetting' => 'applications/settings/setting/PhabricatorPinnedApplicationsSetting.php', 'PhabricatorPirateEnglishTranslation' => 'infrastructure/internationalization/translation/PhabricatorPirateEnglishTranslation.php', 'PhabricatorPlatformSite' => 'aphront/site/PhabricatorPlatformSite.php', 'PhabricatorPointsEditField' => 'applications/transactions/editfield/PhabricatorPointsEditField.php', @@ -3027,6 +3041,7 @@ phutil_register_library_map(array( 'PhabricatorPolicyEditField' => 'applications/transactions/editfield/PhabricatorPolicyEditField.php', 'PhabricatorPolicyException' => 'applications/policy/exception/PhabricatorPolicyException.php', 'PhabricatorPolicyExplainController' => 'applications/policy/controller/PhabricatorPolicyExplainController.php', + 'PhabricatorPolicyFavoritesSetting' => 'applications/settings/setting/PhabricatorPolicyFavoritesSetting.php', 'PhabricatorPolicyFilter' => 'applications/policy/filter/PhabricatorPolicyFilter.php', 'PhabricatorPolicyInterface' => 'applications/policy/interface/PhabricatorPolicyInterface.php', 'PhabricatorPolicyManagementShowWorkflow' => 'applications/policy/management/PhabricatorPolicyManagementShowWorkflow.php', @@ -3041,6 +3056,7 @@ phutil_register_library_map(array( 'PhabricatorPolicyTestObject' => 'applications/policy/__tests__/PhabricatorPolicyTestObject.php', 'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php', 'PhabricatorPonderApplication' => 'applications/ponder/application/PhabricatorPonderApplication.php', + 'PhabricatorProfileMenuCollapsedSetting' => 'applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php', 'PhabricatorProfilePanel' => 'applications/search/profilepanel/PhabricatorProfilePanel.php', 'PhabricatorProfilePanelConfiguration' => 'applications/search/storage/PhabricatorProfilePanelConfiguration.php', 'PhabricatorProfilePanelConfigurationQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationQuery.php', @@ -3177,6 +3193,7 @@ phutil_register_library_map(array( 'PhabricatorQueryOrderItem' => 'infrastructure/query/order/PhabricatorQueryOrderItem.php', 'PhabricatorQueryOrderTestCase' => 'infrastructure/query/order/__tests__/PhabricatorQueryOrderTestCase.php', 'PhabricatorQueryOrderVector' => 'infrastructure/query/order/PhabricatorQueryOrderVector.php', + 'PhabricatorQuickActions' => 'applications/settings/quickmenu/PhabricatorQuickActions.php', 'PhabricatorRateLimitRequestExceptionHandler' => 'aphront/handler/PhabricatorRateLimitRequestExceptionHandler.php', 'PhabricatorRecaptchaConfigOptions' => 'applications/config/option/PhabricatorRecaptchaConfigOptions.php', 'PhabricatorRecipientHasBadgeEdgeType' => 'applications/badges/edge/PhabricatorRecipientHasBadgeEdgeType.php', @@ -3352,6 +3369,7 @@ phutil_register_library_map(array( 'PhabricatorSearchResultBucketGroup' => 'applications/search/buckets/PhabricatorSearchResultBucketGroup.php', 'PhabricatorSearchResultView' => 'applications/search/view/PhabricatorSearchResultView.php', 'PhabricatorSearchSchemaSpec' => 'applications/search/storage/PhabricatorSearchSchemaSpec.php', + 'PhabricatorSearchScopeSetting' => 'applications/settings/setting/PhabricatorSearchScopeSetting.php', 'PhabricatorSearchSelectController' => 'applications/search/controller/PhabricatorSearchSelectController.php', 'PhabricatorSearchSelectField' => 'applications/search/field/PhabricatorSearchSelectField.php', 'PhabricatorSearchStringListField' => 'applications/search/field/PhabricatorSearchStringListField.php', @@ -3367,14 +3385,21 @@ phutil_register_library_map(array( 'PhabricatorSendGridConfigOptions' => 'applications/config/option/PhabricatorSendGridConfigOptions.php', 'PhabricatorSessionsSettingsPanel' => 'applications/settings/panel/PhabricatorSessionsSettingsPanel.php', 'PhabricatorSetting' => 'applications/settings/setting/PhabricatorSetting.php', + 'PhabricatorSettingsAccountPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsAccountPanelGroup.php', 'PhabricatorSettingsAddEmailAction' => 'applications/settings/action/PhabricatorSettingsAddEmailAction.php', 'PhabricatorSettingsAdjustController' => 'applications/settings/controller/PhabricatorSettingsAdjustController.php', 'PhabricatorSettingsApplication' => 'applications/settings/application/PhabricatorSettingsApplication.php', - 'PhabricatorSettingsEditController' => 'applications/settings/controller/PhabricatorSettingsEditController.php', + 'PhabricatorSettingsApplicationsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsApplicationsPanelGroup.php', + 'PhabricatorSettingsAuthenticationPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsAuthenticationPanelGroup.php', + 'PhabricatorSettingsDeveloperPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsDeveloperPanelGroup.php', 'PhabricatorSettingsEditEngine' => 'applications/settings/editor/PhabricatorSettingsEditEngine.php', + 'PhabricatorSettingsEmailPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsEmailPanelGroup.php', + 'PhabricatorSettingsListController' => 'applications/settings/controller/PhabricatorSettingsListController.php', + 'PhabricatorSettingsLogsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsLogsPanelGroup.php', 'PhabricatorSettingsMainController' => 'applications/settings/controller/PhabricatorSettingsMainController.php', 'PhabricatorSettingsMainMenuBarExtension' => 'applications/settings/extension/PhabricatorSettingsMainMenuBarExtension.php', 'PhabricatorSettingsPanel' => 'applications/settings/panel/PhabricatorSettingsPanel.php', + 'PhabricatorSettingsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsPanelGroup.php', 'PhabricatorSettingsTimezoneController' => 'applications/settings/controller/PhabricatorSettingsTimezoneController.php', 'PhabricatorSetupCheck' => 'applications/config/check/PhabricatorSetupCheck.php', 'PhabricatorSetupCheckTestCase' => 'applications/config/check/__tests__/PhabricatorSetupCheckTestCase.php', @@ -3537,6 +3562,7 @@ phutil_register_library_map(array( 'PhabricatorTimeFormatSetting' => 'applications/settings/setting/PhabricatorTimeFormatSetting.php', 'PhabricatorTimeGuard' => 'infrastructure/time/PhabricatorTimeGuard.php', 'PhabricatorTimeTestCase' => 'infrastructure/time/__tests__/PhabricatorTimeTestCase.php', + 'PhabricatorTimezoneIgnoreOffsetSetting' => 'applications/settings/setting/PhabricatorTimezoneIgnoreOffsetSetting.php', 'PhabricatorTimezoneSetting' => 'applications/settings/setting/PhabricatorTimezoneSetting.php', 'PhabricatorTimezoneSetupCheck' => 'applications/config/check/PhabricatorTimezoneSetupCheck.php', 'PhabricatorTitleGlyphsSetting' => 'applications/settings/setting/PhabricatorTitleGlyphsSetting.php', @@ -3618,15 +3644,20 @@ phutil_register_library_map(array( 'PhabricatorUserIconField' => 'applications/people/customfield/PhabricatorUserIconField.php', 'PhabricatorUserLog' => 'applications/people/storage/PhabricatorUserLog.php', 'PhabricatorUserLogView' => 'applications/people/view/PhabricatorUserLogView.php', + 'PhabricatorUserMessageCountCacheType' => 'applications/people/cache/PhabricatorUserMessageCountCacheType.php', + 'PhabricatorUserNotificationCountCacheType' => 'applications/people/cache/PhabricatorUserNotificationCountCacheType.php', 'PhabricatorUserPHIDResolver' => 'applications/phid/resolver/PhabricatorUserPHIDResolver.php', 'PhabricatorUserPreferences' => 'applications/settings/storage/PhabricatorUserPreferences.php', 'PhabricatorUserPreferencesCacheType' => 'applications/people/cache/PhabricatorUserPreferencesCacheType.php', 'PhabricatorUserPreferencesEditor' => 'applications/settings/editor/PhabricatorUserPreferencesEditor.php', 'PhabricatorUserPreferencesPHIDType' => 'applications/settings/phid/PhabricatorUserPreferencesPHIDType.php', 'PhabricatorUserPreferencesQuery' => 'applications/settings/query/PhabricatorUserPreferencesQuery.php', + 'PhabricatorUserPreferencesSearchEngine' => 'applications/settings/query/PhabricatorUserPreferencesSearchEngine.php', 'PhabricatorUserPreferencesTransaction' => 'applications/settings/storage/PhabricatorUserPreferencesTransaction.php', + 'PhabricatorUserPreferencesTransactionQuery' => 'applications/settings/query/PhabricatorUserPreferencesTransactionQuery.php', 'PhabricatorUserProfile' => 'applications/people/storage/PhabricatorUserProfile.php', 'PhabricatorUserProfileEditor' => 'applications/people/editor/PhabricatorUserProfileEditor.php', + 'PhabricatorUserProfileImageCacheType' => 'applications/people/cache/PhabricatorUserProfileImageCacheType.php', 'PhabricatorUserRealNameField' => 'applications/people/customfield/PhabricatorUserRealNameField.php', 'PhabricatorUserRolesField' => 'applications/people/customfield/PhabricatorUserRolesField.php', 'PhabricatorUserSchemaSpec' => 'applications/people/storage/PhabricatorUserSchemaSpec.php', @@ -4032,6 +4063,7 @@ phutil_register_library_map(array( 'PonderModerateCapability' => 'applications/ponder/capability/PonderModerateCapability.php', 'PonderQuestion' => 'applications/ponder/storage/PonderQuestion.php', 'PonderQuestionCommentController' => 'applications/ponder/controller/PonderQuestionCommentController.php', + 'PonderQuestionCreateMailReceiver' => 'applications/ponder/mail/PonderQuestionCreateMailReceiver.php', 'PonderQuestionEditController' => 'applications/ponder/controller/PonderQuestionEditController.php', 'PonderQuestionEditor' => 'applications/ponder/editor/PonderQuestionEditor.php', 'PonderQuestionFulltextEngine' => 'applications/ponder/search/PonderQuestionFulltextEngine.php', @@ -4554,7 +4586,6 @@ phutil_register_library_map(array( 'ConpherenceRoomListController' => 'ConpherenceController', 'ConpherenceRoomTestCase' => 'ConpherenceTestCase', 'ConpherenceSchemaSpec' => 'PhabricatorConfigSchemaSpec', - 'ConpherenceSettings' => 'ConpherenceConstants', 'ConpherenceTestCase' => 'PhabricatorTestCase', 'ConpherenceThread' => array( 'ConpherenceDAO', @@ -4790,6 +4821,7 @@ phutil_register_library_map(array( 'PhabricatorDestructibleInterface', 'PhabricatorProjectInterface', 'PhabricatorFulltextInterface', + 'PhabricatorConduitResultInterface', ), 'DifferentialRevisionAffectedFilesHeraldField' => 'DifferentialRevisionHeraldField', 'DifferentialRevisionAuthorHeraldField' => 'DifferentialRevisionHeraldField', @@ -4823,6 +4855,7 @@ phutil_register_library_map(array( 'DifferentialRevisionRequiredActionResultBucket' => 'DifferentialRevisionResultBucket', 'DifferentialRevisionResultBucket' => 'PhabricatorSearchResultBucket', 'DifferentialRevisionReviewersHeraldField' => 'DifferentialRevisionHeraldField', + 'DifferentialRevisionSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod', 'DifferentialRevisionSearchEngine' => 'PhabricatorApplicationSearchEngine', 'DifferentialRevisionStatus' => 'Phobject', 'DifferentialRevisionSummaryHeraldField' => 'DifferentialRevisionHeraldField', @@ -6163,7 +6196,7 @@ phutil_register_library_map(array( 'PhabricatorAccessLog' => 'Phobject', 'PhabricatorAccessLogConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorAccessibilitySetting' => 'PhabricatorSelectSetting', - 'PhabricatorAccountSettingsPanel' => 'PhabricatorSettingsPanel', + 'PhabricatorAccountSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorActionListView' => 'AphrontView', 'PhabricatorActionView' => 'AphrontView', 'PhabricatorActivitySettingsPanel' => 'PhabricatorSettingsPanel', @@ -6676,7 +6709,9 @@ phutil_register_library_map(array( 'PhabricatorConfigVersionsModule' => 'PhabricatorConfigModule', 'PhabricatorConfigWelcomeController' => 'PhabricatorConfigController', 'PhabricatorConpherenceApplication' => 'PhabricatorApplication', - 'PhabricatorConpherencePreferencesSettingsPanel' => 'PhabricatorSettingsPanel', + 'PhabricatorConpherenceColumnVisibleSetting' => 'PhabricatorInternalSetting', + 'PhabricatorConpherenceNotificationsSetting' => 'PhabricatorSelectSetting', + 'PhabricatorConpherencePreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorConpherenceThreadPHIDType' => 'PhabricatorPHIDType', 'PhabricatorConsoleApplication' => 'PhabricatorApplication', 'PhabricatorConsoleContentSource' => 'PhabricatorContentSource', @@ -6782,6 +6817,8 @@ phutil_register_library_map(array( 'PhabricatorDaemonsSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorDailyRoutineTriggerClock' => 'PhabricatorTriggerClock', 'PhabricatorDarkConsoleSetting' => 'PhabricatorSelectSetting', + 'PhabricatorDarkConsoleTabSetting' => 'PhabricatorInternalSetting', + 'PhabricatorDarkConsoleVisibleSetting' => 'PhabricatorInternalSetting', 'PhabricatorDashboard' => array( 'PhabricatorDashboardDAO', 'PhabricatorApplicationTransactionInterface', @@ -6858,18 +6895,19 @@ phutil_register_library_map(array( 'PhabricatorDatasourceEditField' => 'PhabricatorTokenizerEditField', 'PhabricatorDatasourceEditType' => 'PhabricatorPHIDListEditType', 'PhabricatorDateFormatSetting' => 'PhabricatorSelectSetting', - 'PhabricatorDateTimeSettingsPanel' => 'PhabricatorSettingsPanel', + 'PhabricatorDateTimeSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorDebugController' => 'PhabricatorController', 'PhabricatorDefaultRequestExceptionHandler' => 'PhabricatorRequestExceptionHandler', 'PhabricatorDefaultSyntaxStyle' => 'PhabricatorSyntaxStyle', + 'PhabricatorDesktopNotificationsSetting' => 'PhabricatorInternalSetting', 'PhabricatorDesktopNotificationsSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorDestructionEngine' => 'Phobject', 'PhabricatorDestructionEngineExtension' => 'Phobject', 'PhabricatorDestructionEngineExtensionModule' => 'PhabricatorConfigModule', 'PhabricatorDeveloperConfigOptions' => 'PhabricatorApplicationConfigOptions', - 'PhabricatorDeveloperPreferencesSettingsPanel' => 'PhabricatorSettingsPanel', + 'PhabricatorDeveloperPreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorDiffInlineCommentQuery' => 'PhabricatorApplicationTransactionCommentQuery', - 'PhabricatorDiffPreferencesSettingsPanel' => 'PhabricatorSettingsPanel', + 'PhabricatorDiffPreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorDifferenceEngine' => 'Phobject', 'PhabricatorDifferentialApplication' => 'PhabricatorApplication', 'PhabricatorDifferentialAttachCommitWorkflow' => 'PhabricatorDifferentialManagementWorkflow', @@ -6878,9 +6916,11 @@ phutil_register_library_map(array( 'PhabricatorDifferentialManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorDifferentialRevisionTestDataGenerator' => 'PhabricatorTestDataGenerator', 'PhabricatorDiffusionApplication' => 'PhabricatorApplication', + 'PhabricatorDiffusionBlameSetting' => 'PhabricatorInternalSetting', + 'PhabricatorDiffusionColorSetting' => 'PhabricatorInternalSetting', 'PhabricatorDiffusionConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorDisabledUserController' => 'PhabricatorAuthController', - 'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorSettingsPanel', + 'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorDisqusAuthProvider' => 'PhabricatorOAuth2AuthProvider', 'PhabricatorDividerProfilePanel' => 'PhabricatorProfilePanel', 'PhabricatorDivinerApplication' => 'PhabricatorApplication', @@ -6930,6 +6970,7 @@ phutil_register_library_map(array( 'PhabricatorEditEngineConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhabricatorEditEngineConfigurationViewController' => 'PhabricatorEditEngineController', 'PhabricatorEditEngineController' => 'PhabricatorApplicationTransactionController', + 'PhabricatorEditEngineCreateQuickActions' => 'PhabricatorQuickActions', 'PhabricatorEditEngineExtension' => 'Phobject', 'PhabricatorEditEngineExtensionModule' => 'PhabricatorConfigModule', 'PhabricatorEditEngineListController' => 'PhabricatorEditEngineController', @@ -6937,6 +6978,7 @@ phutil_register_library_map(array( 'PhabricatorEditEngineQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorEditEngineSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorEditEngineSelectCommentAction' => 'PhabricatorEditEngineCommentAction', + 'PhabricatorEditEngineSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorEditEngineTokenizerCommentAction' => 'PhabricatorEditEngineCommentAction', 'PhabricatorEditField' => 'Phobject', 'PhabricatorEditPage' => 'Phobject', @@ -6948,13 +6990,15 @@ phutil_register_library_map(array( 'PhabricatorElasticSearchSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorEmailContentSource' => 'PhabricatorContentSource', + 'PhabricatorEmailDeliverySettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorEmailFormatSetting' => 'PhabricatorSelectSetting', - 'PhabricatorEmailFormatSettingsPanel' => 'PhabricatorSettingsPanel', + 'PhabricatorEmailFormatSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorEmailLoginController' => 'PhabricatorAuthController', 'PhabricatorEmailNotificationsSetting' => 'PhabricatorSelectSetting', 'PhabricatorEmailPreferencesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorEmailRePrefixSetting' => 'PhabricatorSelectSetting', 'PhabricatorEmailSelfActionsSetting' => 'PhabricatorSelectSetting', + 'PhabricatorEmailTagsSetting' => 'PhabricatorInternalSetting', 'PhabricatorEmailVarySubjectsSetting' => 'PhabricatorSelectSetting', 'PhabricatorEmailVerificationController' => 'PhabricatorAuthController', 'PhabricatorEmbedFileRemarkupRule' => 'PhabricatorObjectRemarkupRule', @@ -7104,6 +7148,7 @@ phutil_register_library_map(array( 'PhabricatorFilesManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorFilesOnDiskBuiltinFile' => 'PhabricatorFilesBuiltinFile', 'PhabricatorFilesOutboundRequestAction' => 'PhabricatorSystemAction', + 'PhabricatorFiletreeVisibleSetting' => 'PhabricatorInternalSetting', 'PhabricatorFlag' => array( 'PhabricatorFlagDAO', 'PhabricatorPolicyInterface', @@ -7194,6 +7239,7 @@ phutil_register_library_map(array( 'PhabricatorInlineCommentPreviewController' => 'PhabricatorController', 'PhabricatorInlineSummaryView' => 'AphrontView', 'PhabricatorInstructionsEditField' => 'PhabricatorEditField', + 'PhabricatorInternalSetting' => 'PhabricatorSetting', 'PhabricatorInternationalizationManagementExtractWorkflow' => 'PhabricatorInternationalizationManagementWorkflow', 'PhabricatorInternationalizationManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorInvalidConfigSetupCheck' => 'PhabricatorSetupCheck', @@ -7662,6 +7708,7 @@ phutil_register_library_map(array( 'PhabricatorPhurlURLTransactionComment' => 'PhabricatorApplicationTransactionComment', 'PhabricatorPhurlURLTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhabricatorPhurlURLViewController' => 'PhabricatorPhurlController', + 'PhabricatorPinnedApplicationsSetting' => 'PhabricatorInternalSetting', 'PhabricatorPirateEnglishTranslation' => 'PhutilTranslation', 'PhabricatorPlatformSite' => 'PhabricatorSite', 'PhabricatorPointsEditField' => 'PhabricatorEditField', @@ -7689,6 +7736,7 @@ phutil_register_library_map(array( 'PhabricatorPolicyEditField' => 'PhabricatorEditField', 'PhabricatorPolicyException' => 'Exception', 'PhabricatorPolicyExplainController' => 'PhabricatorPolicyController', + 'PhabricatorPolicyFavoritesSetting' => 'PhabricatorInternalSetting', 'PhabricatorPolicyFilter' => 'Phobject', 'PhabricatorPolicyInterface' => 'PhabricatorPHIDInterface', 'PhabricatorPolicyManagementShowWorkflow' => 'PhabricatorPolicyManagementWorkflow', @@ -7707,6 +7755,7 @@ phutil_register_library_map(array( ), 'PhabricatorPolicyType' => 'PhabricatorPolicyConstants', 'PhabricatorPonderApplication' => 'PhabricatorApplication', + 'PhabricatorProfileMenuCollapsedSetting' => 'PhabricatorInternalSetting', 'PhabricatorProfilePanel' => 'Phobject', 'PhabricatorProfilePanelConfiguration' => array( 'PhabricatorSearchDAO', @@ -7876,6 +7925,7 @@ phutil_register_library_map(array( 'Phobject', 'Iterator', ), + 'PhabricatorQuickActions' => 'Phobject', 'PhabricatorRateLimitRequestExceptionHandler' => 'PhabricatorRequestExceptionHandler', 'PhabricatorRecaptchaConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorRecipientHasBadgeEdgeType' => 'PhabricatorEdgeType', @@ -8101,6 +8151,7 @@ phutil_register_library_map(array( 'PhabricatorSearchResultBucketGroup' => 'Phobject', 'PhabricatorSearchResultView' => 'AphrontView', 'PhabricatorSearchSchemaSpec' => 'PhabricatorConfigSchemaSpec', + 'PhabricatorSearchScopeSetting' => 'PhabricatorInternalSetting', 'PhabricatorSearchSelectController' => 'PhabricatorSearchBaseController', 'PhabricatorSearchSelectField' => 'PhabricatorSearchField', 'PhabricatorSearchStringListField' => 'PhabricatorSearchField', @@ -8116,14 +8167,21 @@ phutil_register_library_map(array( 'PhabricatorSendGridConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorSessionsSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorSetting' => 'Phobject', + 'PhabricatorSettingsAccountPanelGroup' => 'PhabricatorSettingsPanelGroup', 'PhabricatorSettingsAddEmailAction' => 'PhabricatorSystemAction', 'PhabricatorSettingsAdjustController' => 'PhabricatorController', 'PhabricatorSettingsApplication' => 'PhabricatorApplication', - 'PhabricatorSettingsEditController' => 'PhabricatorController', + 'PhabricatorSettingsApplicationsPanelGroup' => 'PhabricatorSettingsPanelGroup', + 'PhabricatorSettingsAuthenticationPanelGroup' => 'PhabricatorSettingsPanelGroup', + 'PhabricatorSettingsDeveloperPanelGroup' => 'PhabricatorSettingsPanelGroup', 'PhabricatorSettingsEditEngine' => 'PhabricatorEditEngine', + 'PhabricatorSettingsEmailPanelGroup' => 'PhabricatorSettingsPanelGroup', + 'PhabricatorSettingsListController' => 'PhabricatorController', + 'PhabricatorSettingsLogsPanelGroup' => 'PhabricatorSettingsPanelGroup', 'PhabricatorSettingsMainController' => 'PhabricatorController', 'PhabricatorSettingsMainMenuBarExtension' => 'PhabricatorMainMenuBarExtension', 'PhabricatorSettingsPanel' => 'Phobject', + 'PhabricatorSettingsPanelGroup' => 'Phobject', 'PhabricatorSettingsTimezoneController' => 'PhabricatorController', 'PhabricatorSetupCheck' => 'Phobject', 'PhabricatorSetupCheckTestCase' => 'PhabricatorTestCase', @@ -8302,6 +8360,7 @@ phutil_register_library_map(array( 'PhabricatorTimeFormatSetting' => 'PhabricatorSelectSetting', 'PhabricatorTimeGuard' => 'Phobject', 'PhabricatorTimeTestCase' => 'PhabricatorTestCase', + 'PhabricatorTimezoneIgnoreOffsetSetting' => 'PhabricatorInternalSetting', 'PhabricatorTimezoneSetting' => 'PhabricatorOptionGroupSetting', 'PhabricatorTimezoneSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorTitleGlyphsSetting' => 'PhabricatorSelectSetting', @@ -8405,6 +8464,8 @@ phutil_register_library_map(array( 'PhabricatorPolicyInterface', ), 'PhabricatorUserLogView' => 'AphrontView', + 'PhabricatorUserMessageCountCacheType' => 'PhabricatorUserCacheType', + 'PhabricatorUserNotificationCountCacheType' => 'PhabricatorUserCacheType', 'PhabricatorUserPHIDResolver' => 'PhabricatorPHIDResolver', 'PhabricatorUserPreferences' => array( 'PhabricatorUserDAO', @@ -8416,9 +8477,12 @@ phutil_register_library_map(array( 'PhabricatorUserPreferencesEditor' => 'PhabricatorApplicationTransactionEditor', 'PhabricatorUserPreferencesPHIDType' => 'PhabricatorPHIDType', 'PhabricatorUserPreferencesQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', + 'PhabricatorUserPreferencesSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorUserPreferencesTransaction' => 'PhabricatorApplicationTransaction', + 'PhabricatorUserPreferencesTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhabricatorUserProfile' => 'PhabricatorUserDAO', 'PhabricatorUserProfileEditor' => 'PhabricatorApplicationTransactionEditor', + 'PhabricatorUserProfileImageCacheType' => 'PhabricatorUserCacheType', 'PhabricatorUserRealNameField' => 'PhabricatorUserCustomField', 'PhabricatorUserRolesField' => 'PhabricatorUserCustomField', 'PhabricatorUserSchemaSpec' => 'PhabricatorConfigSchemaSpec', @@ -8953,6 +9017,7 @@ phutil_register_library_map(array( 'PhabricatorFulltextInterface', ), 'PonderQuestionCommentController' => 'PonderController', + 'PonderQuestionCreateMailReceiver' => 'PhabricatorMailReceiver', 'PonderQuestionEditController' => 'PonderController', 'PonderQuestionEditor' => 'PonderEditor', 'PonderQuestionFulltextEngine' => 'PhabricatorFulltextEngine', diff --git a/src/aphront/response/AphrontAjaxResponse.php b/src/aphront/response/AphrontAjaxResponse.php index b13a62f268..1ccb3fe97e 100644 --- a/src/aphront/response/AphrontAjaxResponse.php +++ b/src/aphront/response/AphrontAjaxResponse.php @@ -64,8 +64,8 @@ final class AphrontAjaxResponse extends AphrontResponse { if ($request) { $viewer = $request->getViewer(); if ($viewer) { - $postprocessor_key = $viewer->getPreference( - PhabricatorUserPreferences::PREFERENCE_RESOURCE_POSTPROCESSOR); + $postprocessor_key = $viewer->getUserSetting( + PhabricatorAccessibilitySetting::SETTINGKEY); if (strlen($postprocessor_key)) { $response->setPostprocessorKey($postprocessor_key); } diff --git a/src/applications/aphlict/query/AphlictDropdownDataQuery.php b/src/applications/aphlict/query/AphlictDropdownDataQuery.php index e8a8edb59f..7a15ec7f64 100644 --- a/src/applications/aphlict/query/AphlictDropdownDataQuery.php +++ b/src/applications/aphlict/query/AphlictDropdownDataQuery.php @@ -46,17 +46,15 @@ final class AphlictDropdownDataQuery extends Phobject { $is_c_installed = PhabricatorApplication::isClassInstalledForViewer( $conpherence_app, $viewer); - $raw_message_count_number = null; - $message_count_number = null; if ($is_c_installed) { - $unread_status = ConpherenceParticipationStatus::BEHIND; - $unread = id(new ConpherenceParticipantCountQuery()) - ->withParticipantPHIDs(array($viewer->getPHID())) - ->withParticipationStatus($unread_status) - ->execute(); - $raw_message_count_number = idx($unread, $viewer->getPHID(), 0); + $raw_message_count_number = $viewer->getUnreadMessageCount(); $message_count_number = $this->formatNumber($raw_message_count_number); + } else { + $raw_message_count_number = null; + $message_count_number = null; } + + $conpherence_data = array( 'isInstalled' => $is_c_installed, 'countType' => 'messages', @@ -69,15 +67,15 @@ final class AphlictDropdownDataQuery extends Phobject { $is_n_installed = PhabricatorApplication::isClassInstalledForViewer( $notification_app, $viewer); - $notification_count_number = null; - $raw_notification_count_number = null; if ($is_n_installed) { - $raw_notification_count_number = - id(new PhabricatorFeedStoryNotification()) - ->countUnread($viewer); + $raw_notification_count_number = $viewer->getUnreadNotificationCount(); $notification_count_number = $this->formatNumber( $raw_notification_count_number); + } else { + $notification_count_number = null; + $raw_notification_count_number = null; } + $notification_data = array( 'isInstalled' => $is_n_installed, 'countType' => 'notifications', diff --git a/src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php b/src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php index d98879d0ed..627d1b43eb 100644 --- a/src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php +++ b/src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php @@ -139,7 +139,10 @@ final class PhabricatorAuthOneTimeLoginController ->save(); unset($unguarded); - $next = (string)id(new PhutilURI('/settings/panel/password/')) + $username = $target_user->getUsername(); + $panel_uri = "/settings/user/{$username}/page/password/"; + + $next = (string)id(new PhutilURI($panel_uri)) ->setQueryParams( array( 'key' => $key, diff --git a/src/applications/auth/controller/PhabricatorAuthStartController.php b/src/applications/auth/controller/PhabricatorAuthStartController.php index 633339a356..982252d29f 100644 --- a/src/applications/auth/controller/PhabricatorAuthStartController.php +++ b/src/applications/auth/controller/PhabricatorAuthStartController.php @@ -113,17 +113,9 @@ final class PhabricatorAuthStartController PhabricatorCookies::setClientIDCookie($request); } - if (!$request->getURIData('loggedout') && count($providers) == 1) { - $auto_login_provider = head($providers); - $auto_login_config = $auto_login_provider->getProviderConfig(); - if ($auto_login_provider instanceof PhabricatorPhabricatorAuthProvider && - $auto_login_config->getShouldAutoLogin()) { - $auto_login_adapter = $provider->getAdapter(); - $auto_login_adapter->setState($provider->getAuthCSRFCode($request)); - return id(new AphrontRedirectResponse()) - ->setIsExternal(true) - ->setURI($provider->getAdapter()->getAuthenticateURI()); - } + $auto_response = $this->tryAutoLogin($providers); + if ($auto_response) { + return $auto_response; } $invite = $this->loadInvite(); @@ -282,4 +274,35 @@ final class PhabricatorAuthStartController array($message)); } + private function tryAutoLogin(array $providers) { + $request = $this->getRequest(); + + // If the user just logged out, don't immediately log them in again. + if ($request->getURIData('loggedout')) { + return null; + } + + // If we have more than one provider, we can't autologin because we + // don't know which one the user wants. + if (count($providers) != 1) { + return null; + } + + $provider = head($providers); + if (!$provider->supportsAutoLogin()) { + return null; + } + + $config = $provider->getProviderConfig(); + if (!$config->getShouldAutoLogin()) { + return null; + } + + $auto_uri = $provider->getAutoLoginURI($request); + + return id(new AphrontRedirectResponse()) + ->setIsExternal(true) + ->setURI($auto_uri); + } + } diff --git a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php index a944a5b5c8..670a95f977 100644 --- a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php +++ b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php @@ -3,10 +3,6 @@ final class PhabricatorMustVerifyEmailController extends PhabricatorAuthController { - public function shouldRequireLogin() { - return false; - } - public function shouldRequireEmailVerification() { // NOTE: We don't technically need this since PhabricatorController forces // us here in either case, but it's more consistent with intent. diff --git a/src/applications/auth/controller/config/PhabricatorAuthEditController.php b/src/applications/auth/controller/config/PhabricatorAuthEditController.php index 049edfacef..ec2941a3fb 100644 --- a/src/applications/auth/controller/config/PhabricatorAuthEditController.php +++ b/src/applications/auth/controller/config/PhabricatorAuthEditController.php @@ -130,7 +130,7 @@ final class PhabricatorAuthEditController PhabricatorAuthProviderConfigTransaction::TYPE_TRUST_EMAILS) ->setNewValue($request->getInt('trustEmails', 0)); - if ($provider instanceof PhabricatorPhabricatorAuthProvider) { + if ($provider->supportsAutoLogin()) { $xactions[] = id(new PhabricatorAuthProviderConfigTransaction()) ->setTransactionType( PhabricatorAuthProviderConfigTransaction::TYPE_AUTO_LOGIN) @@ -314,7 +314,7 @@ final class PhabricatorAuthEditController $v_trust_email)); } - if ($provider instanceof PhabricatorPhabricatorAuthProvider) { + if ($provider->supportsAutoLogin()) { $form->appendChild( id(new AphrontFormCheckboxControl()) ->addCheckbox( diff --git a/src/applications/auth/engine/PhabricatorAuthSessionEngine.php b/src/applications/auth/engine/PhabricatorAuthSessionEngine.php index a3ee910629..e7d5c94146 100644 --- a/src/applications/auth/engine/PhabricatorAuthSessionEngine.php +++ b/src/applications/auth/engine/PhabricatorAuthSessionEngine.php @@ -113,7 +113,7 @@ final class PhabricatorAuthSessionEngine extends Phobject { $session_key = PhabricatorHash::digest($session_token); $cache_parts = $this->getUserCacheQueryParts($conn_r); - list($cache_selects, $cache_joins, $cache_map) = $cache_parts; + list($cache_selects, $cache_joins, $cache_map, $types_map) = $cache_parts; $info = queryfx_one( $conn_r, @@ -162,6 +162,7 @@ final class PhabricatorAuthSessionEngine extends Phobject { $user = $user_table->loadFromArray($info); + $cache_raw = $this->filterRawCacheData($user, $types_map, $cache_raw); $user->attachRawCacheData($cache_raw); switch ($session_type) { @@ -760,11 +761,13 @@ final class PhabricatorAuthSessionEngine extends Phobject { $cache_map = array(); $keys = array(); + $types_map = array(); $cache_types = PhabricatorUserCacheType::getAllCacheTypes(); foreach ($cache_types as $cache_type) { foreach ($cache_type->getAutoloadKeys() as $autoload_key) { $keys[] = $autoload_key; + $types_map[$autoload_key] = $cache_type; } } @@ -808,7 +811,32 @@ final class PhabricatorAuthSessionEngine extends Phobject { $cache_joins = ''; } - return array($cache_selects, $cache_joins, $cache_map); + return array($cache_selects, $cache_joins, $cache_map, $types_map); + } + + private function filterRawCacheData( + PhabricatorUser $user, + array $types_map, + array $cache_raw) { + + foreach ($cache_raw as $cache_key => $cache_data) { + $type = $types_map[$cache_key]; + if ($type->shouldValidateRawCacheData()) { + if (!$type->isRawCacheDataValid($user, $cache_key, $cache_data)) { + unset($cache_raw[$cache_key]); + } + } + } + + return $cache_raw; + } + + public function willServeRequestForUser(PhabricatorUser $user) { + // We allow the login user to generate any missing cache data inline. + $user->setAllowInlineCacheGeneration(true); + + // Switch to the user's translation. + PhabricatorEnv::setLocaleCode($user->getTranslation()); } } diff --git a/src/applications/auth/provider/PhabricatorAuthProvider.php b/src/applications/auth/provider/PhabricatorAuthProvider.php index 9484109943..c949764c9a 100644 --- a/src/applications/auth/provider/PhabricatorAuthProvider.php +++ b/src/applications/auth/provider/PhabricatorAuthProvider.php @@ -495,4 +495,12 @@ abstract class PhabricatorAuthProvider extends Phobject { } } + public function supportsAutoLogin() { + return false; + } + + public function getAutoLoginURI(AphrontRequest $request) { + throw new PhutilMethodNotImplementedException(); + } + } diff --git a/src/applications/auth/provider/PhabricatorOAuth2AuthProvider.php b/src/applications/auth/provider/PhabricatorOAuth2AuthProvider.php index aff6367840..a3300126af 100644 --- a/src/applications/auth/provider/PhabricatorOAuth2AuthProvider.php +++ b/src/applications/auth/provider/PhabricatorOAuth2AuthProvider.php @@ -273,4 +273,17 @@ abstract class PhabricatorOAuth2AuthProvider parent::willRenderLinkedAccount($viewer, $item, $account); } + public function supportsAutoLogin() { + return true; + } + + public function getAutoLoginURI(AphrontRequest $request) { + $csrf_code = $this->getAuthCSRFCode($request); + + $adapter = $this->getAdapter(); + $adapter->setState($csrf_code); + + return $adapter->getAuthenticateURI(); + } + } diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index a667717dd9..e010d4491f 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -335,17 +335,6 @@ abstract class PhabricatorApplication } - /** - * 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 )--------------------------------------------- */ diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php index 83e223d195..08966f29a5 100644 --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -104,7 +104,8 @@ abstract class PhabricatorController extends AphrontController { $request->setUser($user); } - PhabricatorEnv::setLocaleCode($user->getTranslation()); + id(new PhabricatorAuthSessionEngine()) + ->willServeRequestForUser($user); if (PhabricatorEnv::getEnvConfig('darkconsole.enabled')) { $dark_console = PhabricatorDarkConsoleSetting::SETTINGKEY; diff --git a/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php b/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php index 160fe4f5db..91ab0cf83d 100644 --- a/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php +++ b/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php @@ -26,6 +26,10 @@ final class PhabricatorCacheManagementPurgeWorkflow 'name' => 'purge-general', 'help' => pht('Purge the general cache.'), ), + array( + 'name' => 'purge-user', + 'help' => pht('Purge the user cache.'), + ), )); } @@ -38,6 +42,7 @@ final class PhabricatorCacheManagementPurgeWorkflow 'remarkup' => $purge_all || $args->getArg('purge-remarkup'), 'changeset' => $purge_all || $args->getArg('purge-changeset'), 'general' => $purge_all || $args->getArg('purge-general'), + 'user' => $purge_all || $args->getArg('purge-user'), ); if (!array_filter($purge)) { @@ -72,6 +77,12 @@ final class PhabricatorCacheManagementPurgeWorkflow $this->purgeGeneralCache(); $console->writeOut("%s\n", pht('Done.')); } + + if ($purge['user']) { + $console->writeOut(pht('Purging user cache...')); + $this->purgeUserCache(); + $console->writeOut("%s\n", pht('Done.')); + } } private function purgeRemarkupCache() { @@ -100,4 +111,14 @@ final class PhabricatorCacheManagementPurgeWorkflow 'cache_general'); } + private function purgeUserCache() { + $table = new PhabricatorUserCache(); + $conn_w = $table->establishConnection('w'); + + queryfx( + $conn_w, + 'TRUNCATE TABLE %T', + $table->getTableName()); + } + } diff --git a/src/applications/calendar/application/PhabricatorCalendarApplication.php b/src/applications/calendar/application/PhabricatorCalendarApplication.php index cf05e96666..71358366df 100644 --- a/src/applications/calendar/application/PhabricatorCalendarApplication.php +++ b/src/applications/calendar/application/PhabricatorCalendarApplication.php @@ -73,18 +73,6 @@ final class PhabricatorCalendarApplication extends PhabricatorApplication { ); } - 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; - } - public function getMailCommandObjects() { return array( 'event' => array( diff --git a/src/applications/conduit/controller/PhabricatorConduitAPIController.php b/src/applications/conduit/controller/PhabricatorConduitAPIController.php index 690f6cc1da..b9e8b1b15e 100644 --- a/src/applications/conduit/controller/PhabricatorConduitAPIController.php +++ b/src/applications/conduit/controller/PhabricatorConduitAPIController.php @@ -487,6 +487,10 @@ final class PhabricatorConduitAPIController } $request->setUser($user); + + id(new PhabricatorAuthSessionEngine()) + ->willServeRequestForUser($user); + return null; } diff --git a/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php b/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php index 6f315783cc..59161d2814 100644 --- a/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php +++ b/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php @@ -3,7 +3,11 @@ final class PhabricatorConduitTokensSettingsPanel extends PhabricatorSettingsPanel { - public function isEditableByAdministrators() { + public function isManagementPanel() { + if ($this->getUser()->getIsMailingList()) { + return false; + } + return true; } @@ -15,15 +19,11 @@ final class PhabricatorConduitTokensSettingsPanel return pht('Conduit API Tokens'); } - public function getPanelGroup() { - return pht('Sessions and Logs'); + public function getPanelGroupKey() { + return PhabricatorSettingsLogsPanelGroup::PANELGROUPKEY; } public function isEnabled() { - if ($this->getUser()->getIsMailingList()) { - return false; - } - return true; } diff --git a/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php b/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php index 6b999b0d55..2c0021341f 100644 --- a/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php +++ b/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php @@ -55,7 +55,7 @@ final class PhabricatorPHPMailerConfigOptions $this->newOption('phpmailer.smtp-password', 'string', null) ->setHidden(true) ->setDescription(pht('Password for SMTP.')), - $this->newOption('phpmailer.smtp-encoding', 'string', '8bit') + $this->newOption('phpmailer.smtp-encoding', 'string', 'base64') ->setSummary(pht('Configure how mail is encoded.')) ->setDescription( pht( @@ -64,14 +64,8 @@ final class PhabricatorPHPMailerConfigOptions "encoding. If you're having trouble with mail being mangled or ". "arriving with too many or too few newlines, you may try ". "adjusting this setting.\n\n". - "Supported values are `8bit` (default), `quoted-printable`, ". - "`7bit`, `binary` and `base64`.\n\n". - "The settings in the table below may work well.\n\n". - "| MTA | Setting | Notes\n". - "|-----|---------|------\n". - "| SendGrid via SMTP | `quoted-printable` | Double newlines under ". - "`8bit`.\n". - "| All Other MTAs | `8bit` | Default setting.")), + "Supported values are `8bit`, `quoted-printable`, ". + "`7bit`, `binary` and `base64`.")), ); } diff --git a/src/applications/conpherence/application/PhabricatorConpherenceApplication.php b/src/applications/conpherence/application/PhabricatorConpherenceApplication.php index ea06aaa456..8defc4d2be 100644 --- a/src/applications/conpherence/application/PhabricatorConpherenceApplication.php +++ b/src/applications/conpherence/application/PhabricatorConpherenceApplication.php @@ -48,19 +48,6 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication { ); } - public function getQuickCreateItems(PhabricatorUser $viewer) { - $items = array(); - - $item = id(new PHUIListItemView()) - ->setName(pht('Conpherence Room')) - ->setIcon('fa-comments') - ->setWorkflow(true) - ->setHref($this->getBaseURI().'new/'); - $items[] = $item; - - return $items; - } - public function getQuicksandURIPatternBlacklist() { return array( '/conpherence/.*', diff --git a/src/applications/conpherence/constants/ConpherenceSettings.php b/src/applications/conpherence/constants/ConpherenceSettings.php deleted file mode 100644 index 0413ba536a..0000000000 --- a/src/applications/conpherence/constants/ConpherenceSettings.php +++ /dev/null @@ -1,22 +0,0 @@ -setSettings(array('notifications' => $notifications)); $participant->save(); + + $label = PhabricatorConpherenceNotificationsSetting::getSettingLabel( + $notifications); + $result = pht( 'Updated notification settings to "%s".', - ConpherenceSettings::getHumanString($notifications)); + $label); + return id(new AphrontAjaxResponse()) ->setContent($result); break; diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php index 2f01979df6..ea0fa7a295 100644 --- a/src/applications/conpherence/controller/ConpherenceViewController.php +++ b/src/applications/conpherence/controller/ConpherenceViewController.php @@ -68,9 +68,12 @@ final class ConpherenceViewController extends $latest_transaction = head($transactions); $participant = $conpherence->getParticipantIfExists($user->getPHID()); if ($participant) { - $write_guard = AphrontWriteGuard::beginScopedUnguardedWrites(); - $participant->markUpToDate($conpherence, $latest_transaction); - unset($write_guard); + if (!$participant->isUpToDate($conpherence)) { + $write_guard = AphrontWriteGuard::beginScopedUnguardedWrites(); + $participant->markUpToDate($conpherence, $latest_transaction); + $user->clearCacheData(PhabricatorUserMessageCountCacheType::KEY_COUNT); + unset($write_guard); + } } $data = ConpherenceTransactionRenderer::renderTransactions( diff --git a/src/applications/conpherence/controller/ConpherenceWidgetController.php b/src/applications/conpherence/controller/ConpherenceWidgetController.php index af9d799519..3e749c6cf2 100644 --- a/src/applications/conpherence/controller/ConpherenceWidgetController.php +++ b/src/applications/conpherence/controller/ConpherenceWidgetController.php @@ -2,17 +2,6 @@ final class ConpherenceWidgetController extends ConpherenceController { - private $userPreferences; - - public function setUserPreferences(PhabricatorUserPreferences $pref) { - $this->userPreferences = $pref; - return $this; - } - - public function getUserPreferences() { - return $this->userPreferences; - } - public function shouldAllowPublic() { return true; } @@ -35,8 +24,6 @@ final class ConpherenceWidgetController extends ConpherenceController { } $this->setConpherence($conpherence); - $this->setUserPreferences($user->loadPreferences()); - switch ($request->getStr('widget')) { case 'widgets-people': $content = $this->renderPeopleWidgetPaneContent(); @@ -143,28 +130,24 @@ final class ConpherenceWidgetController extends ConpherenceController { ), $text); } - $default = ConpherenceSettings::EMAIL_ALWAYS; - $preference = $this->getUserPreferences(); - if ($preference) { - $default = $preference->getPreference( - PhabricatorUserPreferences::PREFERENCE_CONPH_NOTIFICATIONS, - ConpherenceSettings::EMAIL_ALWAYS); - } + $notification_key = PhabricatorConpherenceNotificationsSetting::SETTINGKEY; + $notification_default = $viewer->getUserSetting($notification_key); + $settings = $participant->getSettings(); $notifications = idx( $settings, 'notifications', - $default); + $notification_default); $options = id(new AphrontFormRadioButtonControl()) ->addButton( - ConpherenceSettings::EMAIL_ALWAYS, - ConpherenceSettings::getHumanString( - ConpherenceSettings::EMAIL_ALWAYS), + PhabricatorConpherenceNotificationsSetting::VALUE_CONPHERENCE_EMAIL, + PhabricatorConpherenceNotificationsSetting::getSettingLabel( + PhabricatorConpherenceNotificationsSetting::VALUE_CONPHERENCE_EMAIL), '') ->addButton( - ConpherenceSettings::NOTIFICATIONS_ONLY, - ConpherenceSettings::getHumanString( - ConpherenceSettings::NOTIFICATIONS_ONLY), + PhabricatorConpherenceNotificationsSetting::VALUE_CONPHERENCE_NOTIFY, + PhabricatorConpherenceNotificationsSetting::getSettingLabel( + PhabricatorConpherenceNotificationsSetting::VALUE_CONPHERENCE_NOTIFY), '') ->setName('notifications') ->setValue($notifications); diff --git a/src/applications/conpherence/editor/ConpherenceEditor.php b/src/applications/conpherence/editor/ConpherenceEditor.php index c68bb429a3..77dcf84eec 100644 --- a/src/applications/conpherence/editor/ConpherenceEditor.php +++ b/src/applications/conpherence/editor/ConpherenceEditor.php @@ -422,6 +422,10 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor { $participant->save(); } + PhabricatorUserCache::clearCaches( + PhabricatorUserMessageCountCacheType::KEY_COUNT, + array_keys($participants)); + if ($xactions) { $data = array( 'type' => 'message', @@ -541,26 +545,29 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor { $participant_phids = mpull($participants, 'getParticipantPHID'); - $preferences = id(new PhabricatorUserPreferencesQuery()) + $users = id(new PhabricatorPeopleQuery()) ->setViewer(PhabricatorUser::getOmnipotentUser()) - ->withUserPHIDs($participant_phids) + ->withPHIDs($participant_phids) + ->needUserSettings(true) ->execute(); - $preferences = mpull($preferences, null, 'getUserPHID'); + $users = mpull($users, null, 'getPHID'); + + $notification_key = PhabricatorConpherenceNotificationsSetting::SETTINGKEY; + $notification_email = + PhabricatorConpherenceNotificationsSetting::VALUE_CONPHERENCE_EMAIL; foreach ($participants as $phid => $participant) { - $default = ConpherenceSettings::EMAIL_ALWAYS; - $preference = idx($preferences, $phid); - if ($preference) { - $default = $preference->getPreference( - PhabricatorUserPreferences::PREFERENCE_CONPH_NOTIFICATIONS, - ConpherenceSettings::EMAIL_ALWAYS); + $user = idx($users, $phid); + if ($user) { + $default = $user->getUserSetting($notification_key); + } else { + $default = $notification_email; } + $settings = $participant->getSettings(); - $notifications = idx( - $settings, - 'notifications', - $default); - if ($notifications == ConpherenceSettings::EMAIL_ALWAYS) { + $notifications = idx($settings, 'notifications', $default); + + if ($notifications == $notification_email) { $to_phids[] = $phid; } } diff --git a/src/applications/conpherence/query/ConpherenceThreadQuery.php b/src/applications/conpherence/query/ConpherenceThreadQuery.php index 7006ee759d..7ad653f486 100644 --- a/src/applications/conpherence/query/ConpherenceThreadQuery.php +++ b/src/applications/conpherence/query/ConpherenceThreadQuery.php @@ -100,7 +100,7 @@ final class ConpherenceThreadQuery $data = queryfx_all( $conn_r, - 'SELECT conpherence_thread.* FROM %T conpherence_thread %Q %Q %Q %Q %Q', + 'SELECT thread.* FROM %T thread %Q %Q %Q %Q %Q', $table->getTableName(), $this->buildJoinClause($conn_r), $this->buildWhereClause($conn_r), @@ -144,7 +144,7 @@ final class ConpherenceThreadQuery protected function buildGroupClause(AphrontDatabaseConnection $conn_r) { if ($this->participantPHIDs !== null || strlen($this->fulltext)) { - return 'GROUP BY conpherence_thread.id'; + return 'GROUP BY thread.id'; } else { return $this->buildApplicationSearchGroupClause($conn_r); } @@ -156,14 +156,14 @@ final class ConpherenceThreadQuery if ($this->participantPHIDs !== null) { $joins[] = qsprintf( $conn_r, - 'JOIN %T p ON p.conpherencePHID = conpherence_thread.phid', + 'JOIN %T p ON p.conpherencePHID = thread.phid', id(new ConpherenceParticipant())->getTableName()); } if (strlen($this->fulltext)) { $joins[] = qsprintf( $conn_r, - 'JOIN %T idx ON idx.threadPHID = conpherence_thread.phid', + 'JOIN %T idx ON idx.threadPHID = thread.phid', id(new ConpherenceIndex())->getTableName()); } @@ -179,14 +179,14 @@ final class ConpherenceThreadQuery if ($this->ids !== null) { $where[] = qsprintf( $conn_r, - 'conpherence_thread.id IN (%Ld)', + 'thread.id IN (%Ld)', $this->ids); } if ($this->phids !== null) { $where[] = qsprintf( $conn_r, - 'conpherence_thread.phid IN (%Ls)', + 'thread.phid IN (%Ls)', $this->phids); } @@ -438,4 +438,8 @@ final class ConpherenceThreadQuery return 'PhabricatorConpherenceApplication'; } + protected function getPrimaryTableAlias() { + return 'thread'; + } + } diff --git a/src/applications/conpherence/storage/ConpherenceParticipant.php b/src/applications/conpherence/storage/ConpherenceParticipant.php index a656dce776..32c3fb38e1 100644 --- a/src/applications/conpherence/storage/ConpherenceParticipant.php +++ b/src/applications/conpherence/storage/ConpherenceParticipant.php @@ -47,11 +47,16 @@ final class ConpherenceParticipant extends ConpherenceDAO { $this->setBehindTransactionPHID($xaction->getPHID()); $this->setSeenMessageCount($conpherence->getMessageCount()); $this->save(); + + PhabricatorUserCache::clearCache( + PhabricatorUserMessageCountCacheType::KEY_COUNT, + $this->getParticipantPHID()); } + return $this; } - private function isUpToDate(ConpherenceThread $conpherence) { + public function isUpToDate(ConpherenceThread $conpherence) { return ($this->getSeenMessageCount() == $conpherence->getMessageCount()) && diff --git a/src/applications/conpherence/view/ConpherenceDurableColumnView.php b/src/applications/conpherence/view/ConpherenceDurableColumnView.php index d892eaf62b..d265b37ff7 100644 --- a/src/applications/conpherence/view/ConpherenceDurableColumnView.php +++ b/src/applications/conpherence/view/ConpherenceDurableColumnView.php @@ -108,7 +108,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { } protected function getTagContent() { - $column_key = PhabricatorUserPreferences::PREFERENCE_CONPHERENCE_COLUMN; + $column_key = PhabricatorConpherenceColumnVisibleSetting::SETTINGKEY; Javelin::initBehavior( 'durable-column', diff --git a/src/applications/console/controller/DarkConsoleController.php b/src/applications/console/controller/DarkConsoleController.php index 3849ee0cb5..3a677920ee 100644 --- a/src/applications/console/controller/DarkConsoleController.php +++ b/src/applications/console/controller/DarkConsoleController.php @@ -17,30 +17,59 @@ final class DarkConsoleController extends PhabricatorController { return true; } - public function processRequest() { - $request = $this->getRequest(); - $user = $request->getUser(); + public function handleRequest(AphrontRequest $request) { + $viewer = $this->getViewer(); $response = id(new AphrontAjaxResponse())->setDisableConsole(true); - if (!$user->isLoggedIn()) { + if (!$viewer->isLoggedIn()) { return $response; } $visible = $request->getStr('visible'); if (strlen($visible)) { - $user->setConsoleVisible((int)$visible); - $user->save(); + $this->writeDarkConsoleSetting( + PhabricatorDarkConsoleVisibleSetting::SETTINGKEY, + (int)$visible); return $response; } $tab = $request->getStr('tab'); if (strlen($tab)) { - $user->setConsoleTab($tab); - $user->save(); + $this->writeDarkConsoleSetting( + PhabricatorDarkConsoleTabSetting::SETTINGKEY, + $tab); return $response; } return new Aphront404Response(); } + private function writeDarkConsoleSetting($key, $value) { + $viewer = $this->getViewer(); + $request = $this->getRequest(); + + $preferences = PhabricatorUserPreferences::loadUserPreferences($viewer); + + $editor = id(new PhabricatorUserPreferencesEditor()) + ->setActor($viewer) + ->setContentSourceFromRequest($request) + ->setContinueOnNoEffect(true) + ->setContinueOnMissingFields(true); + + $xactions = array(); + $xactions[] = $preferences->newTransaction($key, $value); + $editor->applyTransactions($preferences, $xactions); + + // Reload the user to regenerate their preferences cache. If we don't + // do this, the "Services" tab gets misleadingly spammed up with cache + // fills that are only filling because you toggled the console or switched + // tabs. This makes it harder to see what's really going on, so just force + // a cache regeneration here. + id(new PhabricatorPeopleQuery()) + ->setViewer($viewer) + ->withPHIDs(array($viewer->getPHID())) + ->needUserSettings(true) + ->execute(); + } + } diff --git a/src/applications/console/core/DarkConsoleCore.php b/src/applications/console/core/DarkConsoleCore.php index 2898a56e41..ddb22b9cfe 100644 --- a/src/applications/console/core/DarkConsoleCore.php +++ b/src/applications/console/core/DarkConsoleCore.php @@ -93,7 +93,8 @@ final class DarkConsoleCore extends Phobject { public function render(AphrontRequest $request) { $user = $request->getUser(); - $visible = $user ? $user->getConsoleVisible() : true; + $visible = $user->getUserSetting( + PhabricatorDarkConsoleVisibleSetting::SETTINGKEY); return javelin_tag( 'div', diff --git a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php index 93aec9a037..0abf9e453a 100644 --- a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php +++ b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php @@ -147,7 +147,7 @@ final class PhabricatorCountdownSearchEngine $create_button = id(new PHUIButtonView()) ->setTag('a') ->setText(pht('Create a Countdown')) - ->setHref('/countdown/create/') + ->setHref('/countdown/edit/') ->setColor(PHUIButtonView::GREEN); $icon = $this->getApplication()->getIcon(); diff --git a/src/applications/dashboard/controller/PhabricatorDashboardEditController.php b/src/applications/dashboard/controller/PhabricatorDashboardEditController.php index 665f9735d8..8438d0442b 100644 --- a/src/applications/dashboard/controller/PhabricatorDashboardEditController.php +++ b/src/applications/dashboard/controller/PhabricatorDashboardEditController.php @@ -268,10 +268,10 @@ final class PhabricatorDashboardEditController $request, $viewer, 'query', - pht('Recent Tasks'), + pht('Open Tasks'), array( 'class' => 'ManiphestTaskSearchEngine', - 'key' => 'all', + 'key' => 'open', )); $panel_phids[] = $task_panel->getPHID(); diff --git a/src/applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php new file mode 100644 index 0000000000..8a80279b43 --- /dev/null +++ b/src/applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php @@ -0,0 +1,18 @@ +newOption( 'metamta.differential.patch-format', - 'string', + 'enum', 'unified') ->setDescription( - pht("Format for inlined or attached patches: 'git' or 'unified'.")), + pht('Format for inlined or attached patches.')) + ->setEnumOptions( + array('unified' => 'unified', 'git' => 'git')), ); } diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 39fc6ca201..32f9978e4d 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -381,7 +381,7 @@ final class DifferentialRevisionViewController extends DifferentialController { $nav = null; if ($filetree_on) { - $collapsed_key = PhabricatorUserPreferences::PREFERENCE_NAV_COLLAPSED; + $collapsed_key = PhabricatorFiletreeVisibleSetting::SETTINGKEY; $collapsed_value = $viewer->getUserSetting($collapsed_key); $nav = id(new DifferentialChangesetFileTreeSideNavBuilder()) diff --git a/src/applications/differential/render/DifferentialChangesetRenderer.php b/src/applications/differential/render/DifferentialChangesetRenderer.php index 2aae7bf1cd..450d160e23 100644 --- a/src/applications/differential/render/DifferentialChangesetRenderer.php +++ b/src/applications/differential/render/DifferentialChangesetRenderer.php @@ -626,6 +626,8 @@ abstract class DifferentialChangesetRenderer extends Phobject { unset($old['unix:filemode']); } + $metadata = $changeset->getMetadata(); + if ($this->hasOldFile()) { $file = $this->getOldFile(); if ($file->getImageWidth()) { @@ -634,6 +636,12 @@ abstract class DifferentialChangesetRenderer extends Phobject { } $old['file:mimetype'] = $file->getMimeType(); $old['file:size'] = phutil_format_bytes($file->getByteSize()); + } else { + $old['file:mimetype'] = idx($metadata, 'old:file:mime-type'); + $size = idx($metadata, 'old:file:size'); + if ($size !== null) { + $old['file:size'] = phutil_format_bytes($size); + } } if ($this->hasNewFile()) { @@ -644,6 +652,12 @@ abstract class DifferentialChangesetRenderer extends Phobject { } $new['file:mimetype'] = $file->getMimeType(); $new['file:size'] = phutil_format_bytes($file->getByteSize()); + } else { + $new['file:mimetype'] = idx($metadata, 'new:file:mime-type'); + $size = idx($metadata, 'new:file:size'); + if ($size !== null) { + $new['file:size'] = phutil_format_bytes($size); + } } return array($old, $new); diff --git a/src/applications/differential/render/DifferentialChangesetTestRenderer.php b/src/applications/differential/render/DifferentialChangesetTestRenderer.php index 429dbeda0a..a0d1fad0eb 100644 --- a/src/applications/differential/render/DifferentialChangesetTestRenderer.php +++ b/src/applications/differential/render/DifferentialChangesetTestRenderer.php @@ -32,6 +32,13 @@ abstract class DifferentialChangesetTestRenderer $changeset = $this->getChangeset(); list($old, $new) = $this->getChangesetProperties($changeset); + foreach (array_keys($old) as $key) { + if ($old[$key] === idx($new, $key)) { + unset($old[$key]); + unset($new[$key]); + } + } + if (!$old && !$new) { return null; } diff --git a/src/applications/differential/storage/DifferentialRevision.php b/src/applications/differential/storage/DifferentialRevision.php index 6ca586c747..c2915d92c6 100644 --- a/src/applications/differential/storage/DifferentialRevision.php +++ b/src/applications/differential/storage/DifferentialRevision.php @@ -14,7 +14,8 @@ final class DifferentialRevision extends DifferentialDAO PhabricatorMentionableInterface, PhabricatorDestructibleInterface, PhabricatorProjectInterface, - PhabricatorFulltextInterface { + PhabricatorFulltextInterface, + PhabricatorConduitResultInterface { protected $title = ''; protected $originalTitle; @@ -635,4 +636,31 @@ final class DifferentialRevision extends DifferentialDAO } +/* -( PhabricatorConduitResultInterface )---------------------------------- */ + + + public function getFieldSpecificationsForConduit() { + return array( + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('title') + ->setType('string') + ->setDescription(pht('The revision title.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('authorPHID') + ->setType('phid') + ->setDescription(pht('Revision author PHID.')), + ); + } + + public function getFieldValuesForConduit() { + return array( + 'title' => $this->getTitle(), + 'authorPHID' => $this->getAuthorPHID(), + ); + } + + public function getConduitSearchAttachments() { + return array(); + } + } diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index 1357bed620..30c2b8265d 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -105,28 +105,31 @@ final class DiffusionBrowseController extends DiffusionController { $path = $drequest->getPath(); - $preferences = $viewer->loadPreferences(); + $blame_key = PhabricatorDiffusionBlameSetting::SETTINGKEY; + $color_key = PhabricatorDiffusionColorSetting::SETTINGKEY; $show_blame = $request->getBool( 'blame', - $preferences->getPreference( - PhabricatorUserPreferences::PREFERENCE_DIFFUSION_BLAME, - false)); + $viewer->getUserSetting($blame_key)); + $show_color = $request->getBool( 'color', - $preferences->getPreference( - PhabricatorUserPreferences::PREFERENCE_DIFFUSION_COLOR, - true)); + $viewer->getUserSetting($color_key)); $view = $request->getStr('view'); if ($request->isFormPost() && $view != 'raw' && $viewer->isLoggedIn()) { - $preferences->setPreference( - PhabricatorUserPreferences::PREFERENCE_DIFFUSION_BLAME, - $show_blame); - $preferences->setPreference( - PhabricatorUserPreferences::PREFERENCE_DIFFUSION_COLOR, - $show_color); - $preferences->save(); + $preferences = PhabricatorUserPreferences::loadUserPreferences($viewer); + + $editor = id(new PhabricatorUserPreferencesEditor()) + ->setActor($viewer) + ->setContentSourceFromRequest($request) + ->setContinueOnNoEffect(true) + ->setContinueOnMissingFields(true); + + $xactions = array(); + $xactions[] = $preferences->newTransaction($blame_key, $show_blame); + $xactions[] = $preferences->newTransaction($color_key, $show_color); + $editor->applyTransactions($preferences, $xactions); $uri = $request->getRequestURI() ->alter('blame', null) diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index 6cdca19953..dedad2c7c5 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -329,7 +329,7 @@ final class DiffusionCommitController extends DiffusionController { PhabricatorShowFiletreeSetting::SETTINGKEY, PhabricatorShowFiletreeSetting::VALUE_ENABLE_FILETREE); - $pref_collapse = PhabricatorUserPreferences::PREFERENCE_NAV_COLLAPSED; + $pref_collapse = PhabricatorFiletreeVisibleSetting::SETTINGKEY; $collapsed = $viewer->getUserSetting($pref_collapse); $nav = null; diff --git a/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php b/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php index 454ed01570..1c42fb027b 100644 --- a/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php +++ b/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php @@ -2,7 +2,11 @@ final class DiffusionSetPasswordSettingsPanel extends PhabricatorSettingsPanel { - public function isEditableByAdministrators() { + public function isManagementPanel() { + if ($this->getUser()->getIsMailingList()) { + return false; + } + return true; } @@ -14,15 +18,11 @@ final class DiffusionSetPasswordSettingsPanel extends PhabricatorSettingsPanel { return pht('VCS Password'); } - public function getPanelGroup() { - return pht('Authentication'); + public function getPanelGroupKey() { + return PhabricatorSettingsAuthenticationPanelGroup::PANELGROUPKEY; } public function isEnabled() { - if ($this->getUser()->getIsMailingList()) { - return false; - } - return PhabricatorEnv::getEnvConfig('diffusion.allow-http-auth'); } diff --git a/src/applications/diffusion/protocol/DiffusionCommandEngine.php b/src/applications/diffusion/protocol/DiffusionCommandEngine.php index 5a18595049..033f1517ce 100644 --- a/src/applications/diffusion/protocol/DiffusionCommandEngine.php +++ b/src/applications/diffusion/protocol/DiffusionCommandEngine.php @@ -9,6 +9,7 @@ abstract class DiffusionCommandEngine extends Phobject { private $passthru; private $connectAsDevice; private $sudoAsDaemon; + private $uri; public static function newCommandEngine(PhabricatorRepository $repository) { $engines = self::newCommandEngines(); @@ -48,6 +49,16 @@ abstract class DiffusionCommandEngine extends Phobject { return $this->repository; } + public function setURI(PhutilURI $uri) { + $this->uri = $uri; + $this->setProtocol($uri->getProtocol()); + return $this; + } + + public function getURI() { + return $this->uri; + } + public function setProtocol($protocol) { $this->protocol = $protocol; return $this; diff --git a/src/applications/diffusion/protocol/DiffusionGitCommandEngine.php b/src/applications/diffusion/protocol/DiffusionGitCommandEngine.php index 5eae19e030..a16416ae1d 100644 --- a/src/applications/diffusion/protocol/DiffusionGitCommandEngine.php +++ b/src/applications/diffusion/protocol/DiffusionGitCommandEngine.php @@ -30,6 +30,21 @@ final class DiffusionGitCommandEngine $env['GIT_SSH'] = $this->getSSHWrapper(); } + if ($this->isAnyHTTPProtocol()) { + $uri = $this->getURI(); + if ($uri) { + $proxy = PhutilHTTPEngineExtension::buildHTTPProxyURI($uri); + if ($proxy) { + if ($this->isHTTPSProtocol()) { + $env_key = 'https_proxy'; + } else { + $env_key = 'http_proxy'; + } + $env[$env_key] = (string)$proxy; + } + } + } + return $env; } diff --git a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php index fad8d4019e..026558f1b8 100644 --- a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php +++ b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php @@ -598,7 +598,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject { ->setArgv($argv) ->setSudoAsDaemon(true) ->setCredentialPHID($repository->getCredentialPHID()) - ->setProtocol($repository->getRemoteProtocol()) + ->setURI($repository->getRemoteURI()) ->newFuture(); $future->setCWD($local_path); @@ -704,7 +704,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject { ->setArgv($argv) ->setConnectAsDevice(true) ->setSudoAsDaemon(true) - ->setProtocol($fetch_uri->getProtocol()) + ->setURI($fetch_uri) ->newFuture(); $future->setCWD($local_path); diff --git a/src/applications/feed/PhabricatorFeedStoryPublisher.php b/src/applications/feed/PhabricatorFeedStoryPublisher.php index be476012c3..3b59edc37b 100644 --- a/src/applications/feed/PhabricatorFeedStoryPublisher.php +++ b/src/applications/feed/PhabricatorFeedStoryPublisher.php @@ -159,7 +159,8 @@ final class PhabricatorFeedStoryPublisher extends Phobject { $will_receive_mail = array_fill_keys($this->mailRecipientPHIDs, true); - foreach (array_unique($subscribed_phids) as $user_phid) { + $user_phids = array_unique($subscribed_phids); + foreach ($user_phids as $user_phid) { if (isset($will_receive_mail[$user_phid])) { $mark_read = 1; } else { @@ -184,6 +185,10 @@ final class PhabricatorFeedStoryPublisher extends Phobject { $notif->getTableName(), implode(', ', $sql)); } + + PhabricatorUserCache::clearCaches( + PhabricatorUserNotificationCountCacheType::KEY_COUNT, + $user_phids); } private function sendNotification($chrono_key, array $subscribed_phids) { @@ -214,8 +219,8 @@ final class PhabricatorFeedStoryPublisher extends Phobject { $all_prefs = mpull($all_prefs, null, 'getUserPHID'); } - $pref_default = PhabricatorUserPreferences::MAILTAG_PREFERENCE_EMAIL; - $pref_ignore = PhabricatorUserPreferences::MAILTAG_PREFERENCE_IGNORE; + $pref_default = PhabricatorEmailTagsSetting::VALUE_EMAIL; + $pref_ignore = PhabricatorEmailTagsSetting::VALUE_IGNORE; $keep = array(); foreach ($phids as $phid) { @@ -224,9 +229,8 @@ final class PhabricatorFeedStoryPublisher extends Phobject { } if ($tags && isset($all_prefs[$phid])) { - $mailtags = $all_prefs[$phid]->getPreference( - PhabricatorUserPreferences::PREFERENCE_MAILTAGS, - array()); + $mailtags = $all_prefs[$phid]->getSettingValue( + PhabricatorEmailTagsSetting::SETTINGKEY); $notify = false; foreach ($tags as $tag) { diff --git a/src/applications/files/application/PhabricatorFilesApplication.php b/src/applications/files/application/PhabricatorFilesApplication.php index 4cdcd76041..a94709d400 100644 --- a/src/applications/files/application/PhabricatorFilesApplication.php +++ b/src/applications/files/application/PhabricatorFilesApplication.php @@ -81,7 +81,8 @@ final class PhabricatorFilesApplication extends PhabricatorApplication { 'proxy/' => 'PhabricatorFileProxyController', 'transforms/(?P[1-9]\d*)/' => 'PhabricatorFileTransformListController', - 'uploaddialog/' => 'PhabricatorFileUploadDialogController', + 'uploaddialog/(?Psingle/)?' + => 'PhabricatorFileUploadDialogController', 'download/(?P[^/]+)/' => 'PhabricatorFileDialogController', 'iconset/(?P[^/]+)/' => array( 'select/' => 'PhabricatorFileIconSetSelectController', diff --git a/src/applications/files/config/PhabricatorFilesConfigOptions.php b/src/applications/files/config/PhabricatorFilesConfigOptions.php index 43e12eddec..063a6d9138 100644 --- a/src/applications/files/config/PhabricatorFilesConfigOptions.php +++ b/src/applications/files/config/PhabricatorFilesConfigOptions.php @@ -34,9 +34,16 @@ final class PhabricatorFilesConfigOptions 'image/x-icon' => 'image/x-icon', 'image/vnd.microsoft.icon' => 'image/x-icon', - 'audio/x-wav' => 'audio/x-wav', + // This is a generic type for both OGG video and OGG audio. 'application/ogg' => 'application/ogg', - 'audio/mpeg' => 'audio/mpeg', + + 'audio/x-wav' => 'audio/x-wav', + 'audio/mpeg' => 'audio/mpeg', + 'audio/ogg' => 'audio/ogg', + + 'video/mp4' => 'video/mp4', + 'video/ogg' => 'video/ogg', + 'video/webm' => 'video/webm', ); $image_default = array( @@ -49,10 +56,29 @@ final class PhabricatorFilesConfigOptions 'image/vnd.microsoft.icon' => true, ); + + // The "application/ogg" type is listed as both an audio and video type, + // because it may contain either type of content. + $audio_default = array( - 'audio/x-wav' => true, + 'audio/x-wav' => true, + 'audio/mpeg' => true, + 'audio/ogg' => true, + + // These are video or ambiguous types, but can be forced to render as + // audio with `media=audio`, which seems to work properly in browsers. + // (For example, you can embed a music video as audio if you just want + // to set the mood for your task without distracting viewers.) + 'video/mp4' => true, + 'video/ogg' => true, + 'application/ogg' => true, + ); + + $video_default = array( + 'video/mp4' => true, + 'video/ogg' => true, + 'video/webm' => true, 'application/ogg' => true, - 'audio/mpeg' => true, ); // largely lifted from http://en.wikipedia.org/wiki/Internet_media_type @@ -70,6 +96,7 @@ final class PhabricatorFilesConfigOptions // movie file icon 'video/mpeg' => 'fa-file-movie-o', 'video/mp4' => 'fa-file-movie-o', + 'application/ogg' => 'fa-file-movie-o', 'video/ogg' => 'fa-file-movie-o', 'video/quicktime' => 'fa-file-movie-o', 'video/webm' => 'fa-file-movie-o', @@ -122,8 +149,14 @@ final class PhabricatorFilesConfigOptions ->setSummary(pht('Configure which MIME types are audio.')) ->setDescription( pht( - 'List of MIME types which can be used to render an `%s` tag.', + 'List of MIME types which can be rendered with an `%s` tag.', '