r63725 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63724‎ | r63725 | r63726 >
Date:04:22, 14 March 2010
Author:werdna
Status:deferred
Tags:
Comment:
LiquidThreads: Merge r63591 from deployment versions into trunk, apparently the patch does apply, with slight modifications, and the issue still existed.
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -430,6 +430,11 @@
431431 return;
432432 }
433433
 434+ $html = Xml::openElement( 'div',
 435+ array( 'class' => 'lqt-reply-form' ) );
 436+ $this->output->addHTML( $html );
 437+
 438+
434439 try {
435440 $t = $this->newReplyTitle( null, $thread );
436441 } catch ( MWException $excep ) {
@@ -507,6 +512,8 @@
508513 $redirectTitle->setFragment( '#' . $this->anchorName( $newThread ) );
509514 $this->output->redirect( $this->title->getFullURL() );
510515 }
 516+
 517+ $this->output->addHTML( '</div>' );
511518 }
512519
513520 function showPostEditingForm( $thread ) {
@@ -1405,9 +1412,9 @@
14061413 $ebLookup = array( Threads::EDITED_BY_AUTHOR => 'author',
14071414 Threads::EDITED_BY_OTHERS => 'others' );
14081415 $lastEdit = $thread->root()->getTimestamp();
 1416+ $lastEditTime = $wgLang->time( $lastEdit, false, true, true );
 1417+ $lastEditDate = $wgLang->date( $lastEdit, false, true, true );
14091418 $lastEdit = $wgLang->timeanddate( $lastEdit, true );
1410 - $lastEditTime = $wgLang->time( $lastEdit, true );
1411 - $lastEditDate = $wgLang->date( $lastEdit, true );
14121419 $editors = '';
14131420 $editorCount = 0;
14141421
@@ -1879,6 +1886,10 @@
18801887 $this->showThreadReplies( $thread, $startAt, $maxCount, $showThreads,
18811888 $cascadeOptions, $replyInterruption );
18821889 } elseif ( $hasSubthreads && !$showThreads ) {
 1890+ if ($replyTo) {
 1891+ $this->showReplyForm( $thread );
 1892+ }
 1893+
18831894 // Add a "show subthreads" link.
18841895 $link = $this->getShowReplies( $thread );
18851896
@@ -1896,10 +1907,8 @@
18971908 $class = 'lqt-thread-replies lqt-thread-replies-' .
18981909 $this->threadNestingLevel;
18991910 $html = Xml::openElement( 'div', array( 'class' => $class ) );
1900 - $html .= Xml::openElement( 'div',
1901 - array( 'class' => 'lqt-reply-form' ) );
19021911 $this->output->addHTML( $html );
1903 -
 1912+
19041913 $this->showReplyForm( $thread );
19051914
19061915 $finishDiv = Xml::tags( 'div',
@@ -1912,6 +1921,22 @@
19131922 $finishHTML .= Xml::closeElement( 'div' ); // lqt-thread-replies
19141923 $this->output->addHTML( $finishHTML );
19151924 }
 1925+ } elseif ( !$hasSubthreads && $replyTo ) {
 1926+ $class = 'lqt-thread-replies lqt-thread-replies-'.
 1927+ $this->threadNestingLevel;
 1928+ $html = Xml::openElement( 'div', array( 'class' => $class ) );
 1929+ $this->output->addHTML( $html );
 1930+
 1931+ $this->showReplyForm( $thread );
 1932+
 1933+ $html = Xml::tags( 'div',
 1934+ array( 'class' => 'lqt-replies-finish' ),
 1935+ Xml::tags( 'div',
 1936+ array( 'class' =>
 1937+ 'lqt-replies-finish-corner'
 1938+ ), '&nbsp;' ) );
 1939+ $html .= Xml::closeElement( 'div' );
 1940+ $this->output->addHTML( $html );
19161941 }
19171942
19181943 if ( $this->threadNestingLevel == 1 ) {
@@ -1934,10 +1959,7 @@
19351960 // Check if we're actually replying to this thread.
19361961 if ( $this->methodAppliesToThread( 'reply', $thread ) ) {
19371962 // As with above, flush HTML to avoid refactoring EditPage.
1938 - $this->output->addHTML( Xml::openElement( 'div',
1939 - array( 'class' => 'lqt-reply-form' ) ) );
19401963 $this->showReplyForm( $thread );
1941 - $this->output->addHTML( Xml::closeElement( 'div' ) );
19421964 return;
19431965 } elseif ( !$thread->canUserReply( $this->user ) ) {
19441966 return;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63591LiquidThreads: Fix issues with previews and reply forms not appearing under a...werdna11:16, 11 March 2010

Status & tagging log