mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 17:22:42 +01:00
Missing change from D5120 which I incorrectly discarded in a merge.
Auditors: vrana
This commit is contained in:
parent
f01213b089
commit
b5da7b3723
5 changed files with 77 additions and 14 deletions
|
@ -1851,7 +1851,7 @@ phutil_register_library_map(array(
|
||||||
'DifferentialPathFieldSpecification' => 'DifferentialFieldSpecification',
|
'DifferentialPathFieldSpecification' => 'DifferentialFieldSpecification',
|
||||||
'DifferentialPeopleMenuEventListener' => 'PhutilEventListener',
|
'DifferentialPeopleMenuEventListener' => 'PhutilEventListener',
|
||||||
'DifferentialPrimaryPaneView' => 'AphrontView',
|
'DifferentialPrimaryPaneView' => 'AphrontView',
|
||||||
'DifferentialRemarkupRule' => 'PhabricatorRemarkupRuleObjectName',
|
'DifferentialRemarkupRule' => 'PhabricatorRemarkupRuleObject',
|
||||||
'DifferentialReplyHandler' => 'PhabricatorMailReplyHandler',
|
'DifferentialReplyHandler' => 'PhabricatorMailReplyHandler',
|
||||||
'DifferentialResultsTableView' => 'AphrontView',
|
'DifferentialResultsTableView' => 'AphrontView',
|
||||||
'DifferentialRevertPlanFieldSpecification' => 'DifferentialFieldSpecification',
|
'DifferentialRevertPlanFieldSpecification' => 'DifferentialFieldSpecification',
|
||||||
|
@ -2071,7 +2071,7 @@ phutil_register_library_map(array(
|
||||||
'ManiphestEdgeEventListener' => 'PhutilEventListener',
|
'ManiphestEdgeEventListener' => 'PhutilEventListener',
|
||||||
'ManiphestExportController' => 'ManiphestController',
|
'ManiphestExportController' => 'ManiphestController',
|
||||||
'ManiphestPeopleMenuEventListener' => 'PhutilEventListener',
|
'ManiphestPeopleMenuEventListener' => 'PhutilEventListener',
|
||||||
'ManiphestRemarkupRule' => 'PhabricatorRemarkupRuleObjectName',
|
'ManiphestRemarkupRule' => 'PhabricatorRemarkupRuleObject',
|
||||||
'ManiphestReplyHandler' => 'PhabricatorMailReplyHandler',
|
'ManiphestReplyHandler' => 'PhabricatorMailReplyHandler',
|
||||||
'ManiphestReportController' => 'ManiphestController',
|
'ManiphestReportController' => 'ManiphestController',
|
||||||
'ManiphestSavedQuery' => 'ManiphestDAO',
|
'ManiphestSavedQuery' => 'ManiphestDAO',
|
||||||
|
@ -2604,7 +2604,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPasteEditController' => 'PhabricatorPasteController',
|
'PhabricatorPasteEditController' => 'PhabricatorPasteController',
|
||||||
'PhabricatorPasteListController' => 'PhabricatorPasteController',
|
'PhabricatorPasteListController' => 'PhabricatorPasteController',
|
||||||
'PhabricatorPasteQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorPasteQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'PhabricatorPasteRemarkupRule' => 'PhabricatorRemarkupRuleObjectName',
|
'PhabricatorPasteRemarkupRule' => 'PhabricatorRemarkupRuleObject',
|
||||||
'PhabricatorPasteViewController' => 'PhabricatorPasteController',
|
'PhabricatorPasteViewController' => 'PhabricatorPasteController',
|
||||||
'PhabricatorPeopleController' => 'PhabricatorController',
|
'PhabricatorPeopleController' => 'PhabricatorController',
|
||||||
'PhabricatorPeopleEditController' => 'PhabricatorPeopleController',
|
'PhabricatorPeopleEditController' => 'PhabricatorPeopleController',
|
||||||
|
@ -3028,7 +3028,7 @@ phutil_register_library_map(array(
|
||||||
'PonderQuestionQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PonderQuestionQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'PonderQuestionSummaryView' => 'AphrontView',
|
'PonderQuestionSummaryView' => 'AphrontView',
|
||||||
'PonderQuestionViewController' => 'PonderController',
|
'PonderQuestionViewController' => 'PonderController',
|
||||||
'PonderRemarkupRule' => 'PhabricatorRemarkupRuleObjectName',
|
'PonderRemarkupRule' => 'PhabricatorRemarkupRuleObject',
|
||||||
'PonderReplyHandler' => 'PhabricatorMailReplyHandler',
|
'PonderReplyHandler' => 'PhabricatorMailReplyHandler',
|
||||||
'PonderSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
|
'PonderSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
|
||||||
'PonderUserProfileView' => 'AphrontView',
|
'PonderUserProfileView' => 'AphrontView',
|
||||||
|
|
|
@ -1,13 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group markup
|
* @group differential
|
||||||
*/
|
*/
|
||||||
final class DifferentialRemarkupRule
|
final class DifferentialRemarkupRule
|
||||||
extends PhabricatorRemarkupRuleObjectName {
|
extends PhabricatorRemarkupRuleObject {
|
||||||
|
|
||||||
protected function getObjectNamePrefix() {
|
protected function getObjectNamePrefix() {
|
||||||
return 'D';
|
return 'D';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function loadObjects(array $ids) {
|
||||||
|
$viewer = $this->getEngine()->getConfig('viewer');
|
||||||
|
|
||||||
|
if (!$viewer) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
return id(new DifferentialRevisionQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withIDs($ids)
|
||||||
|
->execute();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group markup
|
* @group maniphest
|
||||||
*/
|
*/
|
||||||
final class ManiphestRemarkupRule
|
final class ManiphestRemarkupRule
|
||||||
extends PhabricatorRemarkupRuleObjectName {
|
extends PhabricatorRemarkupRuleObject {
|
||||||
|
|
||||||
protected function getObjectNamePrefix() {
|
protected function getObjectNamePrefix() {
|
||||||
return 'T';
|
return 'T';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function loadObjects(array $ids) {
|
||||||
|
$viewer = $this->getEngine()->getConfig('viewer');
|
||||||
|
|
||||||
|
if (!$viewer) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
return id(new ManiphestTaskQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withTaskIDs($ids)
|
||||||
|
->execute();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,24 @@
|
||||||
* @group markup
|
* @group markup
|
||||||
*/
|
*/
|
||||||
final class PhabricatorPasteRemarkupRule
|
final class PhabricatorPasteRemarkupRule
|
||||||
extends PhabricatorRemarkupRuleObjectName {
|
extends PhabricatorRemarkupRuleObject {
|
||||||
|
|
||||||
protected function getObjectNamePrefix() {
|
protected function getObjectNamePrefix() {
|
||||||
return 'P';
|
return 'P';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function loadObjects(array $ids) {
|
||||||
|
$viewer = $this->getEngine()->getConfig('viewer');
|
||||||
|
|
||||||
|
if (!$viewer) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
return id(new PhabricatorPasteQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withIDs($ids)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,36 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
|
||||||
* @group markup
|
|
||||||
*/
|
|
||||||
final class PonderRemarkupRule
|
final class PonderRemarkupRule
|
||||||
extends PhabricatorRemarkupRuleObjectName {
|
extends PhabricatorRemarkupRuleObject {
|
||||||
|
|
||||||
protected function getObjectNamePrefix() {
|
protected function getObjectNamePrefix() {
|
||||||
return 'Q(?![1-4]\b)';
|
return 'Q';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function loadObjects(array $ids) {
|
||||||
|
$viewer = $this->getEngine()->getConfig('viewer');
|
||||||
|
|
||||||
|
if (!$viewer) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
return id(new PonderQuestionQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withIDs($ids)
|
||||||
|
->execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function shouldMarkupObject(array $params) {
|
||||||
|
// NOTE: Q1, Q2, Q3 and Q4 are often used to refer to quarters of the year;
|
||||||
|
// mark them up only in the {Q1} format.
|
||||||
|
if ($params['type'] == 'ref') {
|
||||||
|
if ($params['id'] <= 4) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue