mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-15 10:00:55 +01:00
(stable) Promote 2017 Week 46
This commit is contained in:
commit
a9489fe5a1
7 changed files with 53 additions and 22 deletions
|
@ -13,7 +13,7 @@ return array(
|
|||
'core.pkg.js' => '4c79d74f',
|
||||
'darkconsole.pkg.js' => '1f9a31bc',
|
||||
'differential.pkg.css' => '45951e9e',
|
||||
'differential.pkg.js' => 'ae6460e0',
|
||||
'differential.pkg.js' => '500a75c5',
|
||||
'diffusion.pkg.css' => 'a2d17c7d',
|
||||
'diffusion.pkg.js' => '6134c5a1',
|
||||
'favicon.ico' => '30672e08',
|
||||
|
@ -396,7 +396,7 @@ return array(
|
|||
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375',
|
||||
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63',
|
||||
'rsrc/js/application/diff/DiffChangeset.js' => '99abf4cd',
|
||||
'rsrc/js/application/diff/DiffChangesetList.js' => '8f1cd52c',
|
||||
'rsrc/js/application/diff/DiffChangesetList.js' => '3b77efdd',
|
||||
'rsrc/js/application/diff/DiffInline.js' => 'e83d28f3',
|
||||
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
|
||||
'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07',
|
||||
|
@ -775,7 +775,7 @@ return array(
|
|||
'phabricator-darkmessage' => 'c48cccdd',
|
||||
'phabricator-dashboard-css' => 'fe5b1869',
|
||||
'phabricator-diff-changeset' => '99abf4cd',
|
||||
'phabricator-diff-changeset-list' => '8f1cd52c',
|
||||
'phabricator-diff-changeset-list' => '3b77efdd',
|
||||
'phabricator-diff-inline' => 'e83d28f3',
|
||||
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
|
||||
'phabricator-draggable-list' => 'bea6e7f4',
|
||||
|
@ -1137,6 +1137,10 @@ return array(
|
|||
'javelin-dom',
|
||||
'javelin-magical-init',
|
||||
),
|
||||
'3b77efdd' => array(
|
||||
'javelin-install',
|
||||
'phuix-button-view',
|
||||
),
|
||||
'3cb0b2fc' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1610,10 +1614,6 @@ return array(
|
|||
'8e1baf68' => array(
|
||||
'phui-button-css',
|
||||
),
|
||||
'8f1cd52c' => array(
|
||||
'javelin-install',
|
||||
'phuix-button-view',
|
||||
),
|
||||
'8f29b364' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
|
|
@ -35,16 +35,19 @@ $args->parse(
|
|||
$parser = new MimeMailParser();
|
||||
$parser->setText(file_get_contents('php://stdin'));
|
||||
|
||||
$text_body = $parser->getMessageBody('text');
|
||||
|
||||
$text_body_headers = $parser->getMessageBodyHeaders('text');
|
||||
$content_type = idx($text_body_headers, 'content-type');
|
||||
if (
|
||||
!phutil_is_utf8($text_body) &&
|
||||
$content = array();
|
||||
foreach (array('text', 'html') as $part) {
|
||||
$part_body = $parser->getMessageBody($part);
|
||||
$part_headers = $parser->getMessageBodyHeaders($part);
|
||||
$content_type = idx($part_headers, 'content-type');
|
||||
if (
|
||||
!phutil_is_utf8($part_body) &&
|
||||
(preg_match('/charset="(.*?)"/', $content_type, $matches) ||
|
||||
preg_match('/charset=(\S+)/', $content_type, $matches))
|
||||
) {
|
||||
$text_body = phutil_utf8_convert($text_body, 'UTF-8', $matches[1]);
|
||||
) {
|
||||
$part_body = phutil_utf8_convert($part_body, 'UTF-8', $matches[1]);
|
||||
}
|
||||
$content[$part] = $part_body;
|
||||
}
|
||||
|
||||
$headers = $parser->getHeaders();
|
||||
|
@ -57,10 +60,7 @@ if ($args->getArg('process-duplicates')) {
|
|||
|
||||
$received = new PhabricatorMetaMTAReceivedMail();
|
||||
$received->setHeaders($headers);
|
||||
$received->setBodies(array(
|
||||
'text' => $text_body,
|
||||
'html' => $parser->getMessageBody('html'),
|
||||
));
|
||||
$received->setBodies($content);
|
||||
|
||||
$attachments = array();
|
||||
foreach ($parser->getAttachments() as $attachment) {
|
||||
|
|
|
@ -86,6 +86,7 @@ EOHELP
|
|||
array(
|
||||
'/\.py$/',
|
||||
'/\.l?hs$/',
|
||||
'/\.ya?ml$/',
|
||||
))
|
||||
->setDescription(
|
||||
pht(
|
||||
|
|
|
@ -301,6 +301,9 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
|
||||
'Hide or show all inline comments.' =>
|
||||
pht('Hide or show all inline comments.'),
|
||||
|
||||
'Finish editing inline comments before changing display modes.' =>
|
||||
pht('Finish editing inline comments before changing display modes.'),
|
||||
),
|
||||
));
|
||||
|
||||
|
|
|
@ -16,6 +16,15 @@ final class DifferentialRevisionHoldDraftTransaction
|
|||
|
||||
public function applyInternalEffects($object, $value) {
|
||||
$object->setHoldAsDraft($value);
|
||||
|
||||
// If draft isn't the default state but we're creating a new revision
|
||||
// and holding it as a draft, put it in draft mode. See PHI206.
|
||||
// TODO: This can probably be removed once Draft is the universal default.
|
||||
if ($this->isNewObject()) {
|
||||
if ($object->isNeedsReview()) {
|
||||
$object->setModernRevisionStatus(DifferentialRevisionStatus::DRAFT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
|
|
|
@ -425,6 +425,7 @@ final class PhabricatorRepositoryQuery
|
|||
'type' => 'string',
|
||||
'unique' => true,
|
||||
'reverse' => true,
|
||||
'null' => 'tail',
|
||||
),
|
||||
'name' => array(
|
||||
'table' => 'r',
|
||||
|
|
|
@ -465,7 +465,7 @@ JX.install('DiffChangesetList', {
|
|||
new JX.Notification()
|
||||
.setContent(message)
|
||||
.alterClassName('jx-notification-alert', true)
|
||||
.setDuration(1000)
|
||||
.setDuration(3000)
|
||||
.show();
|
||||
},
|
||||
|
||||
|
@ -691,6 +691,7 @@ JX.install('DiffChangesetList', {
|
|||
'div',
|
||||
'differential-changeset');
|
||||
|
||||
var changeset_list = this;
|
||||
var changeset = this.getChangesetForNode(node);
|
||||
|
||||
var menu = new JX.PHUIXDropdownMenu(button);
|
||||
|
@ -738,6 +739,22 @@ JX.install('DiffChangesetList', {
|
|||
var up_item = new JX.PHUIXActionView()
|
||||
.setHandler(function(e) {
|
||||
if (changeset.isLoaded()) {
|
||||
|
||||
// Don't let the user swap display modes if a comment is being
|
||||
// edited, since they might lose their work. See PHI180.
|
||||
var inlines = changeset.getInlines();
|
||||
for (var ii = 0; ii < inlines.length; ii++) {
|
||||
if (inlines[ii].isEditing()) {
|
||||
changeset_list._warnUser(
|
||||
pht(
|
||||
'Finish editing inline comments before changing display ' +
|
||||
'modes.'));
|
||||
e.prevent();
|
||||
menu.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var renderer = changeset.getRenderer();
|
||||
if (renderer == '1up') {
|
||||
renderer = '2up';
|
||||
|
|
Loading…
Reference in a new issue