Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -416,6 +416,11 @@ |
417 | 417 | $this->perpetuate( 'lqt_operand', 'hidden' ) . |
418 | 418 | Xml::hidden( 'lqt_nonce', wfGenerateToken() ) . |
419 | 419 | Xml::hidden( 'offset', $offset ); |
| 420 | + |
| 421 | + $e->editFormTextAfterContent .= |
| 422 | + Xml::tags( 'p', null, $this->getSignature( $this->user ) ); |
| 423 | + $e->previewTextAfterContent .= |
| 424 | + Xml::tags( 'p', null, $this->getSignature( $this->user ) ); |
420 | 425 | |
421 | 426 | // Add a one-time random string to a hidden field. Store the random string |
422 | 427 | // in memcached on submit and don't allow the edit to go ahead if it's already |
— | — | @@ -424,13 +429,11 @@ |
425 | 430 | if ( $submitted_nonce ) { |
426 | 431 | global $wgMemc; |
427 | 432 | |
428 | | - $key = wfMemcKey( 'lqt-nonce', $submitted_nonce, $this->user->getName() ); |
429 | | - if ( $wgMemc->get( $key ) ) { |
| 433 | + $nonce_key = wfMemcKey( 'lqt-nonce', $submitted_nonce, $this->user->getName() ); |
| 434 | + if ( $wgMemc->get( $nonce_key ) ) { |
430 | 435 | $this->output->redirect( $this->article->getTitle()->getFullURL() ); |
431 | 436 | return; |
432 | 437 | } |
433 | | - |
434 | | - $wgMemc->set( $key, 1, 3600 ); |
435 | 438 | } |
436 | 439 | |
437 | 440 | if ( $subject_expected ) { |
— | — | @@ -460,6 +463,10 @@ |
461 | 464 | $this->article, $subject, $e->summary, $thread, |
462 | 465 | $e->textbox1 |
463 | 466 | ); |
| 467 | + |
| 468 | + if ( $submitted_nonce && $nonce_key ) { |
| 469 | + $wgMemc->set( $nonce_key, 1, 3600 ); |
| 470 | + } |
464 | 471 | } |
465 | 472 | |
466 | 473 | // A redirect without $e->didSave will happen if the new text is blank (EditPage::attemptSave). |