Index: trunk/extensions/LiquidThreads/LiquidThreads.php |
— | — | @@ -149,12 +149,7 @@ |
150 | 150 | // New User Messages |
151 | 151 | $wgHooks['SetupNewUserMessageSubject'][] = 'LqtHooks::setupNewUserMessageSubject'; |
152 | 152 | $wgHooks['SetupNewUserMessageBody'][] = 'LqtHooks::setupNewUserMessageBody'; |
153 | | -$wgHooks['FormatUserMessage'][] = 'LqtHooks::formatUserMessage'; |
154 | 153 | |
155 | | -// User Message |
156 | | -$wgHooks['SetupUserMessageArticle'][] = 'LqtHooks::setupUserMessageArticle'; |
157 | | -$wgHooks['AfterUserMessage'][] = 'LqtHooks::afterUserMessage'; |
158 | | - |
159 | 154 | // JS variables |
160 | 155 | $wgHooks['MakeGlobalVariablesScript'][] = 'LqtHooks::onMakeGlobalVariablesScript'; |
161 | 156 | |
Index: trunk/extensions/LiquidThreads/classes/Hooks.php |
— | — | @@ -528,68 +528,6 @@ |
529 | 529 | return true; |
530 | 530 | } |
531 | 531 | |
532 | | - static function setupUserMessageArticle( $user, &$article, $subject, $text, $signature, $summary, $editor ) { |
533 | | - global $wgLqtTalkPages; |
534 | | - |
535 | | - if ( $wgLqtTalkPages && LqtDispatch::isLqtPage( $article->getTitle() ) ) { |
536 | | - $threadTitle = Threads::newThreadTitle( $subject, $article ); |
537 | | - |
538 | | - if ( !$threadTitle ) { |
539 | | - wfDebug( __METHOD__ . ": invalid title $threadTitle\n" ); |
540 | | - return true; |
541 | | - } |
542 | | - |
543 | | - $article = new Article( $threadTitle ); |
544 | | - return false; |
545 | | - } |
546 | | - return true; |
547 | | - } |
548 | | - |
549 | | - /** |
550 | | - * Take care of formatting a user message. We don't really need |
551 | | - * to do anything, we just need to stop others from doing stuff. |
552 | | - */ |
553 | | - static function formatUserMessage( $subject, &$text, $signature ) { |
554 | | - return false; |
555 | | - } |
556 | | - |
557 | | - static function afterUserMessage( $user, $article, $subject, $text, $signature, $summary, $editor ) { |
558 | | - global $wgLqtTalkPages; |
559 | | - |
560 | | - $talk = $user->getTalkPage(); |
561 | | - |
562 | | - if ( $wgLqtTalkPages && LqtDispatch::isLqtPage( $talk ) ) { |
563 | | - // Need to edit as another user. Lqt does not provide an interface to alternative users, |
564 | | - // so replacing $wgUser here. |
565 | | - global $wgUser; |
566 | | - |
567 | | - $parkedUser = $wgUser; |
568 | | - $wgUser = $editor; |
569 | | - |
570 | | - $title = preg_replace( "{/[^/]+}", "", $article->getTitle()->getBaseText() ); |
571 | | - $baseArticle = new Article( Title::newFromText( $title ) ); |
572 | | - $threadTitle = preg_replace( "{.*/([^/]+)}", '$1', $article->getTitle()->getBaseText() ); |
573 | | - |
574 | | - LqtView::newPostMetadataUpdates( |
575 | | - array( |
576 | | - 'talkpage' => $baseArticle, |
577 | | - 'text' => $text, |
578 | | - 'summary' => $summary, |
579 | | - 'root' => $article, |
580 | | - 'subject' => $threadTitle, |
581 | | - 'signature' => $signature, |
582 | | - ) |
583 | | - ); |
584 | | - |
585 | | - // Set $wgUser back to the newly created user |
586 | | - $wgUser = $parkedUser; |
587 | | - |
588 | | - return false; |
589 | | - } |
590 | | - |
591 | | - return true; |
592 | | - } |
593 | | - |
594 | 532 | public static function onMakeGlobalVariablesScript( &$vars ) { |
595 | 533 | $vars += self::$scriptVariables; |
596 | 534 | |