Matthias Mullie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/102676
Change subject: Get rid of 'Talk to User' link for moderated posts
......................................................................
Get rid of 'Talk to User' link for moderated posts
Change-Id: I6f2f00ba46fa617001b908e1ede5b3bda79aaff8
---
M Flow.i18n.php
M includes/View/Post.php
M templates/post.html.php
3 files changed, 3 insertions(+), 32 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/76/102676/1
diff --git a/Flow.i18n.php b/Flow.i18n.php
index 47ee50f..c5ec32a 100644
--- a/Flow.i18n.php
+++ b/Flow.i18n.php
@@ -64,7 +64,6 @@
'flow-reply-submit' => '{{GENDER:$1|Reply}}',
'flow-reply-link' => '{{GENDER:$1|Reply}}',
'flow-thank-link' => '{{GENDER:$1|Thank}}',
- 'flow-talk-link' => 'Talk to {{GENDER:$1|$1}}',
'flow-edit-post-submit' => 'Submit changes',
@@ -407,8 +406,6 @@
{{Identical|Reply}}',
'flow-thank-link' => 'Link text of the button that will (when clicked)
thank the editor of the comment Parameters:
* $1 - username, can be used for GENDER',
- 'flow-talk-link' => 'Link text of the button that links to the talk
page of the user whose comment is deleted. Parameters:
-* $1 - username of the user whose comment is deleted, can be used for GENDER',
'flow-edit-post-submit' => 'Used as label for the Submit button.',
'flow-post-edited' => 'Text displayed to notify the user a post has
been modified. Parameters:
* $1 - username that created the most recent revision of the post
diff --git a/includes/View/Post.php b/includes/View/Post.php
index d80ba95..e6c1900 100644
--- a/includes/View/Post.php
+++ b/includes/View/Post.php
@@ -36,19 +36,6 @@
return wfMessage( 'flow-reply-link', $this->creatorUserText
)->escaped();
}
- public function moderatedTalkLink() {
- $user = User::newFromId( $this->post->getModeratedByUserId() );
- $title = $user->getTalkPage();
-
- return array(
- $title->getLinkUrl(),
- wfMessage(
- 'flow-talk-link',
- $this->post->getModeratedByUserText()
- )->escaped()
- );
- }
-
public function creator() {
return $this->creatorUserText;
}
diff --git a/templates/post.html.php b/templates/post.html.php
index a78b451..865065f 100644
--- a/templates/post.html.php
+++ b/templates/post.html.php
@@ -123,22 +123,9 @@
), true );
?>
<div class="flow-post-interaction">
- <?php if ( !$post->isModerated() ): ?>
- <?php if (
$postView->actions()->isAllowed( 'reply' ) ): ?>
- <a class="flow-reply-link
mw-ui-button" href="#"><span><?php echo $postView->replyLink(); ?></span></a>
- <?php endif ?>
- <?php else:
- list( $talkUrl, $talkLink ) =
$postView->moderatedTalkLink();
- echo Html::rawElement(
- 'a',
- array(
- 'class' =>
'flow-talk-link mw-ui-button',
- 'href' => $talkUrl,
- ),
- // $talkLink is pre-escaped
from moderatedTalkLink
- "<span>$talkLink</span>"
- );
- endif; ?>
+ <?php if ( !$post->isModerated() &&
$postView->actions()->isAllowed( 'reply' ) ): ?>
+ <a class="flow-reply-link mw-ui-button"
href="#"><span><?php echo $postView->replyLink(); ?></span></a>
+ <?php endif ?>
</div>
<?php
--
To view, visit https://gerrit.wikimedia.org/r/102676
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f2f00ba46fa617001b908e1ede5b3bda79aaff8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits