Index: branches/liquidthreads/extensions/LqtExtension.php |
— | — | @@ -1118,12 +1118,12 @@ |
1119 | 1119 | /* unset($content_actions['history']); |
1120 | 1120 | unset($content_actions['watch']); |
1121 | 1121 | unset($content_actions['move']);*/ |
1122 | | - if( array_key_exists( 'move', $content_actions ) ) { |
| 1122 | + if( array_key_exists( 'move', $content_actions ) && $this->thread ) { |
1123 | 1123 | $content_actions['move']['href'] = |
1124 | 1124 | SpecialPage::getPage('Movethread')->getTitle()->getFullURL() . '/' . |
1125 | 1125 | $this->thread->title()->getPrefixedURL(); |
1126 | 1126 | } |
1127 | | - if( array_key_exists( 'delete', $content_actions ) ) { |
| 1127 | + if( array_key_exists( 'delete', $content_actions ) && $this->thread ) { |
1128 | 1128 | $content_actions['delete']['href'] = |
1129 | 1129 | SpecialPage::getPage('Deletethread')->getTitle()->getFullURL() . '/' . |
1130 | 1130 | $this->thread->title()->getPrefixedURL(); |
Index: branches/liquidthreads/extensions/LqtModel.php |
— | — | @@ -208,7 +208,10 @@ |
209 | 209 | } |
210 | 210 | |
211 | 211 | function atRevision($r) { |
212 | | - return HistoricalThread::withIdAtRevision($this->id(), $r); |
| 212 | + if ( $r == $this->revisionNumber() ) |
| 213 | + return $this; |
| 214 | + else |
| 215 | + return HistoricalThread::withIdAtRevision($this->id(), $r); |
213 | 216 | } |
214 | 217 | |
215 | 218 | function historicalRevisions() { |