Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -770,7 +770,7 @@ |
771 | 771 | $commands = $this->threadCommands( $thread ); |
772 | 772 | $menuHTML = Xml::tags( 'ul', array( 'class' => 'lqt-thread-toolbar-command-list' ), |
773 | 773 | $this->listItemsForCommands( $commands ) ); |
774 | | - |
| 774 | + |
775 | 775 | $triggerText = Xml::tags( 'span', array( 'class' => 'lqt-thread-actions-icon' ), |
776 | 776 | ' ' ); |
777 | 777 | $dropDownTrigger = Xml::tags( 'div', |
— | — | @@ -1129,7 +1129,8 @@ |
1130 | 1130 | $replies = $thread->replies(); |
1131 | 1131 | |
1132 | 1132 | foreach( $replies as $reply ) { |
1133 | | - $content = $reply->root()->getContent(); |
| 1133 | + $content = ''; |
| 1134 | + if ( $reply->root() ) $content = $reply->root()->getContent(); |
1134 | 1135 | |
1135 | 1136 | if ( trim($content) != '' ) { |
1136 | 1137 | return true; |
— | — | @@ -1138,6 +1139,10 @@ |
1139 | 1140 | if ( self::threadContainsRepliesWithContent( $reply ) ) { |
1140 | 1141 | return true; |
1141 | 1142 | } |
| 1143 | + |
| 1144 | + if ( $reply->type() == Threads::TYPE_MOVED ) { |
| 1145 | + return true; |
| 1146 | + } |
1142 | 1147 | } |
1143 | 1148 | |
1144 | 1149 | return false; |
— | — | @@ -1227,8 +1232,10 @@ |
1228 | 1233 | $options['mustShowThreads'] = $mustShowThreads; |
1229 | 1234 | |
1230 | 1235 | // Don't show blank posts unless we have to |
1231 | | - $content = $thread->root()->getContent(); |
| 1236 | + $content = ''; |
| 1237 | + if ( $thread->root() ) $content = $thread->root()->getContent(); |
1232 | 1238 | if ( trim($content) == '' && |
| 1239 | + $thread->type() != Threads::TYPE_MOVED && |
1233 | 1240 | ! self::threadContainsRepliesWithContent( $thread ) && |
1234 | 1241 | ! array_key_exists( $thread->id(), $mustShowThreads ) ) { |
1235 | 1242 | |