Page MenuHomePhabricator

D12694.diff
No OneTemporary

D12694.diff

diff --git a/src/applications/countdown/remarkup/PhabricatorCountdownRemarkupRule.php b/src/applications/countdown/remarkup/PhabricatorCountdownRemarkupRule.php
--- a/src/applications/countdown/remarkup/PhabricatorCountdownRemarkupRule.php
+++ b/src/applications/countdown/remarkup/PhabricatorCountdownRemarkupRule.php
@@ -15,7 +15,11 @@
->execute();
}
- protected function renderObjectEmbed($object, $handle, $options) {
+ protected function renderObjectEmbed(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $options) {
+
$viewer = $this->getEngine()->getConfig('viewer');
return id(new PhabricatorCountdownView())
diff --git a/src/applications/dashboard/remarkup/PhabricatorDashboardRemarkupRule.php b/src/applications/dashboard/remarkup/PhabricatorDashboardRemarkupRule.php
--- a/src/applications/dashboard/remarkup/PhabricatorDashboardRemarkupRule.php
+++ b/src/applications/dashboard/remarkup/PhabricatorDashboardRemarkupRule.php
@@ -14,10 +14,13 @@
->setViewer($viewer)
->withIDs($ids)
->execute();
-
}
- protected function renderObjectEmbed($object, $handle, $options) {
+ protected function renderObjectEmbed(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $options) {
+
$viewer = $this->getEngine()->getConfig('viewer');
return id(new PhabricatorDashboardPanelRenderingEngine())
diff --git a/src/applications/diviner/markup/DivinerSymbolRemarkupRule.php b/src/applications/diviner/markup/DivinerSymbolRemarkupRule.php
--- a/src/applications/diviner/markup/DivinerSymbolRemarkupRule.php
+++ b/src/applications/diviner/markup/DivinerSymbolRemarkupRule.php
@@ -33,7 +33,7 @@
$text);
}
- public function markupSymbol($matches) {
+ public function markupSymbol(array $matches) {
if (!$this->isFlatText($matches[0])) {
return $matches[0];
}
diff --git a/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php b/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
--- a/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
+++ b/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
@@ -28,7 +28,11 @@
return $objects;
}
- protected function renderObjectEmbed($object, $handle, $options) {
+ protected function renderObjectEmbed(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $options) {
+
$options = $this->getFileOptions($options) + array(
'name' => $object->getName(),
);
diff --git a/src/applications/macro/markup/PhabricatorEmojiRemarkupRule.php b/src/applications/macro/markup/PhabricatorEmojiRemarkupRule.php
--- a/src/applications/macro/markup/PhabricatorEmojiRemarkupRule.php
+++ b/src/applications/macro/markup/PhabricatorEmojiRemarkupRule.php
@@ -13,7 +13,7 @@
$text);
}
- public function markupEmoji($matches) {
+ public function markupEmoji(array $matches) {
if (!$this->isFlatText($matches[0])) {
return $matches[0];
}
diff --git a/src/applications/macro/markup/PhabricatorIconRemarkupRule.php b/src/applications/macro/markup/PhabricatorIconRemarkupRule.php
--- a/src/applications/macro/markup/PhabricatorIconRemarkupRule.php
+++ b/src/applications/macro/markup/PhabricatorIconRemarkupRule.php
@@ -13,7 +13,7 @@
$text);
}
- public function markupIcon($matches) {
+ public function markupIcon(array $matches) {
$engine = $this->getEngine();
$text_mode = $engine->isTextMode();
$mail_mode = $engine->isHTMLMailMode();
@@ -73,7 +73,6 @@
$icon_view = id(new PHUIIconView())
->setIconFont('fa-'.$icon, $color);
-
return $this->getEngine()->storeText($icon_view);
}
diff --git a/src/applications/macro/markup/PhabricatorImageMacroRemarkupRule.php b/src/applications/macro/markup/PhabricatorImageMacroRemarkupRule.php
--- a/src/applications/macro/markup/PhabricatorImageMacroRemarkupRule.php
+++ b/src/applications/macro/markup/PhabricatorImageMacroRemarkupRule.php
@@ -13,7 +13,7 @@
$text);
}
- public function markupImageMacro($matches) {
+ public function markupImageMacro(array $matches) {
if ($this->macros === null) {
$this->macros = array();
diff --git a/src/applications/macro/markup/PhabricatorMemeRemarkupRule.php b/src/applications/macro/markup/PhabricatorMemeRemarkupRule.php
--- a/src/applications/macro/markup/PhabricatorMemeRemarkupRule.php
+++ b/src/applications/macro/markup/PhabricatorMemeRemarkupRule.php
@@ -15,7 +15,7 @@
$text);
}
- public function markupMeme($matches) {
+ public function markupMeme(array $matches) {
if (!$this->isFlatText($matches[0])) {
return $matches[0];
}
diff --git a/src/applications/paste/remarkup/PhabricatorPasteRemarkupRule.php b/src/applications/paste/remarkup/PhabricatorPasteRemarkupRule.php
--- a/src/applications/paste/remarkup/PhabricatorPasteRemarkupRule.php
+++ b/src/applications/paste/remarkup/PhabricatorPasteRemarkupRule.php
@@ -17,7 +17,11 @@
}
- protected function renderObjectEmbed($object, $handle, $options) {
+ protected function renderObjectEmbed(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $options) {
+
$embed_paste = id(new PasteEmbedView())
->setPaste($object)
->setHandle($handle);
diff --git a/src/applications/people/markup/PhabricatorMentionRemarkupRule.php b/src/applications/people/markup/PhabricatorMentionRemarkupRule.php
--- a/src/applications/people/markup/PhabricatorMentionRemarkupRule.php
+++ b/src/applications/people/markup/PhabricatorMentionRemarkupRule.php
@@ -26,7 +26,7 @@
$text);
}
- protected function markupMention($matches) {
+ protected function markupMention(array $matches) {
$engine = $this->getEngine();
if ($engine->isTextMode()) {
diff --git a/src/applications/pholio/remarkup/PholioRemarkupRule.php b/src/applications/pholio/remarkup/PholioRemarkupRule.php
--- a/src/applications/pholio/remarkup/PholioRemarkupRule.php
+++ b/src/applications/pholio/remarkup/PholioRemarkupRule.php
@@ -12,7 +12,11 @@
return '[1-9]\d*(?:/[1-9]\d*/?)?';
}
- protected function getObjectHref($object, $handle, $id) {
+ protected function getObjectHref(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $id) {
+
$href = $handle->getURI();
// If the ID has a `M123/456` component, link to that specific image.
@@ -51,7 +55,11 @@
return $results;
}
- protected function renderObjectEmbed($object, $handle, $options) {
+ protected function renderObjectEmbed(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $options) {
+
$embed_mock = id(new PholioMockEmbedView())
->setMock($object);
diff --git a/src/applications/phriction/markup/PhrictionRemarkupRule.php b/src/applications/phriction/markup/PhrictionRemarkupRule.php
--- a/src/applications/phriction/markup/PhrictionRemarkupRule.php
+++ b/src/applications/phriction/markup/PhrictionRemarkupRule.php
@@ -13,8 +13,7 @@
$text);
}
- public function markupDocumentLink($matches) {
-
+ public function markupDocumentLink(array $matches) {
$link = trim($matches[1]);
$name = trim(idx($matches, 2, $link));
if (empty($matches[2])) {
diff --git a/src/applications/project/remarkup/ProjectRemarkupRule.php b/src/applications/project/remarkup/ProjectRemarkupRule.php
--- a/src/applications/project/remarkup/ProjectRemarkupRule.php
+++ b/src/applications/project/remarkup/ProjectRemarkupRule.php
@@ -6,7 +6,12 @@
return '#';
}
- protected function renderObjectRef($object, $handle, $anchor, $id) {
+ protected function renderObjectRef(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $anchor,
+ $id) {
+
if ($this->getEngine()->isTextMode()) {
return '#'.$id;
}
diff --git a/src/applications/slowvote/remarkup/SlowvoteRemarkupRule.php b/src/applications/slowvote/remarkup/SlowvoteRemarkupRule.php
--- a/src/applications/slowvote/remarkup/SlowvoteRemarkupRule.php
+++ b/src/applications/slowvote/remarkup/SlowvoteRemarkupRule.php
@@ -18,7 +18,11 @@
->execute();
}
- protected function renderObjectEmbed($object, $handle, $options) {
+ protected function renderObjectEmbed(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $options) {
+
$viewer = $this->getEngine()->getConfig('viewer');
$embed = id(new SlowvoteEmbedView())
diff --git a/src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php
--- a/src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php
+++ b/src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php
@@ -13,7 +13,7 @@
$text);
}
- public function markupNavigation($matches) {
+ public function markupNavigation(array $matches) {
if (!$this->isFlatText($matches[0])) {
return $matches[0];
}
diff --git a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
--- a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
+++ b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
@@ -45,10 +45,11 @@
}
protected function renderObjectRefForAnyMedia (
- $object,
- $handle,
- $anchor,
- $id) {
+ $object,
+ PhabricatorObjectHandle $handle,
+ $anchor,
+ $id) {
+
$href = $this->getObjectHref($object, $handle, $id);
$text = $this->getObjectNamePrefix().$id;
@@ -68,7 +69,12 @@
}
- protected function renderObjectRef($object, $handle, $anchor, $id) {
+ protected function renderObjectRef(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $anchor,
+ $id) {
+
$href = $this->getObjectHref($object, $handle, $id);
$text = $this->getObjectNamePrefix().$id;
$status_closed = PhabricatorObjectHandleStatus::STATUS_CLOSED;
@@ -86,7 +92,11 @@
return $this->renderHovertag($text, $href, $attr);
}
- protected function renderObjectEmbedForAnyMedia($object, $handle, $options) {
+ protected function renderObjectEmbedForAnyMedia(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $options) {
+
$name = $handle->getFullName();
$href = $handle->getURI();
@@ -100,7 +110,11 @@
return $this->renderObjectEmbed($object, $handle, $options);
}
- protected function renderObjectEmbed($object, $handle, $options) {
+ protected function renderObjectEmbed(
+ $object,
+ PhabricatorObjectHandle $handle,
+ $options) {
+
$name = $handle->getFullName();
$href = $handle->getURI();
$status_closed = PhabricatorObjectHandleStatus::STATUS_CLOSED;
@@ -115,7 +129,7 @@
protected function renderObjectTagForMail(
$text,
$href,
- $handle) {
+ PhabricatorObjectHandle $handle) {
$status_closed = PhabricatorObjectHandleStatus::STATUS_CLOSED;
$strikethrough = $handle->getStatus() == $status_closed ?
@@ -243,7 +257,7 @@
return $results;
}
- public function markupObjectEmbed($matches) {
+ public function markupObjectEmbed(array $matches) {
if (!$this->isFlatText($matches[0])) {
return $matches[0];
}
@@ -256,7 +270,7 @@
));
}
- public function markupObjectReference($matches) {
+ public function markupObjectReference(array $matches) {
if (!$this->isFlatText($matches[0])) {
return $matches[0];
}

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 25, 1:03 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6747558
Default Alt Text
D12694.diff (11 KB)

Event Timeline