jenkins-bot has submitted this change and it was merged.
Change subject: Headers have no postId
..
Headers have no postId
Change-Id: I5e1af40dd0e0ba6ab6b23795207f18fc369046a1
---
M includes/Formatter/RevisionViewFormatter.php
1 file changed, 18 insertions(+), 7 deletions(-)
Approvals:
EBernhardson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Formatter/RevisionViewFormatter.php
b/includes/Formatter/RevisionViewFormatter.php
index 4e7171c..4a1a9f9 100644
--- a/includes/Formatter/RevisionViewFormatter.php
+++ b/includes/Formatter/RevisionViewFormatter.php
@@ -2,6 +2,7 @@
namespace Flow\Formatter;
+use Flow\Model\Header;
use Flow\Model\PostRevision;
use Flow\Model\PostSummary;
use Flow\Templating;
@@ -62,14 +63,7 @@
$links = array(
'hist' => $this->urlGenerator->boardHistoryLink( $title
),
'board' => $this->urlGenerator->boardLink( $boardTitle
),
- 'single-view' => $this->urlGenerator->postRevisionLink(
- $title,
- $workflowId,
- $row->revision->getPostId(),
- $row->revision->getRevisionId()
- ),
);
- $links['single-view']->setMessage( $title->getPrefixedText() );
if ( $row->revision instanceof PostRevision || $row->revision
instanceof PostSummary ) {
$links['root'] = $this->urlGenerator->topicLink(
@@ -77,6 +71,23 @@
$workflowId
);
$links['root']->setMessage( $title->getPrefixedText() );
+
+ $links['single-view'] =
$this->urlGenerator->postRevisionLink(
+ $title,
+ $workflowId,
+ $row->revision->getPostId(),
+ $row->revision->getRevisionId()
+ );
+ $links['single-view']->setMessage(
$title->getPrefixedText() );
+ } elseif ( $row->revision instanceof Header ) {
+ $links['single-view'] =
$this->urlGenerator->headerRevisionLink(
+ $title,
+ $workflowId,
+ $row->revision->getRevisionId()
+ );
+ $links['single-view']->setMessage(
$title->getPrefixedText() );
+ } else {
+ wfDebugLog( 'Flow', __METHOD__ . ': Received unknown
revision type ' . get_class( $row->revision ) );
}
if ( $row->revision->getPrevRevisionId() !== null ) {
--
To view, visit https://gerrit.wikimedia.org/r/166418
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5e1af40dd0e0ba6ab6b23795207f18fc369046a1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie
Gerrit-Reviewer: EBernhardson
Gerrit-Reviewer: SG
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits