1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 03:02:43 +01:00

(stable) Promote 2016 Week 23

This commit is contained in:
epriestley 2016-06-11 04:28:45 -07:00
commit 55693ec631
219 changed files with 4068 additions and 2295 deletions

View file

@ -7,10 +7,10 @@
*/ */
return array( return array(
'names' => array( 'names' => array(
'core.pkg.css' => '8aeacc63', 'core.pkg.css' => '6913fe66',
'core.pkg.js' => '3f15fa62', 'core.pkg.js' => '10275c16',
'darkconsole.pkg.js' => 'e7393ebb', 'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => 'a3a7e5df', 'differential.pkg.css' => 'b3eea3f5',
'differential.pkg.js' => '4b7d8f19', 'differential.pkg.js' => '4b7d8f19',
'diffusion.pkg.css' => '91c5d3a6', 'diffusion.pkg.css' => '91c5d3a6',
'diffusion.pkg.js' => '3a9a8bfa', 'diffusion.pkg.js' => '3a9a8bfa',
@ -32,7 +32,7 @@ return array(
'rsrc/css/aphront/typeahead.css' => 'd4f16145', 'rsrc/css/aphront/typeahead.css' => 'd4f16145',
'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af', 'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af',
'rsrc/css/application/auth/auth.css' => '0877ed6e', '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/notification-menu.css' => 'f31c0bde',
'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601',
'rsrc/css/application/base/phui-theme.css' => '027ba77e', 'rsrc/css/application/base/phui-theme.css' => '027ba77e',
@ -57,7 +57,7 @@ return array(
'rsrc/css/application/dashboard/dashboard.css' => 'bc6f2127', 'rsrc/css/application/dashboard/dashboard.css' => 'bc6f2127',
'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a', 'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a',
'rsrc/css/application/differential/add-comment.css' => 'c47f8c40', '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/core.css' => '5b7b8ff4',
'rsrc/css/application/differential/phui-inline-comment.css' => '5953c28e', 'rsrc/css/application/differential/phui-inline-comment.css' => '5953c28e',
'rsrc/css/application/differential/revision-comment.css' => '14b8565a', 'rsrc/css/application/differential/revision-comment.css' => '14b8565a',
@ -82,11 +82,11 @@ return array(
'rsrc/css/application/paste/paste.css' => '1898e534', 'rsrc/css/application/paste/paste.css' => '1898e534',
'rsrc/css/application/people/people-profile.css' => '2473d929', 'rsrc/css/application/people/people-profile.css' => '2473d929',
'rsrc/css/application/phame/phame.css' => '7448a969', '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-inline-comments.css' => '8e545e49',
'rsrc/css/application/pholio/pholio.css' => 'ca89d380', 'rsrc/css/application/pholio/pholio.css' => 'ca89d380',
'rsrc/css/application/phortune/phortune-credit-card-form.css' => '8391eb02', '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/phrequent/phrequent.css' => 'ffc185ad',
'rsrc/css/application/phriction/phriction-document-css.css' => '4282e4ad', 'rsrc/css/application/phriction/phriction-document-css.css' => '4282e4ad',
'rsrc/css/application/policy/policy-edit.css' => '815c66f7', 'rsrc/css/application/policy/policy-edit.css' => '815c66f7',
@ -104,7 +104,7 @@ return array(
'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 'rsrc/css/application/tokens/tokens.css' => '3d0f239e',
'rsrc/css/application/uiexample/example.css' => '528b19de', 'rsrc/css/application/uiexample/example.css' => '528b19de',
'rsrc/css/core/core.css' => 'd0801452', '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/syntax.css' => '9fc496d5',
'rsrc/css/core/z-index.css' => '5b6fcf3f', 'rsrc/css/core/z-index.css' => '5b6fcf3f',
'rsrc/css/diviner/diviner-shared.css' => 'aa3656aa', 'rsrc/css/diviner/diviner-shared.css' => 'aa3656aa',
@ -149,7 +149,7 @@ return array(
'rsrc/css/phui/phui-pager.css' => 'bea33d23', 'rsrc/css/phui/phui-pager.css' => 'bea33d23',
'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e',
'rsrc/css/phui/phui-profile-menu.css' => 'c8557f33', '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-remarkup-preview.css' => '1a8f2591',
'rsrc/css/phui/phui-segment-bar-view.css' => '46342871', 'rsrc/css/phui/phui-segment-bar-view.css' => '46342871',
'rsrc/css/phui/phui-spacing.css' => '042804d6', '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/TypeaheadCompositeSource.js' => '503e17fd',
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadOnDemandSource.js' => '013ffff9', '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/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/externals/javelin/lib/control/typeahead/source/TypeaheadStaticSource.js' => '6c0e62fa',
'rsrc/favicons/apple-touch-icon-120x120.png' => '43742962', 'rsrc/favicons/apple-touch-icon-120x120.png' => '43742962',
'rsrc/favicons/apple-touch-icon-152x152.png' => '669eaec3', '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/OwnersPathEditor.js' => 'aa1733d0',
'rsrc/js/application/owners/owners-path-editor.js' => '7a68dda3', 'rsrc/js/application/owners/owners-path-editor.js' => '7a68dda3',
'rsrc/js/application/passphrase/passphrase-credential-control.js' => '3cb0b2fc', '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/pholio/behavior-pholio-mock-view.js' => 'fbe497e7',
'rsrc/js/application/phortune/behavior-stripe-payment-form.js' => '3f5d6dbf', 'rsrc/js/application/phortune/behavior-stripe-payment-form.js' => '3f5d6dbf',
'rsrc/js/application/phortune/behavior-test-payment-form.js' => 'fc91ab6c', '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/KeyboardShortcutManager.js' => 'c1700f6f',
'rsrc/js/core/MultirowRowManager.js' => 'b5d57730', 'rsrc/js/core/MultirowRowManager.js' => 'b5d57730',
'rsrc/js/core/Notification.js' => 'ccf1cbf8', '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/ShapedRequest.js' => '7cbe244b',
'rsrc/js/core/TextAreaUtils.js' => '320810c8', 'rsrc/js/core/TextAreaUtils.js' => '320810c8',
'rsrc/js/core/Title.js' => 'df5e11d2', 'rsrc/js/core/Title.js' => 'df5e11d2',
@ -507,6 +507,7 @@ return array(
'rsrc/js/core/behavior-search-typeahead.js' => '06c32383', 'rsrc/js/core/behavior-search-typeahead.js' => '06c32383',
'rsrc/js/core/behavior-select-content.js' => 'bf5374ef', 'rsrc/js/core/behavior-select-content.js' => 'bf5374ef',
'rsrc/js/core/behavior-select-on-click.js' => '4e3e79a6', '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-time-typeahead.js' => '522431f7',
'rsrc/js/core/behavior-toggle-class.js' => '92b9ec77', 'rsrc/js/core/behavior-toggle-class.js' => '92b9ec77',
'rsrc/js/core/behavior-tokenizer.js' => 'b3a4b884', 'rsrc/js/core/behavior-tokenizer.js' => 'b3a4b884',
@ -552,7 +553,7 @@ return array(
'conpherence-update-css' => 'faf6be09', 'conpherence-update-css' => 'faf6be09',
'conpherence-widget-pane-css' => '775eaaba', 'conpherence-widget-pane-css' => '775eaaba',
'd3' => 'a11a5ff2', 'd3' => 'a11a5ff2',
'differential-changeset-view-css' => 'febd2372', 'differential-changeset-view-css' => 'ccfbc869',
'differential-core-view-css' => '5b7b8ff4', 'differential-core-view-css' => '5b7b8ff4',
'differential-inline-comment-editor' => '64a5550f', 'differential-inline-comment-editor' => '64a5550f',
'differential-revision-add-comment-css' => 'c47f8c40', 'differential-revision-add-comment-css' => 'c47f8c40',
@ -665,7 +666,7 @@ return array(
'javelin-behavior-phabricator-transaction-comment-form' => 'b23b49e6', 'javelin-behavior-phabricator-transaction-comment-form' => 'b23b49e6',
'javelin-behavior-phabricator-transaction-list' => '13c739ea', 'javelin-behavior-phabricator-transaction-list' => '13c739ea',
'javelin-behavior-phabricator-watch-anchor' => '9f36c42d', '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-pholio-mock-view' => 'fbe497e7',
'javelin-behavior-phui-dropdown-menu' => '54733475', 'javelin-behavior-phui-dropdown-menu' => '54733475',
'javelin-behavior-phui-file-upload' => 'b003d4fb', 'javelin-behavior-phui-file-upload' => 'b003d4fb',
@ -692,6 +693,7 @@ return array(
'javelin-behavior-search-reorder-queries' => 'e9581f08', 'javelin-behavior-search-reorder-queries' => 'e9581f08',
'javelin-behavior-select-content' => 'bf5374ef', 'javelin-behavior-select-content' => 'bf5374ef',
'javelin-behavior-select-on-click' => '4e3e79a6', 'javelin-behavior-select-on-click' => '4e3e79a6',
'javelin-behavior-setup-check-https' => '491416b3',
'javelin-behavior-slowvote-embed' => '887ad43f', 'javelin-behavior-slowvote-embed' => '887ad43f',
'javelin-behavior-stripe-payment-form' => '3f5d6dbf', 'javelin-behavior-stripe-payment-form' => '3f5d6dbf',
'javelin-behavior-test-payment-form' => 'fc91ab6c', 'javelin-behavior-test-payment-form' => 'fc91ab6c',
@ -732,7 +734,7 @@ return array(
'javelin-typeahead-normalizer' => 'e6e25838', 'javelin-typeahead-normalizer' => 'e6e25838',
'javelin-typeahead-ondemand-source' => '013ffff9', 'javelin-typeahead-ondemand-source' => '013ffff9',
'javelin-typeahead-preloaded-source' => '54f314a0', 'javelin-typeahead-preloaded-source' => '54f314a0',
'javelin-typeahead-source' => '1bc11c4a', 'javelin-typeahead-source' => 'b25d5444',
'javelin-typeahead-static-source' => '6c0e62fa', 'javelin-typeahead-static-source' => '6c0e62fa',
'javelin-uri' => 'c989ade3', 'javelin-uri' => 'c989ade3',
'javelin-util' => '93cc50d6', 'javelin-util' => '93cc50d6',
@ -776,15 +778,15 @@ return array(
'phabricator-flag-css' => '5337623f', 'phabricator-flag-css' => '5337623f',
'phabricator-keyboard-shortcut' => '1ae869f2', 'phabricator-keyboard-shortcut' => '1ae869f2',
'phabricator-keyboard-shortcut-manager' => 'c1700f6f', 'phabricator-keyboard-shortcut-manager' => 'c1700f6f',
'phabricator-main-menu-view' => 'd00a795a', 'phabricator-main-menu-view' => 'b623169f',
'phabricator-nav-view-css' => 'ac79a758', 'phabricator-nav-view-css' => 'ac79a758',
'phabricator-notification' => 'ccf1cbf8', 'phabricator-notification' => 'ccf1cbf8',
'phabricator-notification-css' => '3f6c89c9', 'phabricator-notification-css' => '3f6c89c9',
'phabricator-notification-menu-css' => 'f31c0bde', 'phabricator-notification-menu-css' => 'f31c0bde',
'phabricator-object-selector-css' => '85ee8ce6', 'phabricator-object-selector-css' => '85ee8ce6',
'phabricator-phtize' => 'd254d646', 'phabricator-phtize' => 'd254d646',
'phabricator-prefab' => 'e67df814', 'phabricator-prefab' => 'cfd23f37',
'phabricator-remarkup-css' => '787105d6', 'phabricator-remarkup-css' => '523d34bb',
'phabricator-search-results-css' => '7dea472c', 'phabricator-search-results-css' => '7dea472c',
'phabricator-shaped-request' => '7cbe244b', 'phabricator-shaped-request' => '7cbe244b',
'phabricator-side-menu-view-css' => 'dd849797', 'phabricator-side-menu-view-css' => 'dd849797',
@ -808,11 +810,11 @@ return array(
'phabricator-zindex-css' => '5b6fcf3f', 'phabricator-zindex-css' => '5b6fcf3f',
'phame-css' => '7448a969', 'phame-css' => '7448a969',
'pholio-css' => 'ca89d380', 'pholio-css' => 'ca89d380',
'pholio-edit-css' => 'b15fec4a', 'pholio-edit-css' => '07676f51',
'pholio-inline-comments-css' => '8e545e49', 'pholio-inline-comments-css' => '8e545e49',
'phortune-credit-card-form' => '2290aeef', 'phortune-credit-card-form' => '2290aeef',
'phortune-credit-card-form-css' => '8391eb02', 'phortune-credit-card-form-css' => '8391eb02',
'phortune-css' => '9149f103', 'phortune-css' => '5b99dae0',
'phrequent-css' => 'ffc185ad', 'phrequent-css' => 'ffc185ad',
'phriction-document-css' => '4282e4ad', 'phriction-document-css' => '4282e4ad',
'phui-action-panel-css' => '91c7b835', 'phui-action-panel-css' => '91c7b835',
@ -851,7 +853,7 @@ return array(
'phui-pager-css' => 'bea33d23', 'phui-pager-css' => 'bea33d23',
'phui-pinboard-view-css' => '2495140e', 'phui-pinboard-view-css' => '2495140e',
'phui-profile-menu-css' => 'c8557f33', 'phui-profile-menu-css' => 'c8557f33',
'phui-property-list-view-css' => '1d42ee7c', 'phui-property-list-view-css' => 'd4bbd0cb',
'phui-remarkup-preview-css' => '1a8f2591', 'phui-remarkup-preview-css' => '1a8f2591',
'phui-segment-bar-view-css' => '46342871', 'phui-segment-bar-view-css' => '46342871',
'phui-spacing-css' => '042804d6', 'phui-spacing-css' => '042804d6',
@ -1043,12 +1045,6 @@ return array(
'javelin-util', 'javelin-util',
'phabricator-keyboard-shortcut-manager', 'phabricator-keyboard-shortcut-manager',
), ),
'1bc11c4a' => array(
'javelin-install',
'javelin-util',
'javelin-dom',
'javelin-typeahead-normalizer',
),
'1bd28176' => array( '1bd28176' => array(
'javelin-install', 'javelin-install',
'javelin-dom', 'javelin-dom',
@ -1090,16 +1086,6 @@ return array(
'javelin-workflow', 'javelin-workflow',
'javelin-util', '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( '2926fff2' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-dom', 'javelin-dom',
@ -1214,6 +1200,11 @@ return array(
'phabricator-drag-and-drop-file-upload', 'phabricator-drag-and-drop-file-upload',
'phabricator-textareautils', 'phabricator-textareautils',
), ),
'491416b3' => array(
'javelin-behavior',
'javelin-uri',
'phabricator-notification',
),
'49b73b36' => array( '49b73b36' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-dom', 'javelin-dom',
@ -1779,6 +1770,12 @@ return array(
'javelin-request', 'javelin-request',
'phabricator-shaped-request', 'phabricator-shaped-request',
), ),
'b25d5444' => array(
'javelin-install',
'javelin-util',
'javelin-dom',
'javelin-typeahead-normalizer',
),
'b2b4fbaf' => array( 'b2b4fbaf' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-dom', 'javelin-dom',
@ -1815,6 +1812,9 @@ return array(
'javelin-dom', 'javelin-dom',
'javelin-util', 'javelin-util',
), ),
'b623169f' => array(
'phui-theme-css',
),
'b6993408' => array( 'b6993408' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',
@ -1858,6 +1858,16 @@ return array(
'javelin-util', 'javelin-util',
'javelin-request', '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( 'bf5374ef' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',
@ -1913,14 +1923,26 @@ return array(
'javelin-util', 'javelin-util',
'phabricator-notification-css', 'phabricator-notification-css',
), ),
'ccfbc869' => array(
'phui-inline-comment-view-css',
),
'cf86d16a' => array( 'cf86d16a' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-dom', 'javelin-dom',
'javelin-workflow', 'javelin-workflow',
'phabricator-drag-and-drop-file-upload', 'phabricator-drag-and-drop-file-upload',
), ),
'd00a795a' => array( 'cfd23f37' => array(
'phui-theme-css', '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( 'd0c516d5' => array(
'javelin-behavior', 'javelin-behavior',
@ -2067,18 +2089,6 @@ return array(
'javelin-workflow', 'javelin-workflow',
'javelin-magical-init', '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( 'e6e25838' => array(
'javelin-install', 'javelin-install',
), ),
@ -2200,9 +2210,6 @@ return array(
'fea0eb47' => array( 'fea0eb47' => array(
'javelin-install', 'javelin-install',
), ),
'febd2372' => array(
'phui-inline-comment-view-css',
),
), ),
'packages' => array( 'packages' => array(
'core.pkg.css' => array( 'core.pkg.css' => array(
@ -2340,6 +2347,7 @@ return array(
'javelin-behavior-durable-column', 'javelin-behavior-durable-column',
'conpherence-thread-manager', 'conpherence-thread-manager',
'javelin-behavior-detect-timezone', 'javelin-behavior-detect-timezone',
'javelin-behavior-setup-check-https',
), ),
'darkconsole.pkg.js' => array( 'darkconsole.pkg.js' => array(
'javelin-behavior-dark-console', 'javelin-behavior-dark-console',

View file

@ -82,6 +82,7 @@ return array(
'javelin-behavior-durable-column', 'javelin-behavior-durable-column',
'conpherence-thread-manager', 'conpherence-thread-manager',
'javelin-behavior-detect-timezone', 'javelin-behavior-detect-timezone',
'javelin-behavior-setup-check-https',
), ),
'core.pkg.css' => array( 'core.pkg.css' => array(
'phabricator-core-css', 'phabricator-core-css',

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_user.user
DROP COLUMN consoleEnabled;

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_user.user
DROP COLUMN consoleTab;

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_user.user
DROP COLUMN consoleVisible;

View file

@ -0,0 +1,47 @@
<?php
$table = new PhabricatorUserPreferences();
$conn_w = $table->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);

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_user.user
DROP COLUMN profileImageCache;

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_user.user_preferences
CHANGE userPHID userPHID VARBINARY(64);

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_user.user_preferences
ADD builtinKey VARCHAR(32) COLLATE {$COLLATE_TEXT};

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_user.user_preferences
ADD UNIQUE KEY `key_builtin` (builtinKey);

View file

@ -5,6 +5,8 @@
// script, except it loads the Phabricator environment and adds some Phabricator // script, except it loads the Phabricator environment and adds some Phabricator
// specific flags. // specific flags.
declare(ticks = 1);
$root = dirname(dirname(dirname(__FILE__))); $root = dirname(dirname(dirname(__FILE__)));
require_once $root.'/scripts/__init_script__.php'; require_once $root.'/scripts/__init_script__.php';

View file

@ -103,6 +103,9 @@ try {
'Invalid username ("%s"). There is no user with this username.', 'Invalid username ("%s"). There is no user with this username.',
$user_name)); $user_name));
} }
id(new PhabricatorAuthSessionEngine())
->willServeRequestForUser($user);
} else if (strlen($device_name)) { } else if (strlen($device_name)) {
if (!$remote_address) { if (!$remote_address) {
throw new Exception( throw new Exception(

View file

@ -312,7 +312,6 @@ phutil_register_library_map(array(
'ConpherenceRoomListController' => 'applications/conpherence/controller/ConpherenceRoomListController.php', 'ConpherenceRoomListController' => 'applications/conpherence/controller/ConpherenceRoomListController.php',
'ConpherenceRoomTestCase' => 'applications/conpherence/__tests__/ConpherenceRoomTestCase.php', 'ConpherenceRoomTestCase' => 'applications/conpherence/__tests__/ConpherenceRoomTestCase.php',
'ConpherenceSchemaSpec' => 'applications/conpherence/storage/ConpherenceSchemaSpec.php', 'ConpherenceSchemaSpec' => 'applications/conpherence/storage/ConpherenceSchemaSpec.php',
'ConpherenceSettings' => 'applications/conpherence/constants/ConpherenceSettings.php',
'ConpherenceTestCase' => 'applications/conpherence/__tests__/ConpherenceTestCase.php', 'ConpherenceTestCase' => 'applications/conpherence/__tests__/ConpherenceTestCase.php',
'ConpherenceThread' => 'applications/conpherence/storage/ConpherenceThread.php', 'ConpherenceThread' => 'applications/conpherence/storage/ConpherenceThread.php',
'ConpherenceThreadIndexEngineExtension' => 'applications/conpherence/engineextension/ConpherenceThreadIndexEngineExtension.php', 'ConpherenceThreadIndexEngineExtension' => 'applications/conpherence/engineextension/ConpherenceThreadIndexEngineExtension.php',
@ -542,6 +541,7 @@ phutil_register_library_map(array(
'DifferentialRevisionRequiredActionResultBucket' => 'applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php', 'DifferentialRevisionRequiredActionResultBucket' => 'applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php',
'DifferentialRevisionResultBucket' => 'applications/differential/query/DifferentialRevisionResultBucket.php', 'DifferentialRevisionResultBucket' => 'applications/differential/query/DifferentialRevisionResultBucket.php',
'DifferentialRevisionReviewersHeraldField' => 'applications/differential/herald/DifferentialRevisionReviewersHeraldField.php', 'DifferentialRevisionReviewersHeraldField' => 'applications/differential/herald/DifferentialRevisionReviewersHeraldField.php',
'DifferentialRevisionSearchConduitAPIMethod' => 'applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php',
'DifferentialRevisionSearchEngine' => 'applications/differential/query/DifferentialRevisionSearchEngine.php', 'DifferentialRevisionSearchEngine' => 'applications/differential/query/DifferentialRevisionSearchEngine.php',
'DifferentialRevisionStatus' => 'applications/differential/constants/DifferentialRevisionStatus.php', 'DifferentialRevisionStatus' => 'applications/differential/constants/DifferentialRevisionStatus.php',
'DifferentialRevisionSummaryHeraldField' => 'applications/differential/herald/DifferentialRevisionSummaryHeraldField.php', 'DifferentialRevisionSummaryHeraldField' => 'applications/differential/herald/DifferentialRevisionSummaryHeraldField.php',
@ -2145,6 +2145,8 @@ phutil_register_library_map(array(
'PhabricatorConfigVersionsModule' => 'applications/config/module/PhabricatorConfigVersionsModule.php', 'PhabricatorConfigVersionsModule' => 'applications/config/module/PhabricatorConfigVersionsModule.php',
'PhabricatorConfigWelcomeController' => 'applications/config/controller/PhabricatorConfigWelcomeController.php', 'PhabricatorConfigWelcomeController' => 'applications/config/controller/PhabricatorConfigWelcomeController.php',
'PhabricatorConpherenceApplication' => 'applications/conpherence/application/PhabricatorConpherenceApplication.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', 'PhabricatorConpherencePreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorConpherencePreferencesSettingsPanel.php',
'PhabricatorConpherenceThreadPHIDType' => 'applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php', 'PhabricatorConpherenceThreadPHIDType' => 'applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php',
'PhabricatorConsoleApplication' => 'applications/console/application/PhabricatorConsoleApplication.php', 'PhabricatorConsoleApplication' => 'applications/console/application/PhabricatorConsoleApplication.php',
@ -2240,6 +2242,8 @@ phutil_register_library_map(array(
'PhabricatorDaemonsSetupCheck' => 'applications/config/check/PhabricatorDaemonsSetupCheck.php', 'PhabricatorDaemonsSetupCheck' => 'applications/config/check/PhabricatorDaemonsSetupCheck.php',
'PhabricatorDailyRoutineTriggerClock' => 'infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php', 'PhabricatorDailyRoutineTriggerClock' => 'infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php',
'PhabricatorDarkConsoleSetting' => 'applications/settings/setting/PhabricatorDarkConsoleSetting.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', 'PhabricatorDashboard' => 'applications/dashboard/storage/PhabricatorDashboard.php',
'PhabricatorDashboardAddPanelController' => 'applications/dashboard/controller/PhabricatorDashboardAddPanelController.php', 'PhabricatorDashboardAddPanelController' => 'applications/dashboard/controller/PhabricatorDashboardAddPanelController.php',
'PhabricatorDashboardApplication' => 'applications/dashboard/application/PhabricatorDashboardApplication.php', 'PhabricatorDashboardApplication' => 'applications/dashboard/application/PhabricatorDashboardApplication.php',
@ -2302,6 +2306,7 @@ phutil_register_library_map(array(
'PhabricatorDebugController' => 'applications/system/controller/PhabricatorDebugController.php', 'PhabricatorDebugController' => 'applications/system/controller/PhabricatorDebugController.php',
'PhabricatorDefaultRequestExceptionHandler' => 'aphront/handler/PhabricatorDefaultRequestExceptionHandler.php', 'PhabricatorDefaultRequestExceptionHandler' => 'aphront/handler/PhabricatorDefaultRequestExceptionHandler.php',
'PhabricatorDefaultSyntaxStyle' => 'infrastructure/syntax/PhabricatorDefaultSyntaxStyle.php', 'PhabricatorDefaultSyntaxStyle' => 'infrastructure/syntax/PhabricatorDefaultSyntaxStyle.php',
'PhabricatorDesktopNotificationsSetting' => 'applications/settings/setting/PhabricatorDesktopNotificationsSetting.php',
'PhabricatorDesktopNotificationsSettingsPanel' => 'applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php', 'PhabricatorDesktopNotificationsSettingsPanel' => 'applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php',
'PhabricatorDestructibleInterface' => 'applications/system/interface/PhabricatorDestructibleInterface.php', 'PhabricatorDestructibleInterface' => 'applications/system/interface/PhabricatorDestructibleInterface.php',
'PhabricatorDestructionEngine' => 'applications/system/engine/PhabricatorDestructionEngine.php', 'PhabricatorDestructionEngine' => 'applications/system/engine/PhabricatorDestructionEngine.php',
@ -2319,6 +2324,8 @@ phutil_register_library_map(array(
'PhabricatorDifferentialManagementWorkflow' => 'applications/differential/management/PhabricatorDifferentialManagementWorkflow.php', 'PhabricatorDifferentialManagementWorkflow' => 'applications/differential/management/PhabricatorDifferentialManagementWorkflow.php',
'PhabricatorDifferentialRevisionTestDataGenerator' => 'applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php', 'PhabricatorDifferentialRevisionTestDataGenerator' => 'applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php',
'PhabricatorDiffusionApplication' => 'applications/diffusion/application/PhabricatorDiffusionApplication.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', 'PhabricatorDiffusionConfigOptions' => 'applications/diffusion/config/PhabricatorDiffusionConfigOptions.php',
'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php', 'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php',
'PhabricatorDisplayPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php', 'PhabricatorDisplayPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php',
@ -2364,6 +2371,7 @@ phutil_register_library_map(array(
'PhabricatorEditEngineConfigurationTransactionQuery' => 'applications/transactions/query/PhabricatorEditEngineConfigurationTransactionQuery.php', 'PhabricatorEditEngineConfigurationTransactionQuery' => 'applications/transactions/query/PhabricatorEditEngineConfigurationTransactionQuery.php',
'PhabricatorEditEngineConfigurationViewController' => 'applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php', 'PhabricatorEditEngineConfigurationViewController' => 'applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php',
'PhabricatorEditEngineController' => 'applications/transactions/controller/PhabricatorEditEngineController.php', 'PhabricatorEditEngineController' => 'applications/transactions/controller/PhabricatorEditEngineController.php',
'PhabricatorEditEngineCreateQuickActions' => 'applications/settings/quickmenu/PhabricatorEditEngineCreateQuickActions.php',
'PhabricatorEditEngineExtension' => 'applications/transactions/engineextension/PhabricatorEditEngineExtension.php', 'PhabricatorEditEngineExtension' => 'applications/transactions/engineextension/PhabricatorEditEngineExtension.php',
'PhabricatorEditEngineExtensionModule' => 'applications/transactions/engineextension/PhabricatorEditEngineExtensionModule.php', 'PhabricatorEditEngineExtensionModule' => 'applications/transactions/engineextension/PhabricatorEditEngineExtensionModule.php',
'PhabricatorEditEngineListController' => 'applications/transactions/controller/PhabricatorEditEngineListController.php', 'PhabricatorEditEngineListController' => 'applications/transactions/controller/PhabricatorEditEngineListController.php',
@ -2371,6 +2379,7 @@ phutil_register_library_map(array(
'PhabricatorEditEngineQuery' => 'applications/transactions/query/PhabricatorEditEngineQuery.php', 'PhabricatorEditEngineQuery' => 'applications/transactions/query/PhabricatorEditEngineQuery.php',
'PhabricatorEditEngineSearchEngine' => 'applications/transactions/query/PhabricatorEditEngineSearchEngine.php', 'PhabricatorEditEngineSearchEngine' => 'applications/transactions/query/PhabricatorEditEngineSearchEngine.php',
'PhabricatorEditEngineSelectCommentAction' => 'applications/transactions/commentaction/PhabricatorEditEngineSelectCommentAction.php', 'PhabricatorEditEngineSelectCommentAction' => 'applications/transactions/commentaction/PhabricatorEditEngineSelectCommentAction.php',
'PhabricatorEditEngineSettingsPanel' => 'applications/settings/panel/PhabricatorEditEngineSettingsPanel.php',
'PhabricatorEditEngineTokenizerCommentAction' => 'applications/transactions/commentaction/PhabricatorEditEngineTokenizerCommentAction.php', 'PhabricatorEditEngineTokenizerCommentAction' => 'applications/transactions/commentaction/PhabricatorEditEngineTokenizerCommentAction.php',
'PhabricatorEditField' => 'applications/transactions/editfield/PhabricatorEditField.php', 'PhabricatorEditField' => 'applications/transactions/editfield/PhabricatorEditField.php',
'PhabricatorEditPage' => 'applications/transactions/editengine/PhabricatorEditPage.php', 'PhabricatorEditPage' => 'applications/transactions/editengine/PhabricatorEditPage.php',
@ -2382,6 +2391,7 @@ phutil_register_library_map(array(
'PhabricatorElasticSearchSetupCheck' => 'applications/config/check/PhabricatorElasticSearchSetupCheck.php', 'PhabricatorElasticSearchSetupCheck' => 'applications/config/check/PhabricatorElasticSearchSetupCheck.php',
'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php', 'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php',
'PhabricatorEmailContentSource' => 'applications/metamta/contentsource/PhabricatorEmailContentSource.php', 'PhabricatorEmailContentSource' => 'applications/metamta/contentsource/PhabricatorEmailContentSource.php',
'PhabricatorEmailDeliverySettingsPanel' => 'applications/settings/panel/PhabricatorEmailDeliverySettingsPanel.php',
'PhabricatorEmailFormatSetting' => 'applications/settings/setting/PhabricatorEmailFormatSetting.php', 'PhabricatorEmailFormatSetting' => 'applications/settings/setting/PhabricatorEmailFormatSetting.php',
'PhabricatorEmailFormatSettingsPanel' => 'applications/settings/panel/PhabricatorEmailFormatSettingsPanel.php', 'PhabricatorEmailFormatSettingsPanel' => 'applications/settings/panel/PhabricatorEmailFormatSettingsPanel.php',
'PhabricatorEmailLoginController' => 'applications/auth/controller/PhabricatorEmailLoginController.php', 'PhabricatorEmailLoginController' => 'applications/auth/controller/PhabricatorEmailLoginController.php',
@ -2389,6 +2399,7 @@ phutil_register_library_map(array(
'PhabricatorEmailPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php', 'PhabricatorEmailPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php',
'PhabricatorEmailRePrefixSetting' => 'applications/settings/setting/PhabricatorEmailRePrefixSetting.php', 'PhabricatorEmailRePrefixSetting' => 'applications/settings/setting/PhabricatorEmailRePrefixSetting.php',
'PhabricatorEmailSelfActionsSetting' => 'applications/settings/setting/PhabricatorEmailSelfActionsSetting.php', 'PhabricatorEmailSelfActionsSetting' => 'applications/settings/setting/PhabricatorEmailSelfActionsSetting.php',
'PhabricatorEmailTagsSetting' => 'applications/settings/setting/PhabricatorEmailTagsSetting.php',
'PhabricatorEmailVarySubjectsSetting' => 'applications/settings/setting/PhabricatorEmailVarySubjectsSetting.php', 'PhabricatorEmailVarySubjectsSetting' => 'applications/settings/setting/PhabricatorEmailVarySubjectsSetting.php',
'PhabricatorEmailVerificationController' => 'applications/auth/controller/PhabricatorEmailVerificationController.php', 'PhabricatorEmailVerificationController' => 'applications/auth/controller/PhabricatorEmailVerificationController.php',
'PhabricatorEmbedFileRemarkupRule' => 'applications/files/markup/PhabricatorEmbedFileRemarkupRule.php', 'PhabricatorEmbedFileRemarkupRule' => 'applications/files/markup/PhabricatorEmbedFileRemarkupRule.php',
@ -2510,6 +2521,7 @@ phutil_register_library_map(array(
'PhabricatorFilesManagementWorkflow' => 'applications/files/management/PhabricatorFilesManagementWorkflow.php', 'PhabricatorFilesManagementWorkflow' => 'applications/files/management/PhabricatorFilesManagementWorkflow.php',
'PhabricatorFilesOnDiskBuiltinFile' => 'applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php', 'PhabricatorFilesOnDiskBuiltinFile' => 'applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php',
'PhabricatorFilesOutboundRequestAction' => 'applications/files/action/PhabricatorFilesOutboundRequestAction.php', 'PhabricatorFilesOutboundRequestAction' => 'applications/files/action/PhabricatorFilesOutboundRequestAction.php',
'PhabricatorFiletreeVisibleSetting' => 'applications/settings/setting/PhabricatorFiletreeVisibleSetting.php',
'PhabricatorFlag' => 'applications/flag/storage/PhabricatorFlag.php', 'PhabricatorFlag' => 'applications/flag/storage/PhabricatorFlag.php',
'PhabricatorFlagAddFlagHeraldAction' => 'applications/flag/herald/PhabricatorFlagAddFlagHeraldAction.php', 'PhabricatorFlagAddFlagHeraldAction' => 'applications/flag/herald/PhabricatorFlagAddFlagHeraldAction.php',
'PhabricatorFlagColor' => 'applications/flag/constants/PhabricatorFlagColor.php', 'PhabricatorFlagColor' => 'applications/flag/constants/PhabricatorFlagColor.php',
@ -2593,6 +2605,7 @@ phutil_register_library_map(array(
'PhabricatorInlineCommentPreviewController' => 'infrastructure/diff/PhabricatorInlineCommentPreviewController.php', 'PhabricatorInlineCommentPreviewController' => 'infrastructure/diff/PhabricatorInlineCommentPreviewController.php',
'PhabricatorInlineSummaryView' => 'infrastructure/diff/view/PhabricatorInlineSummaryView.php', 'PhabricatorInlineSummaryView' => 'infrastructure/diff/view/PhabricatorInlineSummaryView.php',
'PhabricatorInstructionsEditField' => 'applications/transactions/editfield/PhabricatorInstructionsEditField.php', 'PhabricatorInstructionsEditField' => 'applications/transactions/editfield/PhabricatorInstructionsEditField.php',
'PhabricatorInternalSetting' => 'applications/settings/setting/PhabricatorInternalSetting.php',
'PhabricatorInternationalizationManagementExtractWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementExtractWorkflow.php', 'PhabricatorInternationalizationManagementExtractWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementExtractWorkflow.php',
'PhabricatorInternationalizationManagementWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementWorkflow.php', 'PhabricatorInternationalizationManagementWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementWorkflow.php',
'PhabricatorInvalidConfigSetupCheck' => 'applications/config/check/PhabricatorInvalidConfigSetupCheck.php', 'PhabricatorInvalidConfigSetupCheck' => 'applications/config/check/PhabricatorInvalidConfigSetupCheck.php',
@ -3004,6 +3017,7 @@ phutil_register_library_map(array(
'PhabricatorPhurlURLTransactionComment' => 'applications/phurl/storage/PhabricatorPhurlURLTransactionComment.php', 'PhabricatorPhurlURLTransactionComment' => 'applications/phurl/storage/PhabricatorPhurlURLTransactionComment.php',
'PhabricatorPhurlURLTransactionQuery' => 'applications/phurl/query/PhabricatorPhurlURLTransactionQuery.php', 'PhabricatorPhurlURLTransactionQuery' => 'applications/phurl/query/PhabricatorPhurlURLTransactionQuery.php',
'PhabricatorPhurlURLViewController' => 'applications/phurl/controller/PhabricatorPhurlURLViewController.php', 'PhabricatorPhurlURLViewController' => 'applications/phurl/controller/PhabricatorPhurlURLViewController.php',
'PhabricatorPinnedApplicationsSetting' => 'applications/settings/setting/PhabricatorPinnedApplicationsSetting.php',
'PhabricatorPirateEnglishTranslation' => 'infrastructure/internationalization/translation/PhabricatorPirateEnglishTranslation.php', 'PhabricatorPirateEnglishTranslation' => 'infrastructure/internationalization/translation/PhabricatorPirateEnglishTranslation.php',
'PhabricatorPlatformSite' => 'aphront/site/PhabricatorPlatformSite.php', 'PhabricatorPlatformSite' => 'aphront/site/PhabricatorPlatformSite.php',
'PhabricatorPointsEditField' => 'applications/transactions/editfield/PhabricatorPointsEditField.php', 'PhabricatorPointsEditField' => 'applications/transactions/editfield/PhabricatorPointsEditField.php',
@ -3027,6 +3041,7 @@ phutil_register_library_map(array(
'PhabricatorPolicyEditField' => 'applications/transactions/editfield/PhabricatorPolicyEditField.php', 'PhabricatorPolicyEditField' => 'applications/transactions/editfield/PhabricatorPolicyEditField.php',
'PhabricatorPolicyException' => 'applications/policy/exception/PhabricatorPolicyException.php', 'PhabricatorPolicyException' => 'applications/policy/exception/PhabricatorPolicyException.php',
'PhabricatorPolicyExplainController' => 'applications/policy/controller/PhabricatorPolicyExplainController.php', 'PhabricatorPolicyExplainController' => 'applications/policy/controller/PhabricatorPolicyExplainController.php',
'PhabricatorPolicyFavoritesSetting' => 'applications/settings/setting/PhabricatorPolicyFavoritesSetting.php',
'PhabricatorPolicyFilter' => 'applications/policy/filter/PhabricatorPolicyFilter.php', 'PhabricatorPolicyFilter' => 'applications/policy/filter/PhabricatorPolicyFilter.php',
'PhabricatorPolicyInterface' => 'applications/policy/interface/PhabricatorPolicyInterface.php', 'PhabricatorPolicyInterface' => 'applications/policy/interface/PhabricatorPolicyInterface.php',
'PhabricatorPolicyManagementShowWorkflow' => 'applications/policy/management/PhabricatorPolicyManagementShowWorkflow.php', 'PhabricatorPolicyManagementShowWorkflow' => 'applications/policy/management/PhabricatorPolicyManagementShowWorkflow.php',
@ -3041,6 +3056,7 @@ phutil_register_library_map(array(
'PhabricatorPolicyTestObject' => 'applications/policy/__tests__/PhabricatorPolicyTestObject.php', 'PhabricatorPolicyTestObject' => 'applications/policy/__tests__/PhabricatorPolicyTestObject.php',
'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php', 'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php',
'PhabricatorPonderApplication' => 'applications/ponder/application/PhabricatorPonderApplication.php', 'PhabricatorPonderApplication' => 'applications/ponder/application/PhabricatorPonderApplication.php',
'PhabricatorProfileMenuCollapsedSetting' => 'applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php',
'PhabricatorProfilePanel' => 'applications/search/profilepanel/PhabricatorProfilePanel.php', 'PhabricatorProfilePanel' => 'applications/search/profilepanel/PhabricatorProfilePanel.php',
'PhabricatorProfilePanelConfiguration' => 'applications/search/storage/PhabricatorProfilePanelConfiguration.php', 'PhabricatorProfilePanelConfiguration' => 'applications/search/storage/PhabricatorProfilePanelConfiguration.php',
'PhabricatorProfilePanelConfigurationQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationQuery.php', 'PhabricatorProfilePanelConfigurationQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationQuery.php',
@ -3177,6 +3193,7 @@ phutil_register_library_map(array(
'PhabricatorQueryOrderItem' => 'infrastructure/query/order/PhabricatorQueryOrderItem.php', 'PhabricatorQueryOrderItem' => 'infrastructure/query/order/PhabricatorQueryOrderItem.php',
'PhabricatorQueryOrderTestCase' => 'infrastructure/query/order/__tests__/PhabricatorQueryOrderTestCase.php', 'PhabricatorQueryOrderTestCase' => 'infrastructure/query/order/__tests__/PhabricatorQueryOrderTestCase.php',
'PhabricatorQueryOrderVector' => 'infrastructure/query/order/PhabricatorQueryOrderVector.php', 'PhabricatorQueryOrderVector' => 'infrastructure/query/order/PhabricatorQueryOrderVector.php',
'PhabricatorQuickActions' => 'applications/settings/quickmenu/PhabricatorQuickActions.php',
'PhabricatorRateLimitRequestExceptionHandler' => 'aphront/handler/PhabricatorRateLimitRequestExceptionHandler.php', 'PhabricatorRateLimitRequestExceptionHandler' => 'aphront/handler/PhabricatorRateLimitRequestExceptionHandler.php',
'PhabricatorRecaptchaConfigOptions' => 'applications/config/option/PhabricatorRecaptchaConfigOptions.php', 'PhabricatorRecaptchaConfigOptions' => 'applications/config/option/PhabricatorRecaptchaConfigOptions.php',
'PhabricatorRecipientHasBadgeEdgeType' => 'applications/badges/edge/PhabricatorRecipientHasBadgeEdgeType.php', 'PhabricatorRecipientHasBadgeEdgeType' => 'applications/badges/edge/PhabricatorRecipientHasBadgeEdgeType.php',
@ -3352,6 +3369,7 @@ phutil_register_library_map(array(
'PhabricatorSearchResultBucketGroup' => 'applications/search/buckets/PhabricatorSearchResultBucketGroup.php', 'PhabricatorSearchResultBucketGroup' => 'applications/search/buckets/PhabricatorSearchResultBucketGroup.php',
'PhabricatorSearchResultView' => 'applications/search/view/PhabricatorSearchResultView.php', 'PhabricatorSearchResultView' => 'applications/search/view/PhabricatorSearchResultView.php',
'PhabricatorSearchSchemaSpec' => 'applications/search/storage/PhabricatorSearchSchemaSpec.php', 'PhabricatorSearchSchemaSpec' => 'applications/search/storage/PhabricatorSearchSchemaSpec.php',
'PhabricatorSearchScopeSetting' => 'applications/settings/setting/PhabricatorSearchScopeSetting.php',
'PhabricatorSearchSelectController' => 'applications/search/controller/PhabricatorSearchSelectController.php', 'PhabricatorSearchSelectController' => 'applications/search/controller/PhabricatorSearchSelectController.php',
'PhabricatorSearchSelectField' => 'applications/search/field/PhabricatorSearchSelectField.php', 'PhabricatorSearchSelectField' => 'applications/search/field/PhabricatorSearchSelectField.php',
'PhabricatorSearchStringListField' => 'applications/search/field/PhabricatorSearchStringListField.php', 'PhabricatorSearchStringListField' => 'applications/search/field/PhabricatorSearchStringListField.php',
@ -3367,14 +3385,21 @@ phutil_register_library_map(array(
'PhabricatorSendGridConfigOptions' => 'applications/config/option/PhabricatorSendGridConfigOptions.php', 'PhabricatorSendGridConfigOptions' => 'applications/config/option/PhabricatorSendGridConfigOptions.php',
'PhabricatorSessionsSettingsPanel' => 'applications/settings/panel/PhabricatorSessionsSettingsPanel.php', 'PhabricatorSessionsSettingsPanel' => 'applications/settings/panel/PhabricatorSessionsSettingsPanel.php',
'PhabricatorSetting' => 'applications/settings/setting/PhabricatorSetting.php', 'PhabricatorSetting' => 'applications/settings/setting/PhabricatorSetting.php',
'PhabricatorSettingsAccountPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsAccountPanelGroup.php',
'PhabricatorSettingsAddEmailAction' => 'applications/settings/action/PhabricatorSettingsAddEmailAction.php', 'PhabricatorSettingsAddEmailAction' => 'applications/settings/action/PhabricatorSettingsAddEmailAction.php',
'PhabricatorSettingsAdjustController' => 'applications/settings/controller/PhabricatorSettingsAdjustController.php', 'PhabricatorSettingsAdjustController' => 'applications/settings/controller/PhabricatorSettingsAdjustController.php',
'PhabricatorSettingsApplication' => 'applications/settings/application/PhabricatorSettingsApplication.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', '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', 'PhabricatorSettingsMainController' => 'applications/settings/controller/PhabricatorSettingsMainController.php',
'PhabricatorSettingsMainMenuBarExtension' => 'applications/settings/extension/PhabricatorSettingsMainMenuBarExtension.php', 'PhabricatorSettingsMainMenuBarExtension' => 'applications/settings/extension/PhabricatorSettingsMainMenuBarExtension.php',
'PhabricatorSettingsPanel' => 'applications/settings/panel/PhabricatorSettingsPanel.php', 'PhabricatorSettingsPanel' => 'applications/settings/panel/PhabricatorSettingsPanel.php',
'PhabricatorSettingsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsPanelGroup.php',
'PhabricatorSettingsTimezoneController' => 'applications/settings/controller/PhabricatorSettingsTimezoneController.php', 'PhabricatorSettingsTimezoneController' => 'applications/settings/controller/PhabricatorSettingsTimezoneController.php',
'PhabricatorSetupCheck' => 'applications/config/check/PhabricatorSetupCheck.php', 'PhabricatorSetupCheck' => 'applications/config/check/PhabricatorSetupCheck.php',
'PhabricatorSetupCheckTestCase' => 'applications/config/check/__tests__/PhabricatorSetupCheckTestCase.php', 'PhabricatorSetupCheckTestCase' => 'applications/config/check/__tests__/PhabricatorSetupCheckTestCase.php',
@ -3537,6 +3562,7 @@ phutil_register_library_map(array(
'PhabricatorTimeFormatSetting' => 'applications/settings/setting/PhabricatorTimeFormatSetting.php', 'PhabricatorTimeFormatSetting' => 'applications/settings/setting/PhabricatorTimeFormatSetting.php',
'PhabricatorTimeGuard' => 'infrastructure/time/PhabricatorTimeGuard.php', 'PhabricatorTimeGuard' => 'infrastructure/time/PhabricatorTimeGuard.php',
'PhabricatorTimeTestCase' => 'infrastructure/time/__tests__/PhabricatorTimeTestCase.php', 'PhabricatorTimeTestCase' => 'infrastructure/time/__tests__/PhabricatorTimeTestCase.php',
'PhabricatorTimezoneIgnoreOffsetSetting' => 'applications/settings/setting/PhabricatorTimezoneIgnoreOffsetSetting.php',
'PhabricatorTimezoneSetting' => 'applications/settings/setting/PhabricatorTimezoneSetting.php', 'PhabricatorTimezoneSetting' => 'applications/settings/setting/PhabricatorTimezoneSetting.php',
'PhabricatorTimezoneSetupCheck' => 'applications/config/check/PhabricatorTimezoneSetupCheck.php', 'PhabricatorTimezoneSetupCheck' => 'applications/config/check/PhabricatorTimezoneSetupCheck.php',
'PhabricatorTitleGlyphsSetting' => 'applications/settings/setting/PhabricatorTitleGlyphsSetting.php', 'PhabricatorTitleGlyphsSetting' => 'applications/settings/setting/PhabricatorTitleGlyphsSetting.php',
@ -3618,15 +3644,20 @@ phutil_register_library_map(array(
'PhabricatorUserIconField' => 'applications/people/customfield/PhabricatorUserIconField.php', 'PhabricatorUserIconField' => 'applications/people/customfield/PhabricatorUserIconField.php',
'PhabricatorUserLog' => 'applications/people/storage/PhabricatorUserLog.php', 'PhabricatorUserLog' => 'applications/people/storage/PhabricatorUserLog.php',
'PhabricatorUserLogView' => 'applications/people/view/PhabricatorUserLogView.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', 'PhabricatorUserPHIDResolver' => 'applications/phid/resolver/PhabricatorUserPHIDResolver.php',
'PhabricatorUserPreferences' => 'applications/settings/storage/PhabricatorUserPreferences.php', 'PhabricatorUserPreferences' => 'applications/settings/storage/PhabricatorUserPreferences.php',
'PhabricatorUserPreferencesCacheType' => 'applications/people/cache/PhabricatorUserPreferencesCacheType.php', 'PhabricatorUserPreferencesCacheType' => 'applications/people/cache/PhabricatorUserPreferencesCacheType.php',
'PhabricatorUserPreferencesEditor' => 'applications/settings/editor/PhabricatorUserPreferencesEditor.php', 'PhabricatorUserPreferencesEditor' => 'applications/settings/editor/PhabricatorUserPreferencesEditor.php',
'PhabricatorUserPreferencesPHIDType' => 'applications/settings/phid/PhabricatorUserPreferencesPHIDType.php', 'PhabricatorUserPreferencesPHIDType' => 'applications/settings/phid/PhabricatorUserPreferencesPHIDType.php',
'PhabricatorUserPreferencesQuery' => 'applications/settings/query/PhabricatorUserPreferencesQuery.php', 'PhabricatorUserPreferencesQuery' => 'applications/settings/query/PhabricatorUserPreferencesQuery.php',
'PhabricatorUserPreferencesSearchEngine' => 'applications/settings/query/PhabricatorUserPreferencesSearchEngine.php',
'PhabricatorUserPreferencesTransaction' => 'applications/settings/storage/PhabricatorUserPreferencesTransaction.php', 'PhabricatorUserPreferencesTransaction' => 'applications/settings/storage/PhabricatorUserPreferencesTransaction.php',
'PhabricatorUserPreferencesTransactionQuery' => 'applications/settings/query/PhabricatorUserPreferencesTransactionQuery.php',
'PhabricatorUserProfile' => 'applications/people/storage/PhabricatorUserProfile.php', 'PhabricatorUserProfile' => 'applications/people/storage/PhabricatorUserProfile.php',
'PhabricatorUserProfileEditor' => 'applications/people/editor/PhabricatorUserProfileEditor.php', 'PhabricatorUserProfileEditor' => 'applications/people/editor/PhabricatorUserProfileEditor.php',
'PhabricatorUserProfileImageCacheType' => 'applications/people/cache/PhabricatorUserProfileImageCacheType.php',
'PhabricatorUserRealNameField' => 'applications/people/customfield/PhabricatorUserRealNameField.php', 'PhabricatorUserRealNameField' => 'applications/people/customfield/PhabricatorUserRealNameField.php',
'PhabricatorUserRolesField' => 'applications/people/customfield/PhabricatorUserRolesField.php', 'PhabricatorUserRolesField' => 'applications/people/customfield/PhabricatorUserRolesField.php',
'PhabricatorUserSchemaSpec' => 'applications/people/storage/PhabricatorUserSchemaSpec.php', 'PhabricatorUserSchemaSpec' => 'applications/people/storage/PhabricatorUserSchemaSpec.php',
@ -4032,6 +4063,7 @@ phutil_register_library_map(array(
'PonderModerateCapability' => 'applications/ponder/capability/PonderModerateCapability.php', 'PonderModerateCapability' => 'applications/ponder/capability/PonderModerateCapability.php',
'PonderQuestion' => 'applications/ponder/storage/PonderQuestion.php', 'PonderQuestion' => 'applications/ponder/storage/PonderQuestion.php',
'PonderQuestionCommentController' => 'applications/ponder/controller/PonderQuestionCommentController.php', 'PonderQuestionCommentController' => 'applications/ponder/controller/PonderQuestionCommentController.php',
'PonderQuestionCreateMailReceiver' => 'applications/ponder/mail/PonderQuestionCreateMailReceiver.php',
'PonderQuestionEditController' => 'applications/ponder/controller/PonderQuestionEditController.php', 'PonderQuestionEditController' => 'applications/ponder/controller/PonderQuestionEditController.php',
'PonderQuestionEditor' => 'applications/ponder/editor/PonderQuestionEditor.php', 'PonderQuestionEditor' => 'applications/ponder/editor/PonderQuestionEditor.php',
'PonderQuestionFulltextEngine' => 'applications/ponder/search/PonderQuestionFulltextEngine.php', 'PonderQuestionFulltextEngine' => 'applications/ponder/search/PonderQuestionFulltextEngine.php',
@ -4554,7 +4586,6 @@ phutil_register_library_map(array(
'ConpherenceRoomListController' => 'ConpherenceController', 'ConpherenceRoomListController' => 'ConpherenceController',
'ConpherenceRoomTestCase' => 'ConpherenceTestCase', 'ConpherenceRoomTestCase' => 'ConpherenceTestCase',
'ConpherenceSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'ConpherenceSchemaSpec' => 'PhabricatorConfigSchemaSpec',
'ConpherenceSettings' => 'ConpherenceConstants',
'ConpherenceTestCase' => 'PhabricatorTestCase', 'ConpherenceTestCase' => 'PhabricatorTestCase',
'ConpherenceThread' => array( 'ConpherenceThread' => array(
'ConpherenceDAO', 'ConpherenceDAO',
@ -4790,6 +4821,7 @@ phutil_register_library_map(array(
'PhabricatorDestructibleInterface', 'PhabricatorDestructibleInterface',
'PhabricatorProjectInterface', 'PhabricatorProjectInterface',
'PhabricatorFulltextInterface', 'PhabricatorFulltextInterface',
'PhabricatorConduitResultInterface',
), ),
'DifferentialRevisionAffectedFilesHeraldField' => 'DifferentialRevisionHeraldField', 'DifferentialRevisionAffectedFilesHeraldField' => 'DifferentialRevisionHeraldField',
'DifferentialRevisionAuthorHeraldField' => 'DifferentialRevisionHeraldField', 'DifferentialRevisionAuthorHeraldField' => 'DifferentialRevisionHeraldField',
@ -4823,6 +4855,7 @@ phutil_register_library_map(array(
'DifferentialRevisionRequiredActionResultBucket' => 'DifferentialRevisionResultBucket', 'DifferentialRevisionRequiredActionResultBucket' => 'DifferentialRevisionResultBucket',
'DifferentialRevisionResultBucket' => 'PhabricatorSearchResultBucket', 'DifferentialRevisionResultBucket' => 'PhabricatorSearchResultBucket',
'DifferentialRevisionReviewersHeraldField' => 'DifferentialRevisionHeraldField', 'DifferentialRevisionReviewersHeraldField' => 'DifferentialRevisionHeraldField',
'DifferentialRevisionSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
'DifferentialRevisionSearchEngine' => 'PhabricatorApplicationSearchEngine', 'DifferentialRevisionSearchEngine' => 'PhabricatorApplicationSearchEngine',
'DifferentialRevisionStatus' => 'Phobject', 'DifferentialRevisionStatus' => 'Phobject',
'DifferentialRevisionSummaryHeraldField' => 'DifferentialRevisionHeraldField', 'DifferentialRevisionSummaryHeraldField' => 'DifferentialRevisionHeraldField',
@ -6163,7 +6196,7 @@ phutil_register_library_map(array(
'PhabricatorAccessLog' => 'Phobject', 'PhabricatorAccessLog' => 'Phobject',
'PhabricatorAccessLogConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorAccessLogConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorAccessibilitySetting' => 'PhabricatorSelectSetting', 'PhabricatorAccessibilitySetting' => 'PhabricatorSelectSetting',
'PhabricatorAccountSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorAccountSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorActionListView' => 'AphrontView', 'PhabricatorActionListView' => 'AphrontView',
'PhabricatorActionView' => 'AphrontView', 'PhabricatorActionView' => 'AphrontView',
'PhabricatorActivitySettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorActivitySettingsPanel' => 'PhabricatorSettingsPanel',
@ -6676,7 +6709,9 @@ phutil_register_library_map(array(
'PhabricatorConfigVersionsModule' => 'PhabricatorConfigModule', 'PhabricatorConfigVersionsModule' => 'PhabricatorConfigModule',
'PhabricatorConfigWelcomeController' => 'PhabricatorConfigController', 'PhabricatorConfigWelcomeController' => 'PhabricatorConfigController',
'PhabricatorConpherenceApplication' => 'PhabricatorApplication', 'PhabricatorConpherenceApplication' => 'PhabricatorApplication',
'PhabricatorConpherencePreferencesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorConpherenceColumnVisibleSetting' => 'PhabricatorInternalSetting',
'PhabricatorConpherenceNotificationsSetting' => 'PhabricatorSelectSetting',
'PhabricatorConpherencePreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorConpherenceThreadPHIDType' => 'PhabricatorPHIDType', 'PhabricatorConpherenceThreadPHIDType' => 'PhabricatorPHIDType',
'PhabricatorConsoleApplication' => 'PhabricatorApplication', 'PhabricatorConsoleApplication' => 'PhabricatorApplication',
'PhabricatorConsoleContentSource' => 'PhabricatorContentSource', 'PhabricatorConsoleContentSource' => 'PhabricatorContentSource',
@ -6782,6 +6817,8 @@ phutil_register_library_map(array(
'PhabricatorDaemonsSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorDaemonsSetupCheck' => 'PhabricatorSetupCheck',
'PhabricatorDailyRoutineTriggerClock' => 'PhabricatorTriggerClock', 'PhabricatorDailyRoutineTriggerClock' => 'PhabricatorTriggerClock',
'PhabricatorDarkConsoleSetting' => 'PhabricatorSelectSetting', 'PhabricatorDarkConsoleSetting' => 'PhabricatorSelectSetting',
'PhabricatorDarkConsoleTabSetting' => 'PhabricatorInternalSetting',
'PhabricatorDarkConsoleVisibleSetting' => 'PhabricatorInternalSetting',
'PhabricatorDashboard' => array( 'PhabricatorDashboard' => array(
'PhabricatorDashboardDAO', 'PhabricatorDashboardDAO',
'PhabricatorApplicationTransactionInterface', 'PhabricatorApplicationTransactionInterface',
@ -6858,18 +6895,19 @@ phutil_register_library_map(array(
'PhabricatorDatasourceEditField' => 'PhabricatorTokenizerEditField', 'PhabricatorDatasourceEditField' => 'PhabricatorTokenizerEditField',
'PhabricatorDatasourceEditType' => 'PhabricatorPHIDListEditType', 'PhabricatorDatasourceEditType' => 'PhabricatorPHIDListEditType',
'PhabricatorDateFormatSetting' => 'PhabricatorSelectSetting', 'PhabricatorDateFormatSetting' => 'PhabricatorSelectSetting',
'PhabricatorDateTimeSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorDateTimeSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorDebugController' => 'PhabricatorController', 'PhabricatorDebugController' => 'PhabricatorController',
'PhabricatorDefaultRequestExceptionHandler' => 'PhabricatorRequestExceptionHandler', 'PhabricatorDefaultRequestExceptionHandler' => 'PhabricatorRequestExceptionHandler',
'PhabricatorDefaultSyntaxStyle' => 'PhabricatorSyntaxStyle', 'PhabricatorDefaultSyntaxStyle' => 'PhabricatorSyntaxStyle',
'PhabricatorDesktopNotificationsSetting' => 'PhabricatorInternalSetting',
'PhabricatorDesktopNotificationsSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorDesktopNotificationsSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorDestructionEngine' => 'Phobject', 'PhabricatorDestructionEngine' => 'Phobject',
'PhabricatorDestructionEngineExtension' => 'Phobject', 'PhabricatorDestructionEngineExtension' => 'Phobject',
'PhabricatorDestructionEngineExtensionModule' => 'PhabricatorConfigModule', 'PhabricatorDestructionEngineExtensionModule' => 'PhabricatorConfigModule',
'PhabricatorDeveloperConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorDeveloperConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorDeveloperPreferencesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorDeveloperPreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorDiffInlineCommentQuery' => 'PhabricatorApplicationTransactionCommentQuery', 'PhabricatorDiffInlineCommentQuery' => 'PhabricatorApplicationTransactionCommentQuery',
'PhabricatorDiffPreferencesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorDiffPreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorDifferenceEngine' => 'Phobject', 'PhabricatorDifferenceEngine' => 'Phobject',
'PhabricatorDifferentialApplication' => 'PhabricatorApplication', 'PhabricatorDifferentialApplication' => 'PhabricatorApplication',
'PhabricatorDifferentialAttachCommitWorkflow' => 'PhabricatorDifferentialManagementWorkflow', 'PhabricatorDifferentialAttachCommitWorkflow' => 'PhabricatorDifferentialManagementWorkflow',
@ -6878,9 +6916,11 @@ phutil_register_library_map(array(
'PhabricatorDifferentialManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorDifferentialManagementWorkflow' => 'PhabricatorManagementWorkflow',
'PhabricatorDifferentialRevisionTestDataGenerator' => 'PhabricatorTestDataGenerator', 'PhabricatorDifferentialRevisionTestDataGenerator' => 'PhabricatorTestDataGenerator',
'PhabricatorDiffusionApplication' => 'PhabricatorApplication', 'PhabricatorDiffusionApplication' => 'PhabricatorApplication',
'PhabricatorDiffusionBlameSetting' => 'PhabricatorInternalSetting',
'PhabricatorDiffusionColorSetting' => 'PhabricatorInternalSetting',
'PhabricatorDiffusionConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorDiffusionConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorDisabledUserController' => 'PhabricatorAuthController', 'PhabricatorDisabledUserController' => 'PhabricatorAuthController',
'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorDisqusAuthProvider' => 'PhabricatorOAuth2AuthProvider', 'PhabricatorDisqusAuthProvider' => 'PhabricatorOAuth2AuthProvider',
'PhabricatorDividerProfilePanel' => 'PhabricatorProfilePanel', 'PhabricatorDividerProfilePanel' => 'PhabricatorProfilePanel',
'PhabricatorDivinerApplication' => 'PhabricatorApplication', 'PhabricatorDivinerApplication' => 'PhabricatorApplication',
@ -6930,6 +6970,7 @@ phutil_register_library_map(array(
'PhabricatorEditEngineConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhabricatorEditEngineConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
'PhabricatorEditEngineConfigurationViewController' => 'PhabricatorEditEngineController', 'PhabricatorEditEngineConfigurationViewController' => 'PhabricatorEditEngineController',
'PhabricatorEditEngineController' => 'PhabricatorApplicationTransactionController', 'PhabricatorEditEngineController' => 'PhabricatorApplicationTransactionController',
'PhabricatorEditEngineCreateQuickActions' => 'PhabricatorQuickActions',
'PhabricatorEditEngineExtension' => 'Phobject', 'PhabricatorEditEngineExtension' => 'Phobject',
'PhabricatorEditEngineExtensionModule' => 'PhabricatorConfigModule', 'PhabricatorEditEngineExtensionModule' => 'PhabricatorConfigModule',
'PhabricatorEditEngineListController' => 'PhabricatorEditEngineController', 'PhabricatorEditEngineListController' => 'PhabricatorEditEngineController',
@ -6937,6 +6978,7 @@ phutil_register_library_map(array(
'PhabricatorEditEngineQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorEditEngineQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorEditEngineSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorEditEngineSearchEngine' => 'PhabricatorApplicationSearchEngine',
'PhabricatorEditEngineSelectCommentAction' => 'PhabricatorEditEngineCommentAction', 'PhabricatorEditEngineSelectCommentAction' => 'PhabricatorEditEngineCommentAction',
'PhabricatorEditEngineSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorEditEngineTokenizerCommentAction' => 'PhabricatorEditEngineCommentAction', 'PhabricatorEditEngineTokenizerCommentAction' => 'PhabricatorEditEngineCommentAction',
'PhabricatorEditField' => 'Phobject', 'PhabricatorEditField' => 'Phobject',
'PhabricatorEditPage' => 'Phobject', 'PhabricatorEditPage' => 'Phobject',
@ -6948,13 +6990,15 @@ phutil_register_library_map(array(
'PhabricatorElasticSearchSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorElasticSearchSetupCheck' => 'PhabricatorSetupCheck',
'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorEmailContentSource' => 'PhabricatorContentSource', 'PhabricatorEmailContentSource' => 'PhabricatorContentSource',
'PhabricatorEmailDeliverySettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorEmailFormatSetting' => 'PhabricatorSelectSetting', 'PhabricatorEmailFormatSetting' => 'PhabricatorSelectSetting',
'PhabricatorEmailFormatSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorEmailFormatSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorEmailLoginController' => 'PhabricatorAuthController', 'PhabricatorEmailLoginController' => 'PhabricatorAuthController',
'PhabricatorEmailNotificationsSetting' => 'PhabricatorSelectSetting', 'PhabricatorEmailNotificationsSetting' => 'PhabricatorSelectSetting',
'PhabricatorEmailPreferencesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorEmailPreferencesSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorEmailRePrefixSetting' => 'PhabricatorSelectSetting', 'PhabricatorEmailRePrefixSetting' => 'PhabricatorSelectSetting',
'PhabricatorEmailSelfActionsSetting' => 'PhabricatorSelectSetting', 'PhabricatorEmailSelfActionsSetting' => 'PhabricatorSelectSetting',
'PhabricatorEmailTagsSetting' => 'PhabricatorInternalSetting',
'PhabricatorEmailVarySubjectsSetting' => 'PhabricatorSelectSetting', 'PhabricatorEmailVarySubjectsSetting' => 'PhabricatorSelectSetting',
'PhabricatorEmailVerificationController' => 'PhabricatorAuthController', 'PhabricatorEmailVerificationController' => 'PhabricatorAuthController',
'PhabricatorEmbedFileRemarkupRule' => 'PhabricatorObjectRemarkupRule', 'PhabricatorEmbedFileRemarkupRule' => 'PhabricatorObjectRemarkupRule',
@ -7104,6 +7148,7 @@ phutil_register_library_map(array(
'PhabricatorFilesManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorFilesManagementWorkflow' => 'PhabricatorManagementWorkflow',
'PhabricatorFilesOnDiskBuiltinFile' => 'PhabricatorFilesBuiltinFile', 'PhabricatorFilesOnDiskBuiltinFile' => 'PhabricatorFilesBuiltinFile',
'PhabricatorFilesOutboundRequestAction' => 'PhabricatorSystemAction', 'PhabricatorFilesOutboundRequestAction' => 'PhabricatorSystemAction',
'PhabricatorFiletreeVisibleSetting' => 'PhabricatorInternalSetting',
'PhabricatorFlag' => array( 'PhabricatorFlag' => array(
'PhabricatorFlagDAO', 'PhabricatorFlagDAO',
'PhabricatorPolicyInterface', 'PhabricatorPolicyInterface',
@ -7194,6 +7239,7 @@ phutil_register_library_map(array(
'PhabricatorInlineCommentPreviewController' => 'PhabricatorController', 'PhabricatorInlineCommentPreviewController' => 'PhabricatorController',
'PhabricatorInlineSummaryView' => 'AphrontView', 'PhabricatorInlineSummaryView' => 'AphrontView',
'PhabricatorInstructionsEditField' => 'PhabricatorEditField', 'PhabricatorInstructionsEditField' => 'PhabricatorEditField',
'PhabricatorInternalSetting' => 'PhabricatorSetting',
'PhabricatorInternationalizationManagementExtractWorkflow' => 'PhabricatorInternationalizationManagementWorkflow', 'PhabricatorInternationalizationManagementExtractWorkflow' => 'PhabricatorInternationalizationManagementWorkflow',
'PhabricatorInternationalizationManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorInternationalizationManagementWorkflow' => 'PhabricatorManagementWorkflow',
'PhabricatorInvalidConfigSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorInvalidConfigSetupCheck' => 'PhabricatorSetupCheck',
@ -7662,6 +7708,7 @@ phutil_register_library_map(array(
'PhabricatorPhurlURLTransactionComment' => 'PhabricatorApplicationTransactionComment', 'PhabricatorPhurlURLTransactionComment' => 'PhabricatorApplicationTransactionComment',
'PhabricatorPhurlURLTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhabricatorPhurlURLTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
'PhabricatorPhurlURLViewController' => 'PhabricatorPhurlController', 'PhabricatorPhurlURLViewController' => 'PhabricatorPhurlController',
'PhabricatorPinnedApplicationsSetting' => 'PhabricatorInternalSetting',
'PhabricatorPirateEnglishTranslation' => 'PhutilTranslation', 'PhabricatorPirateEnglishTranslation' => 'PhutilTranslation',
'PhabricatorPlatformSite' => 'PhabricatorSite', 'PhabricatorPlatformSite' => 'PhabricatorSite',
'PhabricatorPointsEditField' => 'PhabricatorEditField', 'PhabricatorPointsEditField' => 'PhabricatorEditField',
@ -7689,6 +7736,7 @@ phutil_register_library_map(array(
'PhabricatorPolicyEditField' => 'PhabricatorEditField', 'PhabricatorPolicyEditField' => 'PhabricatorEditField',
'PhabricatorPolicyException' => 'Exception', 'PhabricatorPolicyException' => 'Exception',
'PhabricatorPolicyExplainController' => 'PhabricatorPolicyController', 'PhabricatorPolicyExplainController' => 'PhabricatorPolicyController',
'PhabricatorPolicyFavoritesSetting' => 'PhabricatorInternalSetting',
'PhabricatorPolicyFilter' => 'Phobject', 'PhabricatorPolicyFilter' => 'Phobject',
'PhabricatorPolicyInterface' => 'PhabricatorPHIDInterface', 'PhabricatorPolicyInterface' => 'PhabricatorPHIDInterface',
'PhabricatorPolicyManagementShowWorkflow' => 'PhabricatorPolicyManagementWorkflow', 'PhabricatorPolicyManagementShowWorkflow' => 'PhabricatorPolicyManagementWorkflow',
@ -7707,6 +7755,7 @@ phutil_register_library_map(array(
), ),
'PhabricatorPolicyType' => 'PhabricatorPolicyConstants', 'PhabricatorPolicyType' => 'PhabricatorPolicyConstants',
'PhabricatorPonderApplication' => 'PhabricatorApplication', 'PhabricatorPonderApplication' => 'PhabricatorApplication',
'PhabricatorProfileMenuCollapsedSetting' => 'PhabricatorInternalSetting',
'PhabricatorProfilePanel' => 'Phobject', 'PhabricatorProfilePanel' => 'Phobject',
'PhabricatorProfilePanelConfiguration' => array( 'PhabricatorProfilePanelConfiguration' => array(
'PhabricatorSearchDAO', 'PhabricatorSearchDAO',
@ -7876,6 +7925,7 @@ phutil_register_library_map(array(
'Phobject', 'Phobject',
'Iterator', 'Iterator',
), ),
'PhabricatorQuickActions' => 'Phobject',
'PhabricatorRateLimitRequestExceptionHandler' => 'PhabricatorRequestExceptionHandler', 'PhabricatorRateLimitRequestExceptionHandler' => 'PhabricatorRequestExceptionHandler',
'PhabricatorRecaptchaConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorRecaptchaConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorRecipientHasBadgeEdgeType' => 'PhabricatorEdgeType', 'PhabricatorRecipientHasBadgeEdgeType' => 'PhabricatorEdgeType',
@ -8101,6 +8151,7 @@ phutil_register_library_map(array(
'PhabricatorSearchResultBucketGroup' => 'Phobject', 'PhabricatorSearchResultBucketGroup' => 'Phobject',
'PhabricatorSearchResultView' => 'AphrontView', 'PhabricatorSearchResultView' => 'AphrontView',
'PhabricatorSearchSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorSearchSchemaSpec' => 'PhabricatorConfigSchemaSpec',
'PhabricatorSearchScopeSetting' => 'PhabricatorInternalSetting',
'PhabricatorSearchSelectController' => 'PhabricatorSearchBaseController', 'PhabricatorSearchSelectController' => 'PhabricatorSearchBaseController',
'PhabricatorSearchSelectField' => 'PhabricatorSearchField', 'PhabricatorSearchSelectField' => 'PhabricatorSearchField',
'PhabricatorSearchStringListField' => 'PhabricatorSearchField', 'PhabricatorSearchStringListField' => 'PhabricatorSearchField',
@ -8116,14 +8167,21 @@ phutil_register_library_map(array(
'PhabricatorSendGridConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorSendGridConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorSessionsSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorSessionsSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorSetting' => 'Phobject', 'PhabricatorSetting' => 'Phobject',
'PhabricatorSettingsAccountPanelGroup' => 'PhabricatorSettingsPanelGroup',
'PhabricatorSettingsAddEmailAction' => 'PhabricatorSystemAction', 'PhabricatorSettingsAddEmailAction' => 'PhabricatorSystemAction',
'PhabricatorSettingsAdjustController' => 'PhabricatorController', 'PhabricatorSettingsAdjustController' => 'PhabricatorController',
'PhabricatorSettingsApplication' => 'PhabricatorApplication', 'PhabricatorSettingsApplication' => 'PhabricatorApplication',
'PhabricatorSettingsEditController' => 'PhabricatorController', 'PhabricatorSettingsApplicationsPanelGroup' => 'PhabricatorSettingsPanelGroup',
'PhabricatorSettingsAuthenticationPanelGroup' => 'PhabricatorSettingsPanelGroup',
'PhabricatorSettingsDeveloperPanelGroup' => 'PhabricatorSettingsPanelGroup',
'PhabricatorSettingsEditEngine' => 'PhabricatorEditEngine', 'PhabricatorSettingsEditEngine' => 'PhabricatorEditEngine',
'PhabricatorSettingsEmailPanelGroup' => 'PhabricatorSettingsPanelGroup',
'PhabricatorSettingsListController' => 'PhabricatorController',
'PhabricatorSettingsLogsPanelGroup' => 'PhabricatorSettingsPanelGroup',
'PhabricatorSettingsMainController' => 'PhabricatorController', 'PhabricatorSettingsMainController' => 'PhabricatorController',
'PhabricatorSettingsMainMenuBarExtension' => 'PhabricatorMainMenuBarExtension', 'PhabricatorSettingsMainMenuBarExtension' => 'PhabricatorMainMenuBarExtension',
'PhabricatorSettingsPanel' => 'Phobject', 'PhabricatorSettingsPanel' => 'Phobject',
'PhabricatorSettingsPanelGroup' => 'Phobject',
'PhabricatorSettingsTimezoneController' => 'PhabricatorController', 'PhabricatorSettingsTimezoneController' => 'PhabricatorController',
'PhabricatorSetupCheck' => 'Phobject', 'PhabricatorSetupCheck' => 'Phobject',
'PhabricatorSetupCheckTestCase' => 'PhabricatorTestCase', 'PhabricatorSetupCheckTestCase' => 'PhabricatorTestCase',
@ -8302,6 +8360,7 @@ phutil_register_library_map(array(
'PhabricatorTimeFormatSetting' => 'PhabricatorSelectSetting', 'PhabricatorTimeFormatSetting' => 'PhabricatorSelectSetting',
'PhabricatorTimeGuard' => 'Phobject', 'PhabricatorTimeGuard' => 'Phobject',
'PhabricatorTimeTestCase' => 'PhabricatorTestCase', 'PhabricatorTimeTestCase' => 'PhabricatorTestCase',
'PhabricatorTimezoneIgnoreOffsetSetting' => 'PhabricatorInternalSetting',
'PhabricatorTimezoneSetting' => 'PhabricatorOptionGroupSetting', 'PhabricatorTimezoneSetting' => 'PhabricatorOptionGroupSetting',
'PhabricatorTimezoneSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorTimezoneSetupCheck' => 'PhabricatorSetupCheck',
'PhabricatorTitleGlyphsSetting' => 'PhabricatorSelectSetting', 'PhabricatorTitleGlyphsSetting' => 'PhabricatorSelectSetting',
@ -8405,6 +8464,8 @@ phutil_register_library_map(array(
'PhabricatorPolicyInterface', 'PhabricatorPolicyInterface',
), ),
'PhabricatorUserLogView' => 'AphrontView', 'PhabricatorUserLogView' => 'AphrontView',
'PhabricatorUserMessageCountCacheType' => 'PhabricatorUserCacheType',
'PhabricatorUserNotificationCountCacheType' => 'PhabricatorUserCacheType',
'PhabricatorUserPHIDResolver' => 'PhabricatorPHIDResolver', 'PhabricatorUserPHIDResolver' => 'PhabricatorPHIDResolver',
'PhabricatorUserPreferences' => array( 'PhabricatorUserPreferences' => array(
'PhabricatorUserDAO', 'PhabricatorUserDAO',
@ -8416,9 +8477,12 @@ phutil_register_library_map(array(
'PhabricatorUserPreferencesEditor' => 'PhabricatorApplicationTransactionEditor', 'PhabricatorUserPreferencesEditor' => 'PhabricatorApplicationTransactionEditor',
'PhabricatorUserPreferencesPHIDType' => 'PhabricatorPHIDType', 'PhabricatorUserPreferencesPHIDType' => 'PhabricatorPHIDType',
'PhabricatorUserPreferencesQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorUserPreferencesQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorUserPreferencesSearchEngine' => 'PhabricatorApplicationSearchEngine',
'PhabricatorUserPreferencesTransaction' => 'PhabricatorApplicationTransaction', 'PhabricatorUserPreferencesTransaction' => 'PhabricatorApplicationTransaction',
'PhabricatorUserPreferencesTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
'PhabricatorUserProfile' => 'PhabricatorUserDAO', 'PhabricatorUserProfile' => 'PhabricatorUserDAO',
'PhabricatorUserProfileEditor' => 'PhabricatorApplicationTransactionEditor', 'PhabricatorUserProfileEditor' => 'PhabricatorApplicationTransactionEditor',
'PhabricatorUserProfileImageCacheType' => 'PhabricatorUserCacheType',
'PhabricatorUserRealNameField' => 'PhabricatorUserCustomField', 'PhabricatorUserRealNameField' => 'PhabricatorUserCustomField',
'PhabricatorUserRolesField' => 'PhabricatorUserCustomField', 'PhabricatorUserRolesField' => 'PhabricatorUserCustomField',
'PhabricatorUserSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorUserSchemaSpec' => 'PhabricatorConfigSchemaSpec',
@ -8953,6 +9017,7 @@ phutil_register_library_map(array(
'PhabricatorFulltextInterface', 'PhabricatorFulltextInterface',
), ),
'PonderQuestionCommentController' => 'PonderController', 'PonderQuestionCommentController' => 'PonderController',
'PonderQuestionCreateMailReceiver' => 'PhabricatorMailReceiver',
'PonderQuestionEditController' => 'PonderController', 'PonderQuestionEditController' => 'PonderController',
'PonderQuestionEditor' => 'PonderEditor', 'PonderQuestionEditor' => 'PonderEditor',
'PonderQuestionFulltextEngine' => 'PhabricatorFulltextEngine', 'PonderQuestionFulltextEngine' => 'PhabricatorFulltextEngine',

View file

@ -64,8 +64,8 @@ final class AphrontAjaxResponse extends AphrontResponse {
if ($request) { if ($request) {
$viewer = $request->getViewer(); $viewer = $request->getViewer();
if ($viewer) { if ($viewer) {
$postprocessor_key = $viewer->getPreference( $postprocessor_key = $viewer->getUserSetting(
PhabricatorUserPreferences::PREFERENCE_RESOURCE_POSTPROCESSOR); PhabricatorAccessibilitySetting::SETTINGKEY);
if (strlen($postprocessor_key)) { if (strlen($postprocessor_key)) {
$response->setPostprocessorKey($postprocessor_key); $response->setPostprocessorKey($postprocessor_key);
} }

View file

@ -46,17 +46,15 @@ final class AphlictDropdownDataQuery extends Phobject {
$is_c_installed = PhabricatorApplication::isClassInstalledForViewer( $is_c_installed = PhabricatorApplication::isClassInstalledForViewer(
$conpherence_app, $conpherence_app,
$viewer); $viewer);
if ($is_c_installed) {
$raw_message_count_number = $viewer->getUnreadMessageCount();
$message_count_number = $this->formatNumber($raw_message_count_number);
} else {
$raw_message_count_number = null; $raw_message_count_number = null;
$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);
$message_count_number = $this->formatNumber($raw_message_count_number);
} }
$conpherence_data = array( $conpherence_data = array(
'isInstalled' => $is_c_installed, 'isInstalled' => $is_c_installed,
'countType' => 'messages', 'countType' => 'messages',
@ -69,15 +67,15 @@ final class AphlictDropdownDataQuery extends Phobject {
$is_n_installed = PhabricatorApplication::isClassInstalledForViewer( $is_n_installed = PhabricatorApplication::isClassInstalledForViewer(
$notification_app, $notification_app,
$viewer); $viewer);
$notification_count_number = null;
$raw_notification_count_number = null;
if ($is_n_installed) { if ($is_n_installed) {
$raw_notification_count_number = $raw_notification_count_number = $viewer->getUnreadNotificationCount();
id(new PhabricatorFeedStoryNotification())
->countUnread($viewer);
$notification_count_number = $this->formatNumber( $notification_count_number = $this->formatNumber(
$raw_notification_count_number); $raw_notification_count_number);
} else {
$notification_count_number = null;
$raw_notification_count_number = null;
} }
$notification_data = array( $notification_data = array(
'isInstalled' => $is_n_installed, 'isInstalled' => $is_n_installed,
'countType' => 'notifications', 'countType' => 'notifications',

View file

@ -139,7 +139,10 @@ final class PhabricatorAuthOneTimeLoginController
->save(); ->save();
unset($unguarded); 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( ->setQueryParams(
array( array(
'key' => $key, 'key' => $key,

View file

@ -113,17 +113,9 @@ final class PhabricatorAuthStartController
PhabricatorCookies::setClientIDCookie($request); PhabricatorCookies::setClientIDCookie($request);
} }
if (!$request->getURIData('loggedout') && count($providers) == 1) { $auto_response = $this->tryAutoLogin($providers);
$auto_login_provider = head($providers); if ($auto_response) {
$auto_login_config = $auto_login_provider->getProviderConfig(); return $auto_response;
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());
}
} }
$invite = $this->loadInvite(); $invite = $this->loadInvite();
@ -282,4 +274,35 @@ final class PhabricatorAuthStartController
array($message)); 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);
}
} }

View file

@ -3,10 +3,6 @@
final class PhabricatorMustVerifyEmailController final class PhabricatorMustVerifyEmailController
extends PhabricatorAuthController { extends PhabricatorAuthController {
public function shouldRequireLogin() {
return false;
}
public function shouldRequireEmailVerification() { public function shouldRequireEmailVerification() {
// NOTE: We don't technically need this since PhabricatorController forces // NOTE: We don't technically need this since PhabricatorController forces
// us here in either case, but it's more consistent with intent. // us here in either case, but it's more consistent with intent.

View file

@ -130,7 +130,7 @@ final class PhabricatorAuthEditController
PhabricatorAuthProviderConfigTransaction::TYPE_TRUST_EMAILS) PhabricatorAuthProviderConfigTransaction::TYPE_TRUST_EMAILS)
->setNewValue($request->getInt('trustEmails', 0)); ->setNewValue($request->getInt('trustEmails', 0));
if ($provider instanceof PhabricatorPhabricatorAuthProvider) { if ($provider->supportsAutoLogin()) {
$xactions[] = id(new PhabricatorAuthProviderConfigTransaction()) $xactions[] = id(new PhabricatorAuthProviderConfigTransaction())
->setTransactionType( ->setTransactionType(
PhabricatorAuthProviderConfigTransaction::TYPE_AUTO_LOGIN) PhabricatorAuthProviderConfigTransaction::TYPE_AUTO_LOGIN)
@ -314,7 +314,7 @@ final class PhabricatorAuthEditController
$v_trust_email)); $v_trust_email));
} }
if ($provider instanceof PhabricatorPhabricatorAuthProvider) { if ($provider->supportsAutoLogin()) {
$form->appendChild( $form->appendChild(
id(new AphrontFormCheckboxControl()) id(new AphrontFormCheckboxControl())
->addCheckbox( ->addCheckbox(

View file

@ -113,7 +113,7 @@ final class PhabricatorAuthSessionEngine extends Phobject {
$session_key = PhabricatorHash::digest($session_token); $session_key = PhabricatorHash::digest($session_token);
$cache_parts = $this->getUserCacheQueryParts($conn_r); $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( $info = queryfx_one(
$conn_r, $conn_r,
@ -162,6 +162,7 @@ final class PhabricatorAuthSessionEngine extends Phobject {
$user = $user_table->loadFromArray($info); $user = $user_table->loadFromArray($info);
$cache_raw = $this->filterRawCacheData($user, $types_map, $cache_raw);
$user->attachRawCacheData($cache_raw); $user->attachRawCacheData($cache_raw);
switch ($session_type) { switch ($session_type) {
@ -760,11 +761,13 @@ final class PhabricatorAuthSessionEngine extends Phobject {
$cache_map = array(); $cache_map = array();
$keys = array(); $keys = array();
$types_map = array();
$cache_types = PhabricatorUserCacheType::getAllCacheTypes(); $cache_types = PhabricatorUserCacheType::getAllCacheTypes();
foreach ($cache_types as $cache_type) { foreach ($cache_types as $cache_type) {
foreach ($cache_type->getAutoloadKeys() as $autoload_key) { foreach ($cache_type->getAutoloadKeys() as $autoload_key) {
$keys[] = $autoload_key; $keys[] = $autoload_key;
$types_map[$autoload_key] = $cache_type;
} }
} }
@ -808,7 +811,32 @@ final class PhabricatorAuthSessionEngine extends Phobject {
$cache_joins = ''; $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());
} }
} }

View file

@ -495,4 +495,12 @@ abstract class PhabricatorAuthProvider extends Phobject {
} }
} }
public function supportsAutoLogin() {
return false;
}
public function getAutoLoginURI(AphrontRequest $request) {
throw new PhutilMethodNotImplementedException();
}
} }

View file

@ -273,4 +273,17 @@ abstract class PhabricatorOAuth2AuthProvider
parent::willRenderLinkedAccount($viewer, $item, $account); 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();
}
} }

View file

@ -335,17 +335,6 @@ abstract class PhabricatorApplication
} }
/**
* Build items for the "quick create" menu.
*
* @param PhabricatorUser The viewing user.
* @return list<PHUIListItemView> List of menu items.
*/
public function getQuickCreateItems(PhabricatorUser $viewer) {
return array();
}
/* -( Application Management )--------------------------------------------- */ /* -( Application Management )--------------------------------------------- */

View file

@ -104,7 +104,8 @@ abstract class PhabricatorController extends AphrontController {
$request->setUser($user); $request->setUser($user);
} }
PhabricatorEnv::setLocaleCode($user->getTranslation()); id(new PhabricatorAuthSessionEngine())
->willServeRequestForUser($user);
if (PhabricatorEnv::getEnvConfig('darkconsole.enabled')) { if (PhabricatorEnv::getEnvConfig('darkconsole.enabled')) {
$dark_console = PhabricatorDarkConsoleSetting::SETTINGKEY; $dark_console = PhabricatorDarkConsoleSetting::SETTINGKEY;

View file

@ -26,6 +26,10 @@ final class PhabricatorCacheManagementPurgeWorkflow
'name' => 'purge-general', 'name' => 'purge-general',
'help' => pht('Purge the general cache.'), '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'), 'remarkup' => $purge_all || $args->getArg('purge-remarkup'),
'changeset' => $purge_all || $args->getArg('purge-changeset'), 'changeset' => $purge_all || $args->getArg('purge-changeset'),
'general' => $purge_all || $args->getArg('purge-general'), 'general' => $purge_all || $args->getArg('purge-general'),
'user' => $purge_all || $args->getArg('purge-user'),
); );
if (!array_filter($purge)) { if (!array_filter($purge)) {
@ -72,6 +77,12 @@ final class PhabricatorCacheManagementPurgeWorkflow
$this->purgeGeneralCache(); $this->purgeGeneralCache();
$console->writeOut("%s\n", pht('Done.')); $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() { private function purgeRemarkupCache() {
@ -100,4 +111,14 @@ final class PhabricatorCacheManagementPurgeWorkflow
'cache_general'); 'cache_general');
} }
private function purgeUserCache() {
$table = new PhabricatorUserCache();
$conn_w = $table->establishConnection('w');
queryfx(
$conn_w,
'TRUNCATE TABLE %T',
$table->getTableName());
}
} }

View file

@ -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() { public function getMailCommandObjects() {
return array( return array(
'event' => array( 'event' => array(

View file

@ -487,6 +487,10 @@ final class PhabricatorConduitAPIController
} }
$request->setUser($user); $request->setUser($user);
id(new PhabricatorAuthSessionEngine())
->willServeRequestForUser($user);
return null; return null;
} }

View file

@ -3,7 +3,11 @@
final class PhabricatorConduitTokensSettingsPanel final class PhabricatorConduitTokensSettingsPanel
extends PhabricatorSettingsPanel { extends PhabricatorSettingsPanel {
public function isEditableByAdministrators() { public function isManagementPanel() {
if ($this->getUser()->getIsMailingList()) {
return false;
}
return true; return true;
} }
@ -15,15 +19,11 @@ final class PhabricatorConduitTokensSettingsPanel
return pht('Conduit API Tokens'); return pht('Conduit API Tokens');
} }
public function getPanelGroup() { public function getPanelGroupKey() {
return pht('Sessions and Logs'); return PhabricatorSettingsLogsPanelGroup::PANELGROUPKEY;
} }
public function isEnabled() { public function isEnabled() {
if ($this->getUser()->getIsMailingList()) {
return false;
}
return true; return true;
} }

View file

@ -55,7 +55,7 @@ final class PhabricatorPHPMailerConfigOptions
$this->newOption('phpmailer.smtp-password', 'string', null) $this->newOption('phpmailer.smtp-password', 'string', null)
->setHidden(true) ->setHidden(true)
->setDescription(pht('Password for SMTP.')), ->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.')) ->setSummary(pht('Configure how mail is encoded.'))
->setDescription( ->setDescription(
pht( pht(
@ -64,14 +64,8 @@ final class PhabricatorPHPMailerConfigOptions
"encoding. If you're having trouble with mail being mangled or ". "encoding. If you're having trouble with mail being mangled or ".
"arriving with too many or too few newlines, you may try ". "arriving with too many or too few newlines, you may try ".
"adjusting this setting.\n\n". "adjusting this setting.\n\n".
"Supported values are `8bit` (default), `quoted-printable`, ". "Supported values are `8bit`, `quoted-printable`, ".
"`7bit`, `binary` and `base64`.\n\n". "`7bit`, `binary` and `base64`.")),
"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.")),
); );
} }

View file

@ -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() { public function getQuicksandURIPatternBlacklist() {
return array( return array(
'/conpherence/.*', '/conpherence/.*',

View file

@ -1,22 +0,0 @@
<?php
final class ConpherenceSettings extends ConpherenceConstants {
const EMAIL_ALWAYS = 0;
const NOTIFICATIONS_ONLY = 1;
public static function getHumanString($constant) {
$string = pht('Unknown setting.');
switch ($constant) {
case self::EMAIL_ALWAYS:
$string = pht('Email me every update.');
break;
case self::NOTIFICATIONS_ONLY:
$string = pht('Notifications only.');
break;
}
return $string;
}
}

View file

@ -127,9 +127,14 @@ final class ConpherenceUpdateController
} }
$participant->setSettings(array('notifications' => $notifications)); $participant->setSettings(array('notifications' => $notifications));
$participant->save(); $participant->save();
$label = PhabricatorConpherenceNotificationsSetting::getSettingLabel(
$notifications);
$result = pht( $result = pht(
'Updated notification settings to "%s".', 'Updated notification settings to "%s".',
ConpherenceSettings::getHumanString($notifications)); $label);
return id(new AphrontAjaxResponse()) return id(new AphrontAjaxResponse())
->setContent($result); ->setContent($result);
break; break;

View file

@ -68,10 +68,13 @@ final class ConpherenceViewController extends
$latest_transaction = head($transactions); $latest_transaction = head($transactions);
$participant = $conpherence->getParticipantIfExists($user->getPHID()); $participant = $conpherence->getParticipantIfExists($user->getPHID());
if ($participant) { if ($participant) {
if (!$participant->isUpToDate($conpherence)) {
$write_guard = AphrontWriteGuard::beginScopedUnguardedWrites(); $write_guard = AphrontWriteGuard::beginScopedUnguardedWrites();
$participant->markUpToDate($conpherence, $latest_transaction); $participant->markUpToDate($conpherence, $latest_transaction);
$user->clearCacheData(PhabricatorUserMessageCountCacheType::KEY_COUNT);
unset($write_guard); unset($write_guard);
} }
}
$data = ConpherenceTransactionRenderer::renderTransactions( $data = ConpherenceTransactionRenderer::renderTransactions(
$user, $user,

View file

@ -2,17 +2,6 @@
final class ConpherenceWidgetController extends ConpherenceController { 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() { public function shouldAllowPublic() {
return true; return true;
} }
@ -35,8 +24,6 @@ final class ConpherenceWidgetController extends ConpherenceController {
} }
$this->setConpherence($conpherence); $this->setConpherence($conpherence);
$this->setUserPreferences($user->loadPreferences());
switch ($request->getStr('widget')) { switch ($request->getStr('widget')) {
case 'widgets-people': case 'widgets-people':
$content = $this->renderPeopleWidgetPaneContent(); $content = $this->renderPeopleWidgetPaneContent();
@ -143,28 +130,24 @@ final class ConpherenceWidgetController extends ConpherenceController {
), ),
$text); $text);
} }
$default = ConpherenceSettings::EMAIL_ALWAYS; $notification_key = PhabricatorConpherenceNotificationsSetting::SETTINGKEY;
$preference = $this->getUserPreferences(); $notification_default = $viewer->getUserSetting($notification_key);
if ($preference) {
$default = $preference->getPreference(
PhabricatorUserPreferences::PREFERENCE_CONPH_NOTIFICATIONS,
ConpherenceSettings::EMAIL_ALWAYS);
}
$settings = $participant->getSettings(); $settings = $participant->getSettings();
$notifications = idx( $notifications = idx(
$settings, $settings,
'notifications', 'notifications',
$default); $notification_default);
$options = id(new AphrontFormRadioButtonControl()) $options = id(new AphrontFormRadioButtonControl())
->addButton( ->addButton(
ConpherenceSettings::EMAIL_ALWAYS, PhabricatorConpherenceNotificationsSetting::VALUE_CONPHERENCE_EMAIL,
ConpherenceSettings::getHumanString( PhabricatorConpherenceNotificationsSetting::getSettingLabel(
ConpherenceSettings::EMAIL_ALWAYS), PhabricatorConpherenceNotificationsSetting::VALUE_CONPHERENCE_EMAIL),
'') '')
->addButton( ->addButton(
ConpherenceSettings::NOTIFICATIONS_ONLY, PhabricatorConpherenceNotificationsSetting::VALUE_CONPHERENCE_NOTIFY,
ConpherenceSettings::getHumanString( PhabricatorConpherenceNotificationsSetting::getSettingLabel(
ConpherenceSettings::NOTIFICATIONS_ONLY), PhabricatorConpherenceNotificationsSetting::VALUE_CONPHERENCE_NOTIFY),
'') '')
->setName('notifications') ->setName('notifications')
->setValue($notifications); ->setValue($notifications);

View file

@ -422,6 +422,10 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
$participant->save(); $participant->save();
} }
PhabricatorUserCache::clearCaches(
PhabricatorUserMessageCountCacheType::KEY_COUNT,
array_keys($participants));
if ($xactions) { if ($xactions) {
$data = array( $data = array(
'type' => 'message', 'type' => 'message',
@ -541,26 +545,29 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
$participant_phids = mpull($participants, 'getParticipantPHID'); $participant_phids = mpull($participants, 'getParticipantPHID');
$preferences = id(new PhabricatorUserPreferencesQuery()) $users = id(new PhabricatorPeopleQuery())
->setViewer(PhabricatorUser::getOmnipotentUser()) ->setViewer(PhabricatorUser::getOmnipotentUser())
->withUserPHIDs($participant_phids) ->withPHIDs($participant_phids)
->needUserSettings(true)
->execute(); ->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) { foreach ($participants as $phid => $participant) {
$default = ConpherenceSettings::EMAIL_ALWAYS; $user = idx($users, $phid);
$preference = idx($preferences, $phid); if ($user) {
if ($preference) { $default = $user->getUserSetting($notification_key);
$default = $preference->getPreference( } else {
PhabricatorUserPreferences::PREFERENCE_CONPH_NOTIFICATIONS, $default = $notification_email;
ConpherenceSettings::EMAIL_ALWAYS);
} }
$settings = $participant->getSettings(); $settings = $participant->getSettings();
$notifications = idx( $notifications = idx($settings, 'notifications', $default);
$settings,
'notifications', if ($notifications == $notification_email) {
$default);
if ($notifications == ConpherenceSettings::EMAIL_ALWAYS) {
$to_phids[] = $phid; $to_phids[] = $phid;
} }
} }

View file

@ -100,7 +100,7 @@ final class ConpherenceThreadQuery
$data = queryfx_all( $data = queryfx_all(
$conn_r, $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(), $table->getTableName(),
$this->buildJoinClause($conn_r), $this->buildJoinClause($conn_r),
$this->buildWhereClause($conn_r), $this->buildWhereClause($conn_r),
@ -144,7 +144,7 @@ final class ConpherenceThreadQuery
protected function buildGroupClause(AphrontDatabaseConnection $conn_r) { protected function buildGroupClause(AphrontDatabaseConnection $conn_r) {
if ($this->participantPHIDs !== null || strlen($this->fulltext)) { if ($this->participantPHIDs !== null || strlen($this->fulltext)) {
return 'GROUP BY conpherence_thread.id'; return 'GROUP BY thread.id';
} else { } else {
return $this->buildApplicationSearchGroupClause($conn_r); return $this->buildApplicationSearchGroupClause($conn_r);
} }
@ -156,14 +156,14 @@ final class ConpherenceThreadQuery
if ($this->participantPHIDs !== null) { if ($this->participantPHIDs !== null) {
$joins[] = qsprintf( $joins[] = qsprintf(
$conn_r, $conn_r,
'JOIN %T p ON p.conpherencePHID = conpherence_thread.phid', 'JOIN %T p ON p.conpherencePHID = thread.phid',
id(new ConpherenceParticipant())->getTableName()); id(new ConpherenceParticipant())->getTableName());
} }
if (strlen($this->fulltext)) { if (strlen($this->fulltext)) {
$joins[] = qsprintf( $joins[] = qsprintf(
$conn_r, $conn_r,
'JOIN %T idx ON idx.threadPHID = conpherence_thread.phid', 'JOIN %T idx ON idx.threadPHID = thread.phid',
id(new ConpherenceIndex())->getTableName()); id(new ConpherenceIndex())->getTableName());
} }
@ -179,14 +179,14 @@ final class ConpherenceThreadQuery
if ($this->ids !== null) { if ($this->ids !== null) {
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'conpherence_thread.id IN (%Ld)', 'thread.id IN (%Ld)',
$this->ids); $this->ids);
} }
if ($this->phids !== null) { if ($this->phids !== null) {
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'conpherence_thread.phid IN (%Ls)', 'thread.phid IN (%Ls)',
$this->phids); $this->phids);
} }
@ -438,4 +438,8 @@ final class ConpherenceThreadQuery
return 'PhabricatorConpherenceApplication'; return 'PhabricatorConpherenceApplication';
} }
protected function getPrimaryTableAlias() {
return 'thread';
}
} }

View file

@ -47,11 +47,16 @@ final class ConpherenceParticipant extends ConpherenceDAO {
$this->setBehindTransactionPHID($xaction->getPHID()); $this->setBehindTransactionPHID($xaction->getPHID());
$this->setSeenMessageCount($conpherence->getMessageCount()); $this->setSeenMessageCount($conpherence->getMessageCount());
$this->save(); $this->save();
PhabricatorUserCache::clearCache(
PhabricatorUserMessageCountCacheType::KEY_COUNT,
$this->getParticipantPHID());
} }
return $this; return $this;
} }
private function isUpToDate(ConpherenceThread $conpherence) { public function isUpToDate(ConpherenceThread $conpherence) {
return return
($this->getSeenMessageCount() == $conpherence->getMessageCount()) ($this->getSeenMessageCount() == $conpherence->getMessageCount())
&& &&

View file

@ -108,7 +108,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
} }
protected function getTagContent() { protected function getTagContent() {
$column_key = PhabricatorUserPreferences::PREFERENCE_CONPHERENCE_COLUMN; $column_key = PhabricatorConpherenceColumnVisibleSetting::SETTINGKEY;
Javelin::initBehavior( Javelin::initBehavior(
'durable-column', 'durable-column',

View file

@ -17,30 +17,59 @@ final class DarkConsoleController extends PhabricatorController {
return true; return true;
} }
public function processRequest() { public function handleRequest(AphrontRequest $request) {
$request = $this->getRequest(); $viewer = $this->getViewer();
$user = $request->getUser();
$response = id(new AphrontAjaxResponse())->setDisableConsole(true); $response = id(new AphrontAjaxResponse())->setDisableConsole(true);
if (!$user->isLoggedIn()) { if (!$viewer->isLoggedIn()) {
return $response; return $response;
} }
$visible = $request->getStr('visible'); $visible = $request->getStr('visible');
if (strlen($visible)) { if (strlen($visible)) {
$user->setConsoleVisible((int)$visible); $this->writeDarkConsoleSetting(
$user->save(); PhabricatorDarkConsoleVisibleSetting::SETTINGKEY,
(int)$visible);
return $response; return $response;
} }
$tab = $request->getStr('tab'); $tab = $request->getStr('tab');
if (strlen($tab)) { if (strlen($tab)) {
$user->setConsoleTab($tab); $this->writeDarkConsoleSetting(
$user->save(); PhabricatorDarkConsoleTabSetting::SETTINGKEY,
$tab);
return $response; return $response;
} }
return new Aphront404Response(); 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();
}
} }

View file

@ -93,7 +93,8 @@ final class DarkConsoleCore extends Phobject {
public function render(AphrontRequest $request) { public function render(AphrontRequest $request) {
$user = $request->getUser(); $user = $request->getUser();
$visible = $user ? $user->getConsoleVisible() : true; $visible = $user->getUserSetting(
PhabricatorDarkConsoleVisibleSetting::SETTINGKEY);
return javelin_tag( return javelin_tag(
'div', 'div',

View file

@ -147,7 +147,7 @@ final class PhabricatorCountdownSearchEngine
$create_button = id(new PHUIButtonView()) $create_button = id(new PHUIButtonView())
->setTag('a') ->setTag('a')
->setText(pht('Create a Countdown')) ->setText(pht('Create a Countdown'))
->setHref('/countdown/create/') ->setHref('/countdown/edit/')
->setColor(PHUIButtonView::GREEN); ->setColor(PHUIButtonView::GREEN);
$icon = $this->getApplication()->getIcon(); $icon = $this->getApplication()->getIcon();

View file

@ -268,10 +268,10 @@ final class PhabricatorDashboardEditController
$request, $request,
$viewer, $viewer,
'query', 'query',
pht('Recent Tasks'), pht('Open Tasks'),
array( array(
'class' => 'ManiphestTaskSearchEngine', 'class' => 'ManiphestTaskSearchEngine',
'key' => 'all', 'key' => 'open',
)); ));
$panel_phids[] = $task_panel->getPHID(); $panel_phids[] = $task_panel->getPHID();

View file

@ -0,0 +1,18 @@
<?php
final class DifferentialRevisionSearchConduitAPIMethod
extends PhabricatorSearchEngineAPIMethod {
public function getAPIMethodName() {
return 'differential.revision.search';
}
public function newSearchEngine() {
return new DifferentialRevisionSearchEngine();
}
public function getMethodSummary() {
return pht('Read information about revisions.');
}
}

View file

@ -261,13 +261,14 @@ final class PhabricatorDifferentialConfigOptions
"that many lines. For instance, a value of 100 means 'inline ". "that many lines. For instance, a value of 100 means 'inline ".
"patches if they are no longer than 100 lines'. By default, ". "patches if they are no longer than 100 lines'. By default, ".
"patches are not inlined.")), "patches are not inlined.")),
// TODO: Implement 'enum'? Options are 'unified' or 'git'.
$this->newOption( $this->newOption(
'metamta.differential.patch-format', 'metamta.differential.patch-format',
'string', 'enum',
'unified') 'unified')
->setDescription( ->setDescription(
pht("Format for inlined or attached patches: 'git' or 'unified'.")), pht('Format for inlined or attached patches.'))
->setEnumOptions(
array('unified' => 'unified', 'git' => 'git')),
); );
} }

View file

@ -381,7 +381,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
$nav = null; $nav = null;
if ($filetree_on) { if ($filetree_on) {
$collapsed_key = PhabricatorUserPreferences::PREFERENCE_NAV_COLLAPSED; $collapsed_key = PhabricatorFiletreeVisibleSetting::SETTINGKEY;
$collapsed_value = $viewer->getUserSetting($collapsed_key); $collapsed_value = $viewer->getUserSetting($collapsed_key);
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder()) $nav = id(new DifferentialChangesetFileTreeSideNavBuilder())

View file

@ -626,6 +626,8 @@ abstract class DifferentialChangesetRenderer extends Phobject {
unset($old['unix:filemode']); unset($old['unix:filemode']);
} }
$metadata = $changeset->getMetadata();
if ($this->hasOldFile()) { if ($this->hasOldFile()) {
$file = $this->getOldFile(); $file = $this->getOldFile();
if ($file->getImageWidth()) { if ($file->getImageWidth()) {
@ -634,6 +636,12 @@ abstract class DifferentialChangesetRenderer extends Phobject {
} }
$old['file:mimetype'] = $file->getMimeType(); $old['file:mimetype'] = $file->getMimeType();
$old['file:size'] = phutil_format_bytes($file->getByteSize()); $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()) { if ($this->hasNewFile()) {
@ -644,6 +652,12 @@ abstract class DifferentialChangesetRenderer extends Phobject {
} }
$new['file:mimetype'] = $file->getMimeType(); $new['file:mimetype'] = $file->getMimeType();
$new['file:size'] = phutil_format_bytes($file->getByteSize()); $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); return array($old, $new);

View file

@ -32,6 +32,13 @@ abstract class DifferentialChangesetTestRenderer
$changeset = $this->getChangeset(); $changeset = $this->getChangeset();
list($old, $new) = $this->getChangesetProperties($changeset); 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) { if (!$old && !$new) {
return null; return null;
} }

View file

@ -14,7 +14,8 @@ final class DifferentialRevision extends DifferentialDAO
PhabricatorMentionableInterface, PhabricatorMentionableInterface,
PhabricatorDestructibleInterface, PhabricatorDestructibleInterface,
PhabricatorProjectInterface, PhabricatorProjectInterface,
PhabricatorFulltextInterface { PhabricatorFulltextInterface,
PhabricatorConduitResultInterface {
protected $title = ''; protected $title = '';
protected $originalTitle; 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();
}
} }

View file

@ -105,28 +105,31 @@ final class DiffusionBrowseController extends DiffusionController {
$path = $drequest->getPath(); $path = $drequest->getPath();
$preferences = $viewer->loadPreferences(); $blame_key = PhabricatorDiffusionBlameSetting::SETTINGKEY;
$color_key = PhabricatorDiffusionColorSetting::SETTINGKEY;
$show_blame = $request->getBool( $show_blame = $request->getBool(
'blame', 'blame',
$preferences->getPreference( $viewer->getUserSetting($blame_key));
PhabricatorUserPreferences::PREFERENCE_DIFFUSION_BLAME,
false));
$show_color = $request->getBool( $show_color = $request->getBool(
'color', 'color',
$preferences->getPreference( $viewer->getUserSetting($color_key));
PhabricatorUserPreferences::PREFERENCE_DIFFUSION_COLOR,
true));
$view = $request->getStr('view'); $view = $request->getStr('view');
if ($request->isFormPost() && $view != 'raw' && $viewer->isLoggedIn()) { if ($request->isFormPost() && $view != 'raw' && $viewer->isLoggedIn()) {
$preferences->setPreference( $preferences = PhabricatorUserPreferences::loadUserPreferences($viewer);
PhabricatorUserPreferences::PREFERENCE_DIFFUSION_BLAME,
$show_blame); $editor = id(new PhabricatorUserPreferencesEditor())
$preferences->setPreference( ->setActor($viewer)
PhabricatorUserPreferences::PREFERENCE_DIFFUSION_COLOR, ->setContentSourceFromRequest($request)
$show_color); ->setContinueOnNoEffect(true)
$preferences->save(); ->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() $uri = $request->getRequestURI()
->alter('blame', null) ->alter('blame', null)

View file

@ -329,7 +329,7 @@ final class DiffusionCommitController extends DiffusionController {
PhabricatorShowFiletreeSetting::SETTINGKEY, PhabricatorShowFiletreeSetting::SETTINGKEY,
PhabricatorShowFiletreeSetting::VALUE_ENABLE_FILETREE); PhabricatorShowFiletreeSetting::VALUE_ENABLE_FILETREE);
$pref_collapse = PhabricatorUserPreferences::PREFERENCE_NAV_COLLAPSED; $pref_collapse = PhabricatorFiletreeVisibleSetting::SETTINGKEY;
$collapsed = $viewer->getUserSetting($pref_collapse); $collapsed = $viewer->getUserSetting($pref_collapse);
$nav = null; $nav = null;

View file

@ -2,7 +2,11 @@
final class DiffusionSetPasswordSettingsPanel extends PhabricatorSettingsPanel { final class DiffusionSetPasswordSettingsPanel extends PhabricatorSettingsPanel {
public function isEditableByAdministrators() { public function isManagementPanel() {
if ($this->getUser()->getIsMailingList()) {
return false;
}
return true; return true;
} }
@ -14,15 +18,11 @@ final class DiffusionSetPasswordSettingsPanel extends PhabricatorSettingsPanel {
return pht('VCS Password'); return pht('VCS Password');
} }
public function getPanelGroup() { public function getPanelGroupKey() {
return pht('Authentication'); return PhabricatorSettingsAuthenticationPanelGroup::PANELGROUPKEY;
} }
public function isEnabled() { public function isEnabled() {
if ($this->getUser()->getIsMailingList()) {
return false;
}
return PhabricatorEnv::getEnvConfig('diffusion.allow-http-auth'); return PhabricatorEnv::getEnvConfig('diffusion.allow-http-auth');
} }

View file

@ -9,6 +9,7 @@ abstract class DiffusionCommandEngine extends Phobject {
private $passthru; private $passthru;
private $connectAsDevice; private $connectAsDevice;
private $sudoAsDaemon; private $sudoAsDaemon;
private $uri;
public static function newCommandEngine(PhabricatorRepository $repository) { public static function newCommandEngine(PhabricatorRepository $repository) {
$engines = self::newCommandEngines(); $engines = self::newCommandEngines();
@ -48,6 +49,16 @@ abstract class DiffusionCommandEngine extends Phobject {
return $this->repository; 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) { public function setProtocol($protocol) {
$this->protocol = $protocol; $this->protocol = $protocol;
return $this; return $this;

View file

@ -30,6 +30,21 @@ final class DiffusionGitCommandEngine
$env['GIT_SSH'] = $this->getSSHWrapper(); $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; return $env;
} }

View file

@ -598,7 +598,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
->setArgv($argv) ->setArgv($argv)
->setSudoAsDaemon(true) ->setSudoAsDaemon(true)
->setCredentialPHID($repository->getCredentialPHID()) ->setCredentialPHID($repository->getCredentialPHID())
->setProtocol($repository->getRemoteProtocol()) ->setURI($repository->getRemoteURI())
->newFuture(); ->newFuture();
$future->setCWD($local_path); $future->setCWD($local_path);
@ -704,7 +704,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
->setArgv($argv) ->setArgv($argv)
->setConnectAsDevice(true) ->setConnectAsDevice(true)
->setSudoAsDaemon(true) ->setSudoAsDaemon(true)
->setProtocol($fetch_uri->getProtocol()) ->setURI($fetch_uri)
->newFuture(); ->newFuture();
$future->setCWD($local_path); $future->setCWD($local_path);

View file

@ -159,7 +159,8 @@ final class PhabricatorFeedStoryPublisher extends Phobject {
$will_receive_mail = array_fill_keys($this->mailRecipientPHIDs, true); $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])) { if (isset($will_receive_mail[$user_phid])) {
$mark_read = 1; $mark_read = 1;
} else { } else {
@ -184,6 +185,10 @@ final class PhabricatorFeedStoryPublisher extends Phobject {
$notif->getTableName(), $notif->getTableName(),
implode(', ', $sql)); implode(', ', $sql));
} }
PhabricatorUserCache::clearCaches(
PhabricatorUserNotificationCountCacheType::KEY_COUNT,
$user_phids);
} }
private function sendNotification($chrono_key, array $subscribed_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'); $all_prefs = mpull($all_prefs, null, 'getUserPHID');
} }
$pref_default = PhabricatorUserPreferences::MAILTAG_PREFERENCE_EMAIL; $pref_default = PhabricatorEmailTagsSetting::VALUE_EMAIL;
$pref_ignore = PhabricatorUserPreferences::MAILTAG_PREFERENCE_IGNORE; $pref_ignore = PhabricatorEmailTagsSetting::VALUE_IGNORE;
$keep = array(); $keep = array();
foreach ($phids as $phid) { foreach ($phids as $phid) {
@ -224,9 +229,8 @@ final class PhabricatorFeedStoryPublisher extends Phobject {
} }
if ($tags && isset($all_prefs[$phid])) { if ($tags && isset($all_prefs[$phid])) {
$mailtags = $all_prefs[$phid]->getPreference( $mailtags = $all_prefs[$phid]->getSettingValue(
PhabricatorUserPreferences::PREFERENCE_MAILTAGS, PhabricatorEmailTagsSetting::SETTINGKEY);
array());
$notify = false; $notify = false;
foreach ($tags as $tag) { foreach ($tags as $tag) {

View file

@ -81,7 +81,8 @@ final class PhabricatorFilesApplication extends PhabricatorApplication {
'proxy/' => 'PhabricatorFileProxyController', 'proxy/' => 'PhabricatorFileProxyController',
'transforms/(?P<id>[1-9]\d*)/' => 'transforms/(?P<id>[1-9]\d*)/' =>
'PhabricatorFileTransformListController', 'PhabricatorFileTransformListController',
'uploaddialog/' => 'PhabricatorFileUploadDialogController', 'uploaddialog/(?P<single>single/)?'
=> 'PhabricatorFileUploadDialogController',
'download/(?P<phid>[^/]+)/' => 'PhabricatorFileDialogController', 'download/(?P<phid>[^/]+)/' => 'PhabricatorFileDialogController',
'iconset/(?P<key>[^/]+)/' => array( 'iconset/(?P<key>[^/]+)/' => array(
'select/' => 'PhabricatorFileIconSetSelectController', 'select/' => 'PhabricatorFileIconSetSelectController',

View file

@ -34,9 +34,16 @@ final class PhabricatorFilesConfigOptions
'image/x-icon' => 'image/x-icon', 'image/x-icon' => 'image/x-icon',
'image/vnd.microsoft.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', 'application/ogg' => 'application/ogg',
'audio/x-wav' => 'audio/x-wav',
'audio/mpeg' => 'audio/mpeg', 'audio/mpeg' => 'audio/mpeg',
'audio/ogg' => 'audio/ogg',
'video/mp4' => 'video/mp4',
'video/ogg' => 'video/ogg',
'video/webm' => 'video/webm',
); );
$image_default = array( $image_default = array(
@ -49,10 +56,29 @@ final class PhabricatorFilesConfigOptions
'image/vnd.microsoft.icon' => true, '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_default = array(
'audio/x-wav' => true, 'audio/x-wav' => true,
'application/ogg' => true,
'audio/mpeg' => 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,
); );
// largely lifted from http://en.wikipedia.org/wiki/Internet_media_type // largely lifted from http://en.wikipedia.org/wiki/Internet_media_type
@ -70,6 +96,7 @@ final class PhabricatorFilesConfigOptions
// movie file icon // movie file icon
'video/mpeg' => 'fa-file-movie-o', 'video/mpeg' => 'fa-file-movie-o',
'video/mp4' => 'fa-file-movie-o', 'video/mp4' => 'fa-file-movie-o',
'application/ogg' => 'fa-file-movie-o',
'video/ogg' => 'fa-file-movie-o', 'video/ogg' => 'fa-file-movie-o',
'video/quicktime' => 'fa-file-movie-o', 'video/quicktime' => 'fa-file-movie-o',
'video/webm' => '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.')) ->setSummary(pht('Configure which MIME types are audio.'))
->setDescription( ->setDescription(
pht( 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.',
'<audio />')), '<audio />')),
$this->newOption('files.video-mime-types', 'set', $video_default)
->setSummary(pht('Configure which MIME types are video.'))
->setDescription(
pht(
'List of MIME types which can be rendered with a `%s` tag.',
'<video />')),
$this->newOption('files.icon-mime-types', 'wild', $icon_default) $this->newOption('files.icon-mime-types', 'wild', $icon_default)
->setLocked(true) ->setLocked(true)
->setSummary(pht('Configure which MIME types map to which icons.')) ->setSummary(pht('Configure which MIME types map to which icons.'))

View file

@ -230,23 +230,34 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
$cache_string = pht('Not Applicable'); $cache_string = pht('Not Applicable');
} }
$finfo->addProperty(pht('Viewable Image'), $image_string); $types = array();
$finfo->addProperty(pht('Cacheable'), $cache_string); if ($file->isViewableImage()) {
$types[] = pht('Image');
$builtin = $file->getBuiltinName();
if ($builtin === null) {
$builtin_string = pht('No');
} else {
$builtin_string = $builtin;
} }
$finfo->addProperty(pht('Builtin'), $builtin_string); if ($file->isVideo()) {
$types[] = pht('Video');
}
$is_profile = $file->getIsProfileImage() if ($file->isAudio()) {
? pht('Yes') $types[] = pht('Audio');
: pht('No'); }
$finfo->addProperty(pht('Profile'), $is_profile); if ($file->getCanCDN()) {
$types[] = pht('Can CDN');
}
$builtin = $file->getBuiltinName();
if ($builtin !== null) {
$types[] = pht('Builtin ("%s")', $builtin);
}
if ($file->getIsProfileImage()) {
$types[] = pht('Profile');
}
$types = implode(', ', $types);
$finfo->addProperty(pht('Attributes'), $types);
$storage_properties = new PHUIPropertyListView(); $storage_properties = new PHUIPropertyListView();
$box->addPropertyList($storage_properties, pht('Storage')); $box->addPropertyList($storage_properties, pht('Storage'));
@ -292,6 +303,23 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
$media = id(new PHUIPropertyListView()) $media = id(new PHUIPropertyListView())
->addImageContent($linked_image); ->addImageContent($linked_image);
$box->addPropertyList($media);
} else if ($file->isVideo()) {
$video = phutil_tag(
'video',
array(
'controls' => 'controls',
'class' => 'phui-property-list-video',
),
phutil_tag(
'source',
array(
'src' => $file->getViewURI(),
'type' => $file->getMimeType(),
)));
$media = id(new PHUIPropertyListView())
->addImageContent($video);
$box->addPropertyList($media); $box->addPropertyList($media);
} else if ($file->isAudio()) { } else if ($file->isAudio()) {
$audio = phutil_tag( $audio = phutil_tag(

View file

@ -37,12 +37,18 @@ final class PhabricatorFileUploadDialogController
} }
} }
if ($request->getURIData('single')) {
$allow_multiple = false;
} else {
$allow_multiple = true;
}
$form = id(new AphrontFormView()) $form = id(new AphrontFormView())
->appendChild( ->appendChild(
id(new PHUIFormFileControl()) id(new PHUIFormFileControl())
->setName('filePHIDs') ->setName('filePHIDs')
->setLabel(pht('Upload File')) ->setLabel(pht('Upload File'))
->setAllowMultiple(true) ->setAllowMultiple($allow_multiple)
->setError($e_file)); ->setError($e_file));
return $this->newDialog() return $this->newDialog()

View file

@ -43,12 +43,27 @@ final class PhabricatorEmbedFileRemarkupRule
$is_viewable_image = $object->isViewableImage(); $is_viewable_image = $object->isViewableImage();
$is_audio = $object->isAudio(); $is_audio = $object->isAudio();
$is_video = $object->isVideo();
$force_link = ($options['layout'] == 'link'); $force_link = ($options['layout'] == 'link');
$options['viewable'] = ($is_viewable_image || $is_audio); // If a file is both audio and video, as with "application/ogg" by default,
// render it as video but allow the user to specify `media=audio` if they
// want to force it to render as audio.
if ($is_audio && $is_video) {
$media = $options['media'];
if ($media == 'audio') {
$is_video = false;
} else {
$is_audio = false;
}
}
$options['viewable'] = ($is_viewable_image || $is_audio || $is_video);
if ($is_viewable_image && !$force_link) { if ($is_viewable_image && !$force_link) {
return $this->renderImageFile($object, $handle, $options); return $this->renderImageFile($object, $handle, $options);
} else if ($is_video && !$force_link) {
return $this->renderVideoFile($object, $handle, $options);
} else if ($is_audio && !$force_link) { } else if ($is_audio && !$force_link) {
return $this->renderAudioFile($object, $handle, $options); return $this->renderAudioFile($object, $handle, $options);
} else { } else {
@ -64,6 +79,9 @@ final class PhabricatorEmbedFileRemarkupRule
'width' => null, 'width' => null,
'height' => null, 'height' => null,
'alt' => null, 'alt' => null,
'media' => null,
'autoplay' => null,
'loop' => null,
); );
if ($option_string) { if ($option_string) {
@ -201,22 +219,47 @@ final class PhabricatorEmbedFileRemarkupRule
PhabricatorFile $file, PhabricatorFile $file,
PhabricatorObjectHandle $handle, PhabricatorObjectHandle $handle,
array $options) { array $options) {
return $this->renderMediaFile('audio', $file, $handle, $options);
}
private function renderVideoFile(
PhabricatorFile $file,
PhabricatorObjectHandle $handle,
array $options) {
return $this->renderMediaFile('video', $file, $handle, $options);
}
private function renderMediaFile(
$tag,
PhabricatorFile $file,
PhabricatorObjectHandle $handle,
array $options) {
$is_video = ($tag == 'video');
if (idx($options, 'autoplay')) { if (idx($options, 'autoplay')) {
$preload = 'auto'; $preload = 'auto';
$autoplay = 'autoplay'; $autoplay = 'autoplay';
} else {
// If we don't preload video, the user can't see the first frame and
// has no clue what they're looking at, so always preload.
if ($is_video) {
$preload = 'auto';
} else { } else {
$preload = 'none'; $preload = 'none';
}
$autoplay = null; $autoplay = null;
} }
return $this->newTag( return $this->newTag(
'audio', $tag,
array( array(
'controls' => 'controls', 'controls' => 'controls',
'preload' => $preload, 'preload' => $preload,
'autoplay' => $autoplay, 'autoplay' => $autoplay,
'loop' => idx($options, 'loop') ? 'loop' : null, 'loop' => idx($options, 'loop') ? 'loop' : null,
'alt' => $options['alt'],
'class' => 'phabricator-media',
), ),
$this->newTag( $this->newTag(
'source', 'source',

View file

@ -134,6 +134,9 @@ final class PhabricatorFileQuery
return $files; return $files;
} }
$viewer = $this->getViewer();
$is_omnipotent = $viewer->isOmnipotent();
// We need to load attached objects to perform policy checks for files. // We need to load attached objects to perform policy checks for files.
// First, load the edges. // First, load the edges.
@ -156,6 +159,13 @@ final class PhabricatorFileQuery
continue; continue;
} }
if ($is_omnipotent) {
// If the viewer is omnipotent, we don't need to load the associated
// objects either since they can certainly see the object. Skipping
// this can improve performance and prevent cycles.
continue;
}
foreach ($phids as $phid) { foreach ($phids as $phid) {
$object_phids[$phid] = true; $object_phids[$phid] = true;
} }

View file

@ -802,6 +802,16 @@ final class PhabricatorFile extends PhabricatorFileDAO
return idx($mime_map, $mime_type); return idx($mime_map, $mime_type);
} }
public function isVideo() {
if (!$this->isViewableInBrowser()) {
return false;
}
$mime_map = PhabricatorEnv::getEnvConfig('files.video-mime-types');
$mime_type = $this->getMimeType();
return idx($mime_map, $mime_type);
}
public function isTransformableImage() { public function isTransformableImage() {
// NOTE: The way the 'gd' extension works in PHP is that you can install it // NOTE: The way the 'gd' extension works in PHP is that you can install it
// with support for only some file types, so it might be able to handle // with support for only some file types, so it might be able to handle

View file

@ -2,6 +2,7 @@
final class PhabricatorHomeApplication extends PhabricatorApplication { final class PhabricatorHomeApplication extends PhabricatorApplication {
private $quickItems;
const DASHBOARD_DEFAULT = 'dashboard:default'; const DASHBOARD_DEFAULT = 'dashboard:default';
public function getBaseURI() { public function getBaseURI() {
@ -42,13 +43,14 @@ final class PhabricatorHomeApplication extends PhabricatorApplication {
PhabricatorUser $user, PhabricatorUser $user,
PhabricatorController $controller = null) { PhabricatorController $controller = null) {
$quick_create_items = $this->loadAllQuickCreateItems($user); $quick_items = $this->getQuickActionItems($user);
$items = array(); if (!$quick_items) {
return array();
}
if ($user->isLoggedIn() && $items = array();
$user->isUserActivated() &&
$quick_create_items) {
$create_id = celerity_generate_unique_node_id(); $create_id = celerity_generate_unique_node_id();
Javelin::initBehavior( Javelin::initBehavior(
'aphlict-dropdown', 'aphlict-dropdown',
array( array(
@ -60,33 +62,15 @@ final class PhabricatorHomeApplication extends PhabricatorApplication {
)); ));
$item = id(new PHUIListItemView()) $item = id(new PHUIListItemView())
->setName(pht('Create New...')) ->setName(pht('Quick Actions'))
->setIcon('fa-plus') ->setIcon('fa-plus')
->addClass('core-menu-item') ->addClass('core-menu-item')
->setHref('/home/create/') ->setHref('/home/create/')
->addSigil('quick-create-menu') ->addSigil('quick-create-menu')
->setID($create_id) ->setID($create_id)
->setAural(pht('Quick Create')) ->setAural(pht('Quick Actions'))
->setOrder(300); ->setOrder(300);
$items[] = $item; $items[] = $item;
}
return $items;
}
public function loadAllQuickCreateItems(PhabricatorUser $viewer) {
$applications = id(new PhabricatorApplicationQuery())
->setViewer($viewer)
->withInstalled(true)
->execute();
$items = array();
foreach ($applications as $application) {
$app_items = $application->getQuickCreateItems($viewer);
foreach ($app_items as $app_item) {
$items[] = $app_item;
}
}
return $items; return $items;
} }
@ -95,7 +79,7 @@ final class PhabricatorHomeApplication extends PhabricatorApplication {
PhabricatorUser $viewer, PhabricatorUser $viewer,
PhabricatorController $controller = null) { PhabricatorController $controller = null) {
$items = $this->loadAllQuickCreateItems($viewer); $items = $this->getQuickActionItems($viewer);
$view = null; $view = null;
if ($items) { if ($items) {
@ -116,4 +100,12 @@ final class PhabricatorHomeApplication extends PhabricatorApplication {
return $view; return $view;
} }
private function getQuickActionItems(PhabricatorUser $viewer) {
if ($this->quickItems === null) {
$items = PhabricatorQuickActions::loadMenuItemsForUser($viewer);
$this->quickItems = $items;
}
return $this->quickItems;
}
} }

View file

@ -15,9 +15,8 @@ abstract class PhabricatorHomeController extends PhabricatorController {
->withLaunchable(true) ->withLaunchable(true)
->execute(); ->execute();
$pinned = $user->loadPreferences()->getPinnedApplications( $pinned = $user->getUserSetting(
$applications, PhabricatorPinnedApplicationsSetting::SETTINGKEY);
$user);
// Force "Applications" to appear at the bottom. // Force "Applications" to appear at the bottom.
$meta_app = 'PhabricatorApplicationsApplication'; $meta_app = 'PhabricatorApplicationsApplication';

View file

@ -6,7 +6,7 @@ final class PhabricatorHomeQuickCreateController
public function handleRequest(AphrontRequest $request) { public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$items = $this->getCurrentApplication()->loadAllQuickCreateItems($viewer); $items = PhabricatorQuickActions::loadMenuItemsForUser($viewer);
$list = id(new PHUIObjectItemListView()) $list = id(new PHUIObjectItemListView())
->setUser($viewer); ->setUser($viewer);

View file

@ -90,12 +90,6 @@ final class PhabricatorManiphestApplication extends PhabricatorApplication {
return $status; return $status;
} }
public function getQuickCreateItems(PhabricatorUser $viewer) {
return id(new ManiphestEditEngine())
->setViewer($viewer)
->loadQuickCreateItems();
}
public function supportsEmailIntegration() { public function supportsEmailIntegration() {
return true; return true;
} }

View file

@ -59,6 +59,7 @@ final class PhabricatorMetaMTAActorQuery extends PhabricatorQuery {
$users = id(new PhabricatorPeopleQuery()) $users = id(new PhabricatorPeopleQuery())
->setViewer($this->getViewer()) ->setViewer($this->getViewer())
->withPHIDs($phids) ->withPHIDs($phids)
->needUserSettings(true)
->execute(); ->execute();
$users = mpull($users, null, 'getPHID'); $users = mpull($users, null, 'getPHID');

View file

@ -337,9 +337,12 @@ abstract class PhabricatorMailReplyHandler extends Phobject {
$all_phids = array_merge($to, $cc); $all_phids = array_merge($to, $cc);
if ($all_phids) { if ($all_phids) {
// We need user settings here because we'll check translations later
// when generating mail.
$users = id(new PhabricatorPeopleQuery()) $users = id(new PhabricatorPeopleQuery())
->setViewer(PhabricatorUser::getOmnipotentUser()) ->setViewer(PhabricatorUser::getOmnipotentUser())
->withPHIDs($all_phids) ->withPHIDs($all_phids)
->needUserSettings(true)
->execute(); ->execute();
$users = mpull($users, null, 'getPHID'); $users = mpull($users, null, 'getPHID');

View file

@ -435,13 +435,6 @@ final class PhabricatorMetaMTAMail
$add_cc = array(); $add_cc = array();
$add_to = array(); $add_to = array();
// Only try to use preferences if everything is multiplexed, so we
// get consistent behavior.
$use_prefs = self::shouldMultiplexAllMail();
$prefs = null;
if ($use_prefs) {
// If multiplexing is enabled, some recipients will be in "Cc" // If multiplexing is enabled, some recipients will be in "Cc"
// rather than "To". We'll move them to "To" later (or supply a // rather than "To". We'll move them to "To" later (or supply a
// dummy "To") but need to look for the recipient in either the // dummy "To") but need to look for the recipient in either the
@ -451,15 +444,7 @@ final class PhabricatorMetaMTAMail
$target_phid = head(idx($params, 'cc', array())); $target_phid = head(idx($params, 'cc', array()));
} }
if ($target_phid) { $preferences = $this->loadPreferences($target_phid);
$user = id(new PhabricatorUser())->loadOneWhere(
'phid = %s',
$target_phid);
if ($user) {
$prefs = $user->loadPreferences();
}
}
}
foreach ($params as $key => $value) { foreach ($params as $key => $value) {
switch ($key) { switch ($key) {
@ -526,15 +511,7 @@ final class PhabricatorMetaMTAMail
$subject = array(); $subject = array();
if ($is_threaded) { if ($is_threaded) {
$add_re = PhabricatorEnv::getEnvConfig('metamta.re-prefix'); if ($this->shouldAddRePrefix($preferences)) {
if ($prefs) {
$add_re = $prefs->getPreference(
PhabricatorUserPreferences::PREFERENCE_RE_PREFIX,
$add_re);
}
if ($add_re) {
$subject[] = 'Re:'; $subject[] = 'Re:';
} }
} }
@ -543,16 +520,7 @@ final class PhabricatorMetaMTAMail
$vary_prefix = idx($params, 'vary-subject-prefix'); $vary_prefix = idx($params, 'vary-subject-prefix');
if ($vary_prefix != '') { if ($vary_prefix != '') {
$use_subject = PhabricatorEnv::getEnvConfig( if ($this->shouldVarySubject($preferences)) {
'metamta.vary-subjects');
if ($prefs) {
$use_subject = $prefs->getPreference(
PhabricatorUserPreferences::PREFERENCE_VARY_SUBJECT,
$use_subject);
}
if ($use_subject) {
$subject[] = $vary_prefix; $subject[] = $vary_prefix;
} }
} }
@ -607,13 +575,7 @@ final class PhabricatorMetaMTAMail
} }
$mailer->setBody($body); $mailer->setBody($body);
$html_emails = true; $html_emails = $this->shouldSendHTML($preferences);
if ($use_prefs && $prefs) {
$html_emails = $prefs->getPreference(
PhabricatorUserPreferences::PREFERENCE_HTML_EMAILS,
$html_emails);
}
if ($html_emails && isset($params['html-body'])) { if ($html_emails && isset($params['html-body'])) {
$mailer->setHTMLBody($params['html-body']); $mailer->setHTMLBody($params['html-body']);
} }
@ -900,13 +862,12 @@ final class PhabricatorMetaMTAMail
$from_user = id(new PhabricatorPeopleQuery()) $from_user = id(new PhabricatorPeopleQuery())
->setViewer($viewer) ->setViewer($viewer)
->withPHIDs(array($from_phid)) ->withPHIDs(array($from_phid))
->needUserSettings(true)
->execute(); ->execute();
$from_user = head($from_user); $from_user = head($from_user);
if ($from_user) { if ($from_user) {
$pref_key = PhabricatorUserPreferences::PREFERENCE_NO_SELF_MAIL; $pref_key = PhabricatorEmailSelfActionsSetting::SETTINGKEY;
$exclude_self = $from_user $exclude_self = $from_user->getUserSetting($pref_key);
->loadPreferences()
->getPreference($pref_key);
if ($exclude_self) { if ($exclude_self) {
$from_actor->setUndeliverable(PhabricatorMetaMTAActor::REASON_SELF); $from_actor->setUndeliverable(PhabricatorMetaMTAActor::REASON_SELF);
} }
@ -919,7 +880,7 @@ final class PhabricatorMetaMTAMail
->execute(); ->execute();
$all_prefs = mpull($all_prefs, null, 'getUserPHID'); $all_prefs = mpull($all_prefs, null, 'getUserPHID');
$value_email = PhabricatorUserPreferences::MAILTAG_PREFERENCE_EMAIL; $value_email = PhabricatorEmailTagsSetting::VALUE_EMAIL;
// Exclude all recipients who have set preferences to not receive this type // Exclude all recipients who have set preferences to not receive this type
// of email (for example, a user who says they don't want emails about task // of email (for example, a user who says they don't want emails about task
@ -927,9 +888,8 @@ final class PhabricatorMetaMTAMail
$tags = $this->getParam('mailtags'); $tags = $this->getParam('mailtags');
if ($tags) { if ($tags) {
foreach ($all_prefs as $phid => $prefs) { foreach ($all_prefs as $phid => $prefs) {
$user_mailtags = $prefs->getPreference( $user_mailtags = $prefs->getSettingValue(
PhabricatorUserPreferences::PREFERENCE_MAILTAGS, PhabricatorEmailTagsSetting::SETTINGKEY);
array());
// The user must have elected to receive mail for at least one // The user must have elected to receive mail for at least one
// of the mailtags. // of the mailtags.
@ -982,9 +942,8 @@ final class PhabricatorMetaMTAMail
// Exclude recipients who don't want any mail. This rule is very strong // Exclude recipients who don't want any mail. This rule is very strong
// and runs last. // and runs last.
foreach ($all_prefs as $phid => $prefs) { foreach ($all_prefs as $phid => $prefs) {
$exclude = $prefs->getPreference( $exclude = $prefs->getSettingValue(
PhabricatorUserPreferences::PREFERENCE_NO_MAIL, PhabricatorEmailNotificationsSetting::SETTINGKEY);
false);
if ($exclude) { if ($exclude) {
$actors[$phid]->setUndeliverable( $actors[$phid]->setUndeliverable(
PhabricatorMetaMTAActor::REASON_MAIL_DISABLED); PhabricatorMetaMTAActor::REASON_MAIL_DISABLED);
@ -1142,6 +1101,67 @@ final class PhabricatorMetaMTAMail
return $this->routingMap; return $this->routingMap;
} }
/* -( Preferences )-------------------------------------------------------- */
private function loadPreferences($target_phid) {
if (!self::shouldMultiplexAllMail()) {
$target_phid = null;
}
if ($target_phid) {
$preferences = id(new PhabricatorUserPreferencesQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withUserPHIDs(array($target_phid))
->executeOne();
} else {
$preferences = null;
}
// TODO: Here, we would load global preferences once they exist.
if (!$preferences) {
// If we haven't found suitable preferences yet, return an empty object
// which implicitly has all the default values.
$preferences = id(new PhabricatorUserPreferences())
->attachUser(new PhabricatorUser());
}
return $preferences;
}
private function shouldAddRePrefix(PhabricatorUserPreferences $preferences) {
$default_value = PhabricatorEnv::getEnvConfig('metamta.re-prefix');
$value = $preferences->getPreference(
PhabricatorEmailRePrefixSetting::SETTINGKEY);
if ($value === null) {
return $default_value;
}
return ($value == PhabricatorEmailRePrefixSetting::VALUE_RE_PREFIX);
}
private function shouldVarySubject(PhabricatorUserPreferences $preferences) {
$default_value = PhabricatorEnv::getEnvConfig('metamta.vary-subjects');
$value = $preferences->getPreference(
PhabricatorEmailVarySubjectsSetting::SETTINGKEY);
if ($value === null) {
return $default_value;
}
return ($value == PhabricatorEmailVarySubjectsSetting::VALUE_VARY_SUBJECTS);
}
private function shouldSendHTML(PhabricatorUserPreferences $preferences) {
$value = $preferences->getSettingValue(
PhabricatorEmailFormatSetting::SETTINGKEY);
return ($value == PhabricatorEmailFormatSetting::VALUE_HTML_EMAIL);
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */ /* -( PhabricatorPolicyInterface )----------------------------------------- */

View file

@ -60,8 +60,6 @@ final class PhabricatorMetaMTAMailTestCase extends PhabricatorTestCase {
$user = $this->generateNewTestUser(); $user = $this->generateNewTestUser();
$phid = $user->getPHID(); $phid = $user->getPHID();
$prefs = $user->loadPreferences();
$mailer = new PhabricatorMailImplementationTestAdapter(); $mailer = new PhabricatorMailImplementationTestAdapter();
$mail = new PhabricatorMetaMTAMail(); $mail = new PhabricatorMetaMTAMail();
@ -79,27 +77,28 @@ final class PhabricatorMetaMTAMailTestCase extends PhabricatorTestCase {
in_array($phid, $mail->buildRecipientList()), in_array($phid, $mail->buildRecipientList()),
pht('"From" does not exclude recipients by default.')); pht('"From" does not exclude recipients by default.'));
$prefs->setPreference( $user = $this->writeSetting(
PhabricatorUserPreferences::PREFERENCE_NO_SELF_MAIL, $user,
PhabricatorEmailSelfActionsSetting::SETTINGKEY,
true); true);
$prefs->save();
$this->assertFalse( $this->assertFalse(
in_array($phid, $mail->buildRecipientList()), in_array($phid, $mail->buildRecipientList()),
pht('"From" excludes recipients with no-self-mail set.')); pht('"From" excludes recipients with no-self-mail set.'));
$prefs->unsetPreference( $user = $this->writeSetting(
PhabricatorUserPreferences::PREFERENCE_NO_SELF_MAIL); $user,
$prefs->save(); PhabricatorEmailSelfActionsSetting::SETTINGKEY,
null);
$this->assertTrue( $this->assertTrue(
in_array($phid, $mail->buildRecipientList()), in_array($phid, $mail->buildRecipientList()),
pht('"From" does not exclude recipients by default.')); pht('"From" does not exclude recipients by default.'));
$prefs->setPreference( $user = $this->writeSetting(
PhabricatorUserPreferences::PREFERENCE_NO_MAIL, $user,
PhabricatorEmailNotificationsSetting::SETTINGKEY,
true); true);
$prefs->save();
$this->assertFalse( $this->assertFalse(
in_array($phid, $mail->buildRecipientList()), in_array($phid, $mail->buildRecipientList()),
@ -113,15 +112,15 @@ final class PhabricatorMetaMTAMailTestCase extends PhabricatorTestCase {
$mail->setForceDelivery(false); $mail->setForceDelivery(false);
$prefs->unsetPreference( $user = $this->writeSetting(
PhabricatorUserPreferences::PREFERENCE_NO_MAIL); $user,
$prefs->save(); PhabricatorEmailNotificationsSetting::SETTINGKEY,
null);
$this->assertTrue( $this->assertTrue(
in_array($phid, $mail->buildRecipientList()), in_array($phid, $mail->buildRecipientList()),
pht('"From" does not exclude recipients by default.')); pht('"From" does not exclude recipients by default.'));
// Test that explicit exclusion works correctly. // Test that explicit exclusion works correctly.
$mail->setExcludeMailRecipientPHIDs(array($phid)); $mail->setExcludeMailRecipientPHIDs(array($phid));
@ -133,12 +132,12 @@ final class PhabricatorMetaMTAMailTestCase extends PhabricatorTestCase {
// Test that mail tag preferences exclude recipients. // Test that mail tag preferences exclude recipients.
$prefs->setPreference( $user = $this->writeSetting(
PhabricatorUserPreferences::PREFERENCE_MAILTAGS, $user,
PhabricatorEmailTagsSetting::SETTINGKEY,
array( array(
'test-tag' => false, 'test-tag' => false,
)); ));
$prefs->save();
$mail->setMailTags(array('test-tag')); $mail->setMailTags(array('test-tag'));
@ -146,8 +145,10 @@ final class PhabricatorMetaMTAMailTestCase extends PhabricatorTestCase {
in_array($phid, $mail->buildRecipientList()), in_array($phid, $mail->buildRecipientList()),
pht('Tag preference excludes recipients.')); pht('Tag preference excludes recipients.'));
$prefs->unsetPreference(PhabricatorUserPreferences::PREFERENCE_MAILTAGS); $user = $this->writeSetting(
$prefs->save(); $user,
PhabricatorEmailTagsSetting::SETTINGKEY,
null);
$this->assertTrue( $this->assertTrue(
in_array($phid, $mail->buildRecipientList()), in_array($phid, $mail->buildRecipientList()),
@ -215,4 +216,23 @@ final class PhabricatorMetaMTAMailTestCase extends PhabricatorTestCase {
$case)); $case));
} }
private function writeSetting(PhabricatorUser $user, $key, $value) {
$preferences = PhabricatorUserPreferences::loadUserPreferences($user);
$editor = id(new PhabricatorUserPreferencesEditor())
->setActor($user)
->setContentSource($this->newContentSource())
->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true);
$xactions = array();
$xactions[] = $preferences->newTransaction($key, $value);
$editor->applyTransactions($preferences, $xactions);
return id(new PhabricatorPeopleQuery())
->setViewer($user)
->withIDs(array($user->getID()))
->executeOne();
}
} }

View file

@ -131,10 +131,14 @@ final class PhabricatorNotificationBuilder extends Phobject {
$stories = $this->parseStories(); $stories = $this->parseStories();
$dict = array(); $dict = array();
$viewer = $this->user;
$desktop_key = PhabricatorDesktopNotificationsSetting::SETTINGKEY;
$desktop_enabled = $viewer->getUserSetting($desktop_key);
foreach ($stories as $story) { foreach ($stories as $story) {
if ($story instanceof PhabricatorApplicationTransactionFeedStory) { if ($story instanceof PhabricatorApplicationTransactionFeedStory) {
$dict[] = array( $dict[] = array(
'desktopReady' => true, 'desktopReady' => $desktop_enabled,
'title' => $story->renderText(), 'title' => $story->renderText(),
'body' => $story->renderTextBody(), 'body' => $story->renderTextBody(),
'href' => $story->getURI(), 'href' => $story->getURI(),
@ -142,7 +146,7 @@ final class PhabricatorNotificationBuilder extends Phobject {
); );
} else if ($story instanceof PhabricatorNotificationTestFeedStory) { } else if ($story instanceof PhabricatorNotificationTestFeedStory) {
$dict[] = array( $dict[] = array(
'desktopReady' => true, 'desktopReady' => $desktop_enabled,
'title' => pht('Test Notification'), 'title' => pht('Test Notification'),
'body' => $story->renderText(), 'body' => $story->renderText(),
'href' => null, 'href' => null,

View file

@ -18,6 +18,10 @@ final class PhabricatorNotificationClearController
$viewer->getPHID(), $viewer->getPHID(),
$chrono_key); $chrono_key);
PhabricatorUserCache::clearCache(
PhabricatorUserNotificationCountCacheType::KEY_COUNT,
$viewer->getPHID());
return id(new AphrontReloadResponse()) return id(new AphrontReloadResponse())
->setURI('/notification/'); ->setURI('/notification/');
} }

View file

@ -30,7 +30,9 @@ final class PhabricatorNotificationIndividualController
return $this->buildEmptyResponse(); return $this->buildEmptyResponse();
} }
$builder = new PhabricatorNotificationBuilder(array($story)); $builder = id(new PhabricatorNotificationBuilder(array($story)))
->setUser($viewer);
$content = $builder->buildView()->render(); $content = $builder->buildView()->render();
$dict = $builder->buildDict(); $dict = $builder->buildDict();
$data = $dict[0]; $data = $dict[0];

View file

@ -16,7 +16,9 @@ final class PhabricatorNotificationPanelController
$clear_ui_class = 'phabricator-notification-clear-all'; $clear_ui_class = 'phabricator-notification-clear-all';
$clear_uri = id(new PhutilURI('/notification/clear/')); $clear_uri = id(new PhutilURI('/notification/clear/'));
if ($stories) { if ($stories) {
$builder = new PhabricatorNotificationBuilder($stories); $builder = id(new PhabricatorNotificationBuilder($stories))
->setUser($viewer);
$notifications_view = $builder->buildView(); $notifications_view = $builder->buildView();
$content = $notifications_view->render(); $content = $notifications_view->render();
$clear_uri->setQueryParam( $clear_uri->setQueryParam(
@ -69,8 +71,7 @@ final class PhabricatorNotificationPanelController
$content, $content,
$connection_ui); $connection_ui);
$unread_count = id(new PhabricatorFeedStoryNotification()) $unread_count = $viewer->getUnreadNotificationCount();
->countUnread($viewer);
$json = array( $json = array(
'content' => $content, 'content' => $content,

View file

@ -60,20 +60,10 @@ final class PhabricatorFeedStoryNotification extends PhabricatorFeedDAO {
$object_phid); $object_phid);
unset($unguarded); unset($unguarded);
}
public function countUnread(PhabricatorUser $user) { $count_key = PhabricatorUserNotificationCountCacheType::KEY_COUNT;
$conn = $this->establishConnection('r'); PhabricatorUserCache::clearCache($count_key, $user->getPHID());
$user->clearCacheData($count_key);
$data = queryfx_one(
$conn,
'SELECT COUNT(*) as count
FROM %T
WHERE userPHID = %s AND hasViewed = 0',
$this->getTableName(),
$user->getPHID());
return $data['count'];
} }
} }

View file

@ -11,8 +11,8 @@ final class PhabricatorOAuthServerAuthorizationsSettingsPanel
return pht('OAuth Authorizations'); return pht('OAuth Authorizations');
} }
public function getPanelGroup() { public function getPanelGroupKey() {
return pht('Sessions and Logs'); return PhabricatorSettingsLogsPanelGroup::PANELGROUPKEY;
} }
public function isEnabled() { public function isEnabled() {

View file

@ -76,12 +76,6 @@ final class PhabricatorPasteApplication extends PhabricatorApplication {
); );
} }
public function getQuickCreateItems(PhabricatorUser $viewer) {
return id(new PhabricatorPasteEditEngine())
->setViewer($viewer)
->loadQuickCreateItems();
}
public function getMailCommandObjects() { public function getMailCommandObjects() {
return array( return array(
'paste' => array( 'paste' => array(

View file

@ -127,31 +127,6 @@ final class PhabricatorPeopleApplication extends PhabricatorApplication {
return $status; return $status;
} }
public function getQuickCreateItems(PhabricatorUser $viewer) {
$items = array();
$can_create = PhabricatorPolicyFilter::hasCapability(
$viewer,
$this,
PeopleCreateUsersCapability::CAPABILITY);
if ($can_create) {
$item = id(new PHUIListItemView())
->setName(pht('User Account'))
->setIcon('fa-users')
->setHref($this->getBaseURI().'create/');
$items[] = $item;
} else if ($viewer->getIsAdmin()) {
$item = id(new PHUIListItemView())
->setName(pht('Bot Account'))
->setIcon('fa-android')
->setHref($this->getBaseURI().'new/bot/');
$items[] = $item;
}
return $items;
}
public function getApplicationSearchDocumentTypes() { public function getApplicationSearchDocumentTypes() {
return array( return array(
PhabricatorPeopleUserPHIDType::TYPECONST, PhabricatorPeopleUserPHIDType::TYPECONST,

View file

@ -18,12 +18,16 @@ abstract class PhabricatorUserCacheType extends Phobject {
return array(); return array();
} }
public function getValueFromStorage($value) { public function shouldValidateRawCacheData() {
return phutil_json_decode($value); return false;
} }
public function getValueForStorage($value) { public function isRawCacheDataValid(PhabricatorUser $user, $key, $data) {
return phutil_json_encode($value); throw new PhutilMethodNotImplementedException();
}
public function getValueFromStorage($value) {
return $value;
} }
public function newValueForUsers($key, array $users) { public function newValueForUsers($key, array $users) {

View file

@ -0,0 +1,41 @@
<?php
final class PhabricatorUserMessageCountCacheType
extends PhabricatorUserCacheType {
const CACHETYPE = 'message.count';
const KEY_COUNT = 'user.message.count.v1';
public function getAutoloadKeys() {
return array(
self::KEY_COUNT,
);
}
public function canManageKey($key) {
return ($key === self::KEY_COUNT);
}
public function getValueFromStorage($value) {
return (int)$value;
}
public function newValueForUsers($key, array $users) {
if (!$users) {
return array();
}
$user_phids = mpull($users, 'getPHID');
$unread_status = ConpherenceParticipationStatus::BEHIND;
$unread = id(new ConpherenceParticipantCountQuery())
->withParticipantPHIDs($user_phids)
->withParticipationStatus($unread_status)
->execute();
$empty = array_fill_keys($user_phids, 0);
return $unread + $empty;
}
}

View file

@ -0,0 +1,46 @@
<?php
final class PhabricatorUserNotificationCountCacheType
extends PhabricatorUserCacheType {
const CACHETYPE = 'notification.count';
const KEY_COUNT = 'user.notification.count.v1';
public function getAutoloadKeys() {
return array(
self::KEY_COUNT,
);
}
public function canManageKey($key) {
return ($key === self::KEY_COUNT);
}
public function getValueFromStorage($value) {
return (int)$value;
}
public function newValueForUsers($key, array $users) {
if (!$users) {
return array();
}
$user_phids = mpull($users, 'getPHID');
$table = new PhabricatorFeedStoryNotification();
$conn_r = $table->establishConnection('r');
$rows = queryfx_all(
$conn_r,
'SELECT userPHID, COUNT(*) N FROM %T
WHERE userPHID IN (%Ls) AND hasViewed = 0
GROUP BY userPHID',
$table->getTableName(),
$user_phids);
$empty = array_fill_keys($user_phids, 0);
return ipull($rows, 'N', 'userPHID') + $empty;
}
}

View file

@ -17,15 +17,49 @@ final class PhabricatorUserPreferencesCacheType
return ($key === self::KEY_PREFERENCES); return ($key === self::KEY_PREFERENCES);
} }
public function getValueFromStorage($value) {
return phutil_json_decode($value);
}
public function newValueForUsers($key, array $users) { public function newValueForUsers($key, array $users) {
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$users = mpull($users, null, 'getPHID');
$user_phids = array_keys($users);
$preferences = id(new PhabricatorUserPreferencesQuery()) $preferences = id(new PhabricatorUserPreferencesQuery())
->setViewer($viewer) ->setViewer($viewer)
->withUserPHIDs(mpull($users, 'getPHID')) ->withUserPHIDs($user_phids)
->execute(); ->execute();
return mpull($preferences, 'getPreferences', 'getUserPHID'); $all_settings = PhabricatorSetting::getAllSettings();
$settings = array();
foreach ($preferences as $preference) {
$user_phid = $preference->getUserPHID();
foreach ($all_settings as $key => $setting) {
$value = $preference->getSettingValue($key);
// As an optimization, we omit the value from the cache if it is
// exactly the same as the hardcoded default.
$default_value = id(clone $setting)
->setViewer($users[$user_phid])
->getSettingDefaultValue();
if ($value === $default_value) {
continue;
}
$settings[$user_phid][$key] = $value;
}
}
$results = array();
foreach ($user_phids as $user_phid) {
$value = idx($settings, $user_phid, array());
$results[$user_phid] = phutil_json_encode($value);
}
return $results;
} }
} }

View file

@ -0,0 +1,82 @@
<?php
final class PhabricatorUserProfileImageCacheType
extends PhabricatorUserCacheType {
const CACHETYPE = 'user.profile';
const KEY_URI = 'user.profile.image.uri.v1';
public function getAutoloadKeys() {
return array(
self::KEY_URI,
);
}
public function canManageKey($key) {
return ($key === self::KEY_URI);
}
public function getDefaultValue() {
return PhabricatorUser::getDefaultProfileImageURI();
}
public function newValueForUsers($key, array $users) {
$viewer = $this->getViewer();
$file_phids = mpull($users, 'getProfileImagePHID');
$file_phids = array_filter($file_phids);
if ($file_phids) {
$files = id(new PhabricatorFileQuery())
->setViewer($viewer)
->withPHIDs($file_phids)
->execute();
$files = mpull($files, null, 'getPHID');
} else {
$files = array();
}
$results = array();
foreach ($users as $user) {
$image_phid = $user->getProfileImagePHID();
if (isset($files[$image_phid])) {
$image_uri = $files[$image_phid]->getBestURI();
} else {
$image_uri = PhabricatorUser::getDefaultProfileImageURI();
}
$user_phid = $user->getPHID();
$version = $this->getCacheVersion($user);
$results[$user_phid] = "{$version},{$image_uri}";
}
return $results;
}
public function getValueFromStorage($value) {
$parts = explode(',', $value, 2);
return end($parts);
}
public function shouldValidateRawCacheData() {
return true;
}
public function isRawCacheDataValid(PhabricatorUser $user, $key, $data) {
$parts = explode(',', $data, 2);
$version = reset($parts);
return ($version === $this->getCacheVersion($user));
}
private function getCacheVersion(PhabricatorUser $user) {
$parts = array(
PhabricatorEnv::getCDNURI('/'),
PhabricatorEnv::getEnvConfig('cluster.instance'),
$user->getProfileImagePHID(),
);
$parts = serialize($parts);
return PhabricatorHash::digestForIndex($parts);
}
}

View file

@ -124,7 +124,7 @@ final class PhabricatorPeopleProfileManageController
->setName(pht('Edit Settings')) ->setName(pht('Edit Settings'))
->setDisabled(!$can_edit) ->setDisabled(!$can_edit)
->setWorkflow(!$can_edit) ->setWorkflow(!$can_edit)
->setHref('/settings/'.$user->getID().'/')); ->setHref('/settings/user/'.$user->getUsername().'/'));
if ($user->getIsAdmin()) { if ($user->getIsAdmin()) {
$empower_icon = 'fa-arrow-circle-o-down'; $empower_icon = 'fa-arrow-circle-o-down';

View file

@ -7,15 +7,7 @@ final class PhabricatorPeopleMainMenuBarExtension
public function buildMainMenus() { public function buildMainMenus() {
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$image = $viewer->getProfileImageURI();
// TODO: This should get cached.
$profile = id(new PhabricatorPeopleQuery())
->setViewer($viewer)
->needProfileImage(true)
->withPHIDs(array($viewer->getPHID()))
->executeOne();
$image = $profile->getProfileImageURI();
$bar_item = id(new PHUIListItemView()) $bar_item = id(new PHUIListItemView())
->setName($viewer->getUsername()) ->setName($viewer->getUsername())

View file

@ -23,6 +23,7 @@ final class PhabricatorPeopleQuery
private $needProfileImage; private $needProfileImage;
private $needAvailability; private $needAvailability;
private $needBadges; private $needBadges;
private $cacheKeys = array();
public function withIDs(array $ids) { public function withIDs(array $ids) {
$this->ids = $ids; $this->ids = $ids;
@ -105,7 +106,14 @@ final class PhabricatorPeopleQuery
} }
public function needProfileImage($need) { public function needProfileImage($need) {
$this->needProfileImage = $need; $cache_key = PhabricatorUserProfileImageCacheType::KEY_URI;
if ($need) {
$this->cacheKeys[$cache_key] = true;
} else {
unset($this->cacheKeys[$cache_key]);
}
return $this; return $this;
} }
@ -119,6 +127,18 @@ final class PhabricatorPeopleQuery
return $this; return $this;
} }
public function needUserSettings($need) {
$cache_key = PhabricatorUserPreferencesCacheType::KEY_PREFERENCES;
if ($need) {
$this->cacheKeys[$cache_key] = true;
} else {
unset($this->cacheKeys[$cache_key]);
}
return $this;
}
public function newResultObject() { public function newResultObject() {
return new PhabricatorUser(); return new PhabricatorUser();
} }
@ -169,59 +189,6 @@ final class PhabricatorPeopleQuery
} }
} }
if ($this->needProfileImage) {
$rebuild = array();
foreach ($users as $user) {
$image_uri = $user->getProfileImageCache();
if ($image_uri) {
// This user has a valid cache, so we don't need to fetch any
// data or rebuild anything.
$user->attachProfileImageURI($image_uri);
continue;
}
// This user's cache is invalid or missing, so we're going to rebuild
// it.
$rebuild[] = $user;
}
if ($rebuild) {
$file_phids = mpull($rebuild, 'getProfileImagePHID');
$file_phids = array_filter($file_phids);
if ($file_phids) {
// NOTE: We're using the omnipotent user here because older profile
// images do not have the 'profile' flag, so they may not be visible
// to the executing viewer. At some point, we could migrate to add
// this flag and then use the real viewer, or just use the real
// viewer after enough time has passed to limit the impact of old
// data. The consequence of missing here is that we cache a default
// image when a real image exists.
$files = id(new PhabricatorFileQuery())
->setParentQuery($this)
->setViewer(PhabricatorUser::getOmnipotentUser())
->withPHIDs($file_phids)
->execute();
$files = mpull($files, null, 'getPHID');
} else {
$files = array();
}
foreach ($rebuild as $user) {
$image_phid = $user->getProfileImagePHID();
if (isset($files[$image_phid])) {
$image_uri = $files[$image_phid]->getBestURI();
} else {
$image_uri = PhabricatorUser::getDefaultProfileImageURI();
}
$user->writeProfileImageCache($image_uri);
$user->attachProfileImageURI($image_uri);
}
}
}
if ($this->needAvailability) { if ($this->needAvailability) {
$rebuild = array(); $rebuild = array();
foreach ($users as $user) { foreach ($users as $user) {
@ -238,6 +205,8 @@ final class PhabricatorPeopleQuery
} }
} }
$this->fillUserCaches($users);
return $users; return $users;
} }
@ -481,4 +450,120 @@ final class PhabricatorPeopleQuery
} }
} }
private function fillUserCaches(array $users) {
if (!$this->cacheKeys) {
return;
}
$user_map = mpull($users, null, 'getPHID');
$keys = array_keys($this->cacheKeys);
$hashes = array();
foreach ($keys as $key) {
$hashes[] = PhabricatorHash::digestForIndex($key);
}
$types = PhabricatorUserCacheType::getAllCacheTypes();
// First, pull any available caches. If we wanted to be particularly clever
// we could do this with JOINs in the main query.
$cache_table = new PhabricatorUserCache();
$cache_conn = $cache_table->establishConnection('r');
$cache_data = queryfx_all(
$cache_conn,
'SELECT cacheKey, userPHID, cacheData, cacheType FROM %T
WHERE cacheIndex IN (%Ls) AND userPHID IN (%Ls)',
$cache_table->getTableName(),
$hashes,
array_keys($user_map));
$skip_validation = array();
// After we read caches from the database, discard any which have data that
// invalid or out of date. This allows cache types to implement TTLs or
// versions instead of or in addition to explicit cache clears.
foreach ($cache_data as $row_key => $row) {
$cache_type = $row['cacheType'];
if (isset($skip_validation[$cache_type])) {
continue;
}
if (empty($types[$cache_type])) {
unset($cache_data[$row_key]);
continue;
}
$type = $types[$cache_type];
if (!$type->shouldValidateRawCacheData()) {
$skip_validation[$cache_type] = true;
continue;
}
$user = $user_map[$row['userPHID']];
$raw_data = $row['cacheData'];
if (!$type->isRawCacheDataValid($user, $row['cacheKey'], $raw_data)) {
unset($cache_data[$row_key]);
continue;
}
}
$need = array();
$cache_data = igroup($cache_data, 'userPHID');
foreach ($user_map as $user_phid => $user) {
$raw_rows = idx($cache_data, $user_phid, array());
$raw_data = ipull($raw_rows, 'cacheData', 'cacheKey');
foreach ($keys as $key) {
if (isset($raw_data[$key]) || array_key_exists($key, $raw_data)) {
continue;
}
$need[$key][$user_phid] = $user;
}
$user->attachRawCacheData($raw_data);
}
// If we missed any cache values, bulk-construct them now. This is
// usually much cheaper than generating them on-demand for each user
// record.
if (!$need) {
return;
}
$writes = array();
foreach ($need as $cache_key => $need_users) {
$type = PhabricatorUserCacheType::getCacheTypeForKey($cache_key);
if (!$type) {
continue;
}
$data = $type->newValueForUsers($cache_key, $need_users);
foreach ($data as $user_phid => $raw_value) {
$data[$user_phid] = $raw_value;
$writes[] = array(
'userPHID' => $user_phid,
'key' => $cache_key,
'type' => $type,
'value' => $raw_value,
);
}
foreach ($need_users as $user_phid => $user) {
if (isset($data[$user_phid]) || array_key_exists($user_phid, $data)) {
$user->attachRawCacheData(
array(
$cache_key => $data[$user_phid],
));
}
}
}
PhabricatorUserCache::writeCaches($writes);
}
} }

View file

@ -30,14 +30,9 @@ final class PhabricatorUser
protected $passwordSalt; protected $passwordSalt;
protected $passwordHash; protected $passwordHash;
protected $profileImagePHID; protected $profileImagePHID;
protected $profileImageCache;
protected $availabilityCache; protected $availabilityCache;
protected $availabilityCacheTTL; protected $availabilityCacheTTL;
protected $consoleEnabled = 0;
protected $consoleVisible = 0;
protected $consoleTab = '';
protected $conduitCertificate; protected $conduitCertificate;
protected $isSystemAgent = 0; protected $isSystemAgent = 0;
@ -50,7 +45,6 @@ final class PhabricatorUser
protected $accountSecret; protected $accountSecret;
private $profileImage = self::ATTACHABLE;
private $profile = null; private $profile = null;
private $availability = self::ATTACHABLE; private $availability = self::ATTACHABLE;
private $preferences = null; private $preferences = null;
@ -66,7 +60,10 @@ final class PhabricatorUser
private $authorities = array(); private $authorities = array();
private $handlePool; private $handlePool;
private $csrfSalt; private $csrfSalt;
private $timezoneOverride;
private $settingCacheKeys = array();
private $settingCache = array();
private $allowInlineCacheGeneration;
protected function readField($field) { protected function readField($field) {
switch ($field) { switch ($field) {
@ -188,9 +185,6 @@ final class PhabricatorUser
'passwordSalt' => 'text32?', 'passwordSalt' => 'text32?',
'passwordHash' => 'text128?', 'passwordHash' => 'text128?',
'profileImagePHID' => 'phid?', 'profileImagePHID' => 'phid?',
'consoleEnabled' => 'bool',
'consoleVisible' => 'bool',
'consoleTab' => 'text64',
'conduitCertificate' => 'text255', 'conduitCertificate' => 'text255',
'isSystemAgent' => 'bool', 'isSystemAgent' => 'bool',
'isMailingList' => 'bool', 'isMailingList' => 'bool',
@ -200,7 +194,6 @@ final class PhabricatorUser
'isApproved' => 'uint32', 'isApproved' => 'uint32',
'accountSecret' => 'bytes64', 'accountSecret' => 'bytes64',
'isEnrolledInMultiFactor' => 'bool', 'isEnrolledInMultiFactor' => 'bool',
'profileImageCache' => 'text255?',
'availabilityCache' => 'text255?', 'availabilityCache' => 'text255?',
'availabilityCacheTTL' => 'uint32?', 'availabilityCacheTTL' => 'uint32?',
), ),
@ -222,7 +215,6 @@ final class PhabricatorUser
), ),
), ),
self::CONFIG_NO_MUTATE => array( self::CONFIG_NO_MUTATE => array(
'profileImageCache' => true,
'availabilityCache' => true, 'availabilityCache' => true,
'availabilityCacheTTL' => true, 'availabilityCacheTTL' => true,
), ),
@ -481,19 +473,54 @@ final class PhabricatorUser
public function getUserSetting($key) { public function getUserSetting($key) {
// NOTE: We store available keys and cached values separately to make it
// faster to check for `null` in the cache, which is common.
if (isset($this->settingCacheKeys[$key])) {
return $this->settingCache[$key];
}
$settings_key = PhabricatorUserPreferencesCacheType::KEY_PREFERENCES; $settings_key = PhabricatorUserPreferencesCacheType::KEY_PREFERENCES;
if ($this->getPHID()) {
$settings = $this->requireCacheData($settings_key); $settings = $this->requireCacheData($settings_key);
} else {
$settings = array();
}
// NOTE: To slightly improve performance, we're using all settings here,
// not just settings that are enabled for the current viewer. It's fine to
// get the value of a setting that we wouldn't let the user edit in the UI.
$defaults = PhabricatorSetting::getAllSettings();
if (array_key_exists($key, $settings)) { if (array_key_exists($key, $settings)) {
return $settings[$key]; $value = $settings[$key];
}
$defaults = PhabricatorSetting::getAllEnabledSettings($this); // Make sure the value is valid before we return it. This makes things
// more robust when options are changed or removed.
if (isset($defaults[$key])) { if (isset($defaults[$key])) {
return $defaults[$key]->getSettingDefaultValue(); try {
id(clone $defaults[$key])
->setViewer($this)
->assertValidValue($value);
return $this->writeUserSettingCache($key, $value);
} catch (Exception $ex) {
// Fall through below and return the default value.
}
} else {
// This is an ad-hoc setting with no controlling object.
return $this->writeUserSettingCache($key, $value);
}
} }
return null; if (isset($defaults[$key])) {
$value = id(clone $defaults[$key])
->setViewer($this)
->getSettingDefaultValue();
} else {
$value = null;
}
return $this->writeUserSettingCache($key, $value);
} }
@ -510,15 +537,17 @@ final class PhabricatorUser
return ($actual == $value); return ($actual == $value);
} }
private function writeUserSettingCache($key, $value) {
$this->settingCacheKeys[$key] = true;
$this->settingCache[$key] = $value;
return $value;
}
public function getTranslation() { public function getTranslation() {
return $this->getUserSetting(PhabricatorTranslationSetting::SETTINGKEY); return $this->getUserSetting(PhabricatorTranslationSetting::SETTINGKEY);
} }
public function getTimezoneIdentifier() { public function getTimezoneIdentifier() {
if ($this->timezoneOverride) {
return $this->timezoneOverride;
}
return $this->getUserSetting(PhabricatorTimezoneSetting::SETTINGKEY); return $this->getUserSetting(PhabricatorTimezoneSetting::SETTINGKEY);
} }
@ -533,7 +562,9 @@ final class PhabricatorUser
* @task settings * @task settings
*/ */
public function overrideTimezoneIdentifier($identifier) { public function overrideTimezoneIdentifier($identifier) {
$this->timezoneOverride = $identifier; $timezone_key = PhabricatorTimezoneSetting::SETTINGKEY;
$this->settingCacheKeys[$timezone_key] = true;
$this->settingCache[$timezone_key] = $identifier;
return $this; return $this;
} }
@ -541,54 +572,22 @@ final class PhabricatorUser
return $this->getUserSetting(PhabricatorPronounSetting::SETTINGKEY); return $this->getUserSetting(PhabricatorPronounSetting::SETTINGKEY);
} }
public function loadPreferences() {
if ($this->preferences) {
return $this->preferences;
}
$preferences = null;
if ($this->getPHID()) {
$preferences = id(new PhabricatorUserPreferencesQuery())
->setViewer($this)
->withUsers(array($this))
->executeOne();
}
if (!$preferences) {
$preferences = new PhabricatorUserPreferences();
$preferences->setUserPHID($this->getPHID());
$preferences->attachUser($this);
$default_dict = array(
PhabricatorUserPreferences::PREFERENCE_TITLES => 'glyph',
PhabricatorUserPreferences::PREFERENCE_EDITOR => '',
PhabricatorUserPreferences::PREFERENCE_MONOSPACED => '',
PhabricatorUserPreferences::PREFERENCE_DARK_CONSOLE => 0,
);
$preferences->setPreferences($default_dict);
}
$this->preferences = $preferences;
return $preferences;
}
public function loadEditorLink( public function loadEditorLink(
$path, $path,
$line, $line,
PhabricatorRepository $repository = null) { PhabricatorRepository $repository = null) {
$editor = $this->loadPreferences()->getPreference( $editor = $this->getUserSetting(PhabricatorEditorSetting::SETTINGKEY);
PhabricatorUserPreferences::PREFERENCE_EDITOR);
if (is_array($path)) { if (is_array($path)) {
$multiedit = $this->loadPreferences()->getPreference( $multi_key = PhabricatorEditorMultipleSetting::SETTINGKEY;
PhabricatorUserPreferences::PREFERENCE_MULTIEDIT); $multiedit = $this->getUserSetting($multi_key);
switch ($multiedit) { switch ($multiedit) {
case '': case PhabricatorEditorMultipleSetting::VALUE_SPACES:
$path = implode(' ', $path); $path = implode(' ', $path);
break; break;
case 'disable': case PhabricatorEditorMultipleSetting::VALUE_SINGLE:
default:
return null; return null;
} }
} }
@ -791,13 +790,19 @@ final class PhabricatorUser
return celerity_get_resource_uri('/rsrc/image/avatar.png'); return celerity_get_resource_uri('/rsrc/image/avatar.png');
} }
public function attachProfileImageURI($uri) { public function getProfileImageURI() {
$this->profileImage = $uri; $uri_key = PhabricatorUserProfileImageCacheType::KEY_URI;
return $this; return $this->requireCacheData($uri_key);
} }
public function getProfileImageURI() { public function getUnreadNotificationCount() {
return $this->assertAttached($this->profileImage); $notification_key = PhabricatorUserNotificationCountCacheType::KEY_COUNT;
return $this->requireCacheData($notification_key);
}
public function getUnreadMessageCount() {
$message_key = PhabricatorUserMessageCountCacheType::KEY_COUNT;
return $this->requireCacheData($message_key);
} }
public function getFullName() { public function getFullName() {
@ -848,48 +853,13 @@ final class PhabricatorUser
$format = 'M j'; $format = 'M j';
} else { } else {
// Same year, month and day so show a time of day. // Same year, month and day so show a time of day.
$pref_time = PhabricatorUserPreferences::PREFERENCE_TIME_FORMAT; $pref_time = PhabricatorTimeFormatSetting::SETTINGKEY;
$format = $this->getPreference($pref_time); $format = $this->getUserSetting($pref_time);
} }
return $when->format($format); return $when->format($format);
} }
public function getPreference($key) {
$preferences = $this->loadPreferences();
// TODO: After T4103 and T7707 this should eventually be pushed down the
// stack into modular preference definitions and role profiles. This is
// just fixing T8601 and mildly anticipating those changes.
$value = $preferences->getPreference($key);
$allowed_values = null;
switch ($key) {
case PhabricatorUserPreferences::PREFERENCE_TIME_FORMAT:
$allowed_values = array(
'g:i A',
'H:i',
);
break;
case PhabricatorUserPreferences::PREFERENCE_DATE_FORMAT:
$allowed_values = array(
'Y-m-d',
'n/j/Y',
'd-m-Y',
);
break;
}
if ($allowed_values !== null) {
$allowed_values = array_fuse($allowed_values);
if (empty($allowed_values[$value])) {
$value = head($allowed_values);
}
}
return $value;
}
public function __toString() { public function __toString() {
return $this->getUsername(); return $this->getUsername();
} }
@ -1043,72 +1013,6 @@ final class PhabricatorUser
} }
/* -( Profile Image Cache )------------------------------------------------ */
/**
* Get this user's cached profile image URI.
*
* @return string|null Cached URI, if a URI is cached.
* @task image-cache
*/
public function getProfileImageCache() {
$version = $this->getProfileImageVersion();
$parts = explode(',', $this->profileImageCache, 2);
if (count($parts) !== 2) {
return null;
}
if ($parts[0] !== $version) {
return null;
}
return $parts[1];
}
/**
* Generate a new cache value for this user's profile image.
*
* @return string New cache value.
* @task image-cache
*/
public function writeProfileImageCache($uri) {
$version = $this->getProfileImageVersion();
$cache = "{$version},{$uri}";
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
queryfx(
$this->establishConnection('w'),
'UPDATE %T SET profileImageCache = %s WHERE id = %d',
$this->getTableName(),
$cache,
$this->getID());
unset($unguarded);
}
/**
* Get a version identifier for a user's profile image.
*
* This version will change if the image changes, or if any of the
* environment configuration which goes into generating a URI changes.
*
* @return string Cache version.
* @task image-cache
*/
private function getProfileImageVersion() {
$parts = array(
PhabricatorEnv::getCDNURI('/'),
PhabricatorEnv::getEnvConfig('cluster.instance'),
$this->getProfileImagePHID(),
);
$parts = serialize($parts);
return PhabricatorHash::digestForIndex($parts);
}
/* -( Multi-Factor Authentication )---------------------------------------- */ /* -( Multi-Factor Authentication )---------------------------------------- */
@ -1526,6 +1430,10 @@ final class PhabricatorUser
return $this; return $this;
} }
public function setAllowInlineCacheGeneration($allow_cache_generation) {
$this->allowInlineCacheGeneration = $allow_cache_generation;
return $this;
}
/** /**
* @task cache * @task cache
@ -1546,14 +1454,20 @@ final class PhabricatorUser
return $usable_value; return $usable_value;
} }
// By default, we throw if a cache isn't available. This is consistent
// with the standard `needX()` + `attachX()` + `getX()` interaction.
if (!$this->allowInlineCacheGeneration) {
throw new PhabricatorDataNotAttachedException($this);
}
$usable_value = $type->getDefaultValue(); $usable_value = $type->getDefaultValue();
$user_phid = $this->getPHID(); $user_phid = $this->getPHID();
if ($user_phid) { if ($user_phid) {
$map = $type->newValueForUsers($key, array($this)); $map = $type->newValueForUsers($key, array($this));
if (array_key_exists($user_phid, $map)) { if (array_key_exists($user_phid, $map)) {
$usable_value = $map[$user_phid]; $raw_value = $map[$user_phid];
$raw_value = $type->getValueForStorage($usable_value); $usable_value = $type->getValueFromStorage($raw_value);
$this->rawCacheData[$key] = $raw_value; $this->rawCacheData[$key] = $raw_value;
PhabricatorUserCache::writeCache( PhabricatorUserCache::writeCache(

View file

@ -42,36 +42,73 @@ final class PhabricatorUserCache extends PhabricatorUserDAO {
$key, $key,
$user_phid, $user_phid,
$raw_value) { $raw_value) {
self::writeCaches(
array(
array(
'type' => $type,
'key' => $key,
'userPHID' => $user_phid,
'value' => $raw_value,
),
));
}
public static function writeCaches(array $values) {
if (PhabricatorEnv::isReadOnly()) { if (PhabricatorEnv::isReadOnly()) {
return; return;
} }
if (!$values) {
return;
}
$table = new self(); $table = new self();
$conn_w = $table->establishConnection('w'); $conn_w = $table->establishConnection('w');
$sql = array();
foreach ($values as $value) {
$key = $value['key'];
$sql[] = qsprintf(
$conn_w,
'(%s, %s, %s, %s, %s)',
$value['userPHID'],
PhabricatorHash::digestForIndex($key),
$key,
$value['value'],
$value['type']->getUserCacheType());
}
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
foreach (PhabricatorLiskDAO::chunkSQL($sql) as $chunk) {
queryfx( queryfx(
$conn_w, $conn_w,
'INSERT INTO %T (userPHID, cacheIndex, cacheKey, cacheData, cacheType) 'INSERT INTO %T (userPHID, cacheIndex, cacheKey, cacheData, cacheType)
VALUES (%s, %s, %s, %s, %s) VALUES %Q
ON DUPLICATE KEY UPDATE cacheData = VALUES(cacheData)', ON DUPLICATE KEY UPDATE
cacheData = VALUES(cacheData),
cacheType = VALUES(cacheType)',
$table->getTableName(), $table->getTableName(),
$user_phid, $chunk);
PhabricatorHash::digestForIndex($key), }
$key,
$raw_value,
$type->getUserCacheType());
unset($unguarded); unset($unguarded);
} }
public static function clearCache($key, $user_phid) { public static function clearCache($key, $user_phid) {
return self::clearCaches($key, array($user_phid));
}
public static function clearCaches($key, array $user_phids) {
if (PhabricatorEnv::isReadOnly()) { if (PhabricatorEnv::isReadOnly()) {
return; return;
} }
if (!$user_phids) {
return;
}
$table = new self(); $table = new self();
$conn_w = $table->establishConnection('w'); $conn_w = $table->establishConnection('w');
@ -79,15 +116,14 @@ final class PhabricatorUserCache extends PhabricatorUserDAO {
queryfx( queryfx(
$conn_w, $conn_w,
'DELETE FROM %T WHERE cacheIndex = %s AND userPHID = %s', 'DELETE FROM %T WHERE cacheIndex = %s AND userPHID IN (%Ls)',
$table->getTableName(), $table->getTableName(),
PhabricatorHash::digestForIndex($key), PhabricatorHash::digestForIndex($key),
$user_phid); $user_phids);
unset($unguarded); unset($unguarded);
} }
public static function clearCacheForAllUsers($key) { public static function clearCacheForAllUsers($key) {
if (PhabricatorEnv::isReadOnly()) { if (PhabricatorEnv::isReadOnly()) {
return; return;

View file

@ -59,18 +59,6 @@ final class PhabricatorPholioApplication extends PhabricatorApplication {
); );
} }
public function getQuickCreateItems(PhabricatorUser $viewer) {
$items = array();
$item = id(new PHUIListItemView())
->setName(pht('Pholio Mock'))
->setIcon('fa-picture-o')
->setHref($this->getBaseURI().'create/');
$items[] = $item;
return $items;
}
protected function getCustomCapabilities() { protected function getCustomCapabilities() {
return array( return array(
PholioDefaultViewCapability::CAPABILITY => array( PholioDefaultViewCapability::CAPABILITY => array(

View file

@ -267,12 +267,12 @@ final class PholioMockEditController extends PholioController {
$image_elements); $image_elements);
$drop_control = phutil_tag( $drop_control = phutil_tag(
'div', 'a',
array( array(
'id' => $drop_id, 'id' => $drop_id,
'class' => 'pholio-edit-drop', 'class' => 'pholio-edit-drop',
), ),
pht('Drag and drop images here to add them to the mock.')); pht('Click here, or drag and drop images to add them to the mock.'));
$order_control = phutil_tag( $order_control = phutil_tag(
'input', 'input',

View file

@ -137,9 +137,12 @@ final class PholioImageQuery
$all_files = mpull($all_files, null, 'getPHID'); $all_files = mpull($all_files, null, 'getPHID');
if ($this->needInlineComments) { if ($this->needInlineComments) {
$all_inline_comments = id(new PholioTransactionComment()) // Only load inline comments the viewer has permission to see.
->loadAllWhere('imageid IN (%Ld)', $all_inline_comments = id(new PholioTransactionComment())->loadAllWhere(
mpull($images, 'getID')); 'imageID IN (%Ld)
AND (transactionPHID IS NOT NULL OR authorPHID = %s)',
mpull($images, 'getID'),
$this->getViewer()->getPHID());
$all_inline_comments = mgroup($all_inline_comments, 'getImageID'); $all_inline_comments = mgroup($all_inline_comments, 'getImageID');
} }

View file

@ -42,11 +42,12 @@ final class PholioUploadedImageView extends AphrontView {
PhabricatorFileThumbnailTransform::TRANSFORM_PINBOARD); PhabricatorFileThumbnailTransform::TRANSFORM_PINBOARD);
$thumbnail_uri = $file->getURIForTransform($xform); $thumbnail_uri = $file->getURIForTransform($xform);
$thumb_img = phutil_tag( $thumb_img = javelin_tag(
'img', 'img',
array( array(
'class' => 'pholio-thumb-img', 'class' => 'pholio-thumb-img',
'src' => $thumbnail_uri, 'src' => $thumbnail_uri,
'sigil' => 'pholio-uploaded-thumb',
)); ));
$thumb_frame = phutil_tag( $thumb_frame = phutil_tag(

View file

@ -8,6 +8,7 @@ final class PhortuneCartViewController
$id = $request->getURIData('id'); $id = $request->getURIData('id');
$authority = $this->loadMerchantAuthority(); $authority = $this->loadMerchantAuthority();
require_celerity_resource('phortune-css');
$query = id(new PhortuneCartQuery()) $query = id(new PhortuneCartQuery())
->setViewer($viewer) ->setViewer($viewer)
@ -208,6 +209,7 @@ final class PhortuneCartViewController
return $this->newPage() return $this->newPage()
->setTitle(pht('Cart %d', $cart->getID())) ->setTitle(pht('Cart %d', $cart->getID()))
->setCrumbs($crumbs) ->setCrumbs($crumbs)
->addClass('phortune-cart-page')
->appendChild($view); ->appendChild($view);
} }

View file

@ -45,61 +45,20 @@ final class PhrictionDiffController extends PhrictionController {
$text_l = $content_l->getContent(); $text_l = $content_l->getContent();
$text_r = $content_r->getContent(); $text_r = $content_r->getContent();
$text_l = phutil_utf8_hard_wrap($text_l, 80); $diff_view = id(new PhabricatorApplicationTransactionTextDiffDetailView())
$text_l = implode("\n", $text_l); ->setOldText($text_l)
$text_r = phutil_utf8_hard_wrap($text_r, 80); ->setNewText($text_r);
$text_r = implode("\n", $text_r);
$engine = new PhabricatorDifferenceEngine(); $changes = id(new PHUIObjectBoxView())
$changeset = $engine->generateChangesetFromFileContent($text_l, $text_r); ->setHeaderText(pht('Content Changes'))
$changeset->setFilename($content_r->getTitle());
$changeset->setOldProperties(
array(
'Title' => $content_l->getTitle(),
));
$changeset->setNewProperties(
array(
'Title' => $content_r->getTitle(),
));
$whitespace_mode = DifferentialChangesetParser::WHITESPACE_SHOW_ALL;
$parser = id(new DifferentialChangesetParser())
->setUser($viewer)
->setChangeset($changeset)
->setRenderingReference("{$l},{$r}");
$parser->readParametersFromRequest($request);
$parser->setWhitespaceMode($whitespace_mode);
$engine = new PhabricatorMarkupEngine();
$engine->setViewer($viewer);
$engine->process();
$parser->setMarkupEngine($engine);
$spec = $request->getStr('range');
list($range_s, $range_e, $mask) =
DifferentialChangesetParser::parseRangeSpecification($spec);
$parser->setRange($range_s, $range_e);
$parser->setMask($mask);
if ($request->isAjax()) {
return id(new PhabricatorChangesetResponse())
->setRenderedChangeset($parser->renderChangeset());
}
$changes = id(new DifferentialChangesetListView())
->setUser($this->getViewer())
->setChangesets(array($changeset))
->setVisibleChangesets(array($changeset))
->setRenderingReferences(array("{$l},{$r}"))
->setRenderURI('/phriction/diff/'.$document->getID().'/')
->setTitle(pht('Changes'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setParser($parser); ->appendChild(
phutil_tag(
'div',
array(
'class' => 'prose-diff-frame',
),
$diff_view));
require_celerity_resource('phriction-document-css'); require_celerity_resource('phriction-document-css');

View file

@ -16,7 +16,15 @@ final class PhrictionRemarkupRule extends PhutilRemarkupRule {
} }
public function markupDocumentLink(array $matches) { public function markupDocumentLink(array $matches) {
$link = trim($matches[1]); // If the link contains an anchor, separate that off first.
$parts = explode('#', trim($matches[1]), 2);
if (count($parts) == 2) {
$link = $parts[0];
$anchor = $parts[1];
} else {
$link = $parts[0];
$anchor = null;
}
// Handle relative links. // Handle relative links.
if ((substr($link, 0, 2) === './') || (substr($link, 0, 3) === '../')) { if ((substr($link, 0, 2) === './') || (substr($link, 0, 3) === '../')) {
@ -67,6 +75,7 @@ final class PhrictionRemarkupRule extends PhutilRemarkupRule {
$metadata[] = array( $metadata[] = array(
'token' => $token, 'token' => $token,
'link' => $link, 'link' => $link,
'anchor' => $anchor,
'explicitName' => $name, 'explicitName' => $name,
); );
$engine->setTextMetadata(self::KEY_RULE_PHRICTION_LINK, $metadata); $engine->setTextMetadata(self::KEY_RULE_PHRICTION_LINK, $metadata);
@ -142,10 +151,11 @@ final class PhrictionRemarkupRule extends PhutilRemarkupRule {
$uri = new PhutilURI($link); $uri = new PhutilURI($link);
$slug = $uri->getPath(); $slug = $uri->getPath();
$fragment = $uri->getFragment();
$slug = PhabricatorSlug::normalize($slug); $slug = PhabricatorSlug::normalize($slug);
$slug = PhrictionDocument::getSlugURI($slug); $slug = PhrictionDocument::getSlugURI($slug);
$href = (string)id(new PhutilURI($slug))->setFragment($fragment);
$anchor = idx($spec, 'anchor');
$href = (string)id(new PhutilURI($slug))->setFragment($anchor);
$text_mode = $this->getEngine()->isTextMode(); $text_mode = $this->getEngine()->isTextMode();
$mail_mode = $this->getEngine()->isHTMLMailMode(); $mail_mode = $this->getEngine()->isHTMLMailMode();

View file

@ -281,10 +281,8 @@ final class PhabricatorPolicyEditController
// Save this project as one of the user's most recently used projects, // Save this project as one of the user's most recently used projects,
// so we'll show it by default in future menus. // so we'll show it by default in future menus.
$pref_key = PhabricatorUserPreferences::PREFERENCE_FAVORITE_POLICIES; $favorites_key = PhabricatorPolicyFavoritesSetting::SETTINGKEY;
$favorites = $viewer->getUserSetting($favorites_key);
$preferences = $viewer->loadPreferences();
$favorites = $preferences->getPreference($pref_key);
if (!is_array($favorites)) { if (!is_array($favorites)) {
$favorites = array(); $favorites = array();
} }
@ -293,8 +291,17 @@ final class PhabricatorPolicyEditController
unset($favorites[$project_phid]); unset($favorites[$project_phid]);
$favorites[$project_phid] = true; $favorites[$project_phid] = true;
$preferences->setPreference($pref_key, $favorites); $preferences = PhabricatorUserPreferences::loadUserPreferences($viewer);
$preferences->save();
$editor = id(new PhabricatorUserPreferencesEditor())
->setActor($viewer)
->setContentSourceFromRequest($request)
->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true);
$xactions = array();
$xactions[] = $preferences->newTransaction($favorites_key, $favorites);
$editor->applyTransactions($preferences, $xactions);
$data = array( $data = array(
'phid' => $project->getPHID(), 'phid' => $project->getPHID(),

View file

@ -195,7 +195,7 @@ final class PhabricatorPolicyQuery
$viewer = $this->getViewer(); $viewer = $this->getViewer();
if ($viewer->getPHID()) { if ($viewer->getPHID()) {
$pref_key = PhabricatorUserPreferences::PREFERENCE_FAVORITE_POLICIES; $pref_key = PhabricatorPolicyFavoritesSetting::SETTINGKEY;
$favorite_limit = 10; $favorite_limit = 10;
$default_limit = 5; $default_limit = 5;

View file

@ -34,6 +34,21 @@ final class PhabricatorPonderApplication extends PhabricatorApplication {
); );
} }
public function supportsEmailIntegration() {
return true;
}
public function getAppEmailBlurb() {
return pht(
'Send email to these addresses to create questions. %s',
phutil_tag(
'a',
array(
'href' => $this->getInboundEmailSupportLink(),
),
pht('Learn More')));
}
public function getRoutes() { public function getRoutes() {
return array( return array(
'/Q(?P<id>[1-9]\d*)' '/Q(?P<id>[1-9]\d*)'

View file

@ -0,0 +1,49 @@
<?php
final class PonderQuestionCreateMailReceiver extends PhabricatorMailReceiver {
public function isEnabled() {
$app_class = 'PhabricatorPonderApplication';
return PhabricatorApplication::isClassInstalled($app_class);
}
public function canAcceptMail(PhabricatorMetaMTAReceivedMail $mail) {
$ponder_app = new PhabricatorPonderApplication();
return $this->canAcceptApplicationMail($ponder_app, $mail);
}
protected function processReceivedMail(
PhabricatorMetaMTAReceivedMail $mail,
PhabricatorUser $sender) {
$title = $mail->getSubject();
if (!strlen($title)) {
$title = pht('New Question');
}
$xactions = array();
$xactions[] = id(new PonderQuestionTransaction())
->setTransactionType(PonderQuestionTransaction::TYPE_TITLE)
->setNewValue($title);
$xactions[] = id(new PonderQuestionTransaction())
->setTransactionType(PonderQuestionTransaction::TYPE_CONTENT)
->setNewValue($mail->getCleanTextBody());
$question = PonderQuestion::initializeNewQuestion($sender);
$content_source = $mail->newContentSource();
$editor = id(new PonderQuestionEditor())
->setActor($sender)
->setContentSource($content_source)
->setContinueOnNoEffect(true);
$xactions = $editor->applyTransactions($question, $xactions);
$mail->setRelatedPHID($question->getPHID());
}
}

View file

@ -48,6 +48,7 @@ final class PonderQuestion extends PonderDAO
->setViewPolicy($view_policy) ->setViewPolicy($view_policy)
->setStatus(PonderQuestionStatus::STATUS_OPEN) ->setStatus(PonderQuestionStatus::STATUS_OPEN)
->setAnswerCount(0) ->setAnswerCount(0)
->setAnswerWiki('')
->setSpacePHID($actor->getDefaultSpacePHID()); ->setSpacePHID($actor->getDefaultSpacePHID());
} }

Some files were not shown because too many files have changed in this diff Show more