Index: trunk/extensions/LiquidThreads/classes/LqtView.php |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | wfMsgExt( 'lqt_invalid_subject', 'parse' ) ); |
300 | 300 | } |
301 | 301 | |
302 | | - if ( $subject != $thread->subjectWithoutIncrement() && |
| 302 | + if ( $subject && $subject != $thread->subjectWithoutIncrement() && |
303 | 303 | !$this->user->isAllowed( 'move' ) ) { |
304 | 304 | $e->editFormPageTop .= |
305 | 305 | Xml::tags( 'div', array( 'class' => 'error' ), |
— | — | @@ -327,10 +327,15 @@ |
328 | 328 | $db_subject = $thread ? $thread->subjectWithoutIncrement() : ''; |
329 | 329 | $subject = $this->request->getVal( 'lqt_subject_field', $db_subject ); |
330 | 330 | $subject_label = wfMsg( 'lqt_subject' ); |
331 | | - $e->editFormTextBeforeContent .= <<<HTML |
332 | | - <label for="lqt_subject_field">$subject_label</label> |
333 | | - <input type="text" size="60" name="lqt_subject_field" id="lqt_subject_field" value="$subject" tabindex="1"><br /> |
334 | | -HTML; |
| 331 | + |
| 332 | + $disableattr = array(); |
| 333 | + if ( !$this->user->isAllowed( 'move' ) ) { |
| 334 | + $disableattr = array( 'readonly' => 'readonly' ); |
| 335 | + } |
| 336 | + |
| 337 | + $e->editFormTextBeforeContent .= |
| 338 | + Xml::inputLabel( $subject_label, 'lqt_subject_field', 'lqt_subject_field', |
| 339 | + 60, $subject, $disableattr ) . Xml::element( 'br' ); |
335 | 340 | } |
336 | 341 | |
337 | 342 | $e->edit(); |