EBernhardson (WMF) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/88629


Change subject: Merge "New design"
......................................................................

Merge "New design"

Change-Id: Iac0a8557982c87cb5b0bf008735b21d4dda81fc2
---
M templates/post.html.php
1 file changed, 5 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/29/88629/1

diff --git a/templates/post.html.php b/templates/post.html.php
index 1f6aa67..f9c1e70 100644
--- a/templates/post.html.php
+++ b/templates/post.html.php
@@ -1,12 +1,11 @@
 <?php
 
-$self = $this;
-
-$createReplyForm = function() use( $self, $block, $post, $editToken, $user ) {
+$replyForm = '';
+if ( !$post->isModerated() ) {
        $replyForm = Html::openElement( 'form', array(
                        'method' => 'POST',
                        // root post id is same as topic workflow id
-                       'action' => $self->generateUrl( 
$block->getWorkflowId(), 'reply' ),
+                       'action' => $this->generateUrl( 
$block->getWorkflowId(), 'reply' ),
                        'class' => 'flow-reply-form',
                ) );
        $replyForm .= Html::element( 'input', array( 'type' => 'hidden', 'name' 
=> 'wpEditToken', 'value' => $editToken) );
@@ -16,7 +15,7 @@
                        $replyForm .= $error->text() . '<br>'; // the pain ...
                }
        }
-       return $replyForm .
+       $replyForm .=
                Html::element( 'input', array(
                        'type' => 'hidden',
                        'name' => $block->getName() . '[replyTo]',
@@ -37,15 +36,10 @@
                        ) ) .
                Html::closeElement( 'div' ) .
                Html::closeElement( 'form' );
-};
+}
 
 $class = $post->isModerated() ? 'flow-post-moderated' : 'flow-post';
 $actions = array();
-$replyForm = '';
-
-if ( !$post->isModerated() ) {
-       $replyForm = $createReplyForm();
-}
 
 // The actual output
 echo Html::openElement( 'div', array(

-- 
To view, visit https://gerrit.wikimedia.org/r/88629
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac0a8557982c87cb5b0bf008735b21d4dda81fc2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson (WMF) <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to