r25015 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25014‎ | r25015 | r25016 >
Date:23:00, 21 August 2007
Author:david
Status:old
Tags:
Comment:
save user on new thread creation
Modified paths:
  • /branches/liquidthreads/extensions/LqtExtension.php (modified) (history)
  • /branches/liquidthreads/extensions/LqtModel.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtExtension.php
@@ -1008,7 +1008,9 @@
10091009 Threads::CHANGE_NEW_THREAD => "New thread created:");
10101010 $url = LqtView::permalinkUrlWithQuery( $this->thread, 'lqt_oldid=' . $t->revisionNumber() );
10111011
1012 - $p = new Parser(); $sig = $wgOut->parse( $p->getUserSig( $t->changeUser() ), false );
 1012+ var_dump($t);
 1013+ //$p = new Parser(); $sig = $wgOut->parse( $p->getUserSig( $t->changeUser() ), false );
 1014+ $sig = "foo";
10131015
10141016 $result[] = "<tr>";
10151017 $result[] = "<td><a href=\"$url\">" . $wgLang->timeanddate($t->timestamp()) . "</a></td>";
Index: branches/liquidthreads/extensions/LqtModel.php
@@ -633,6 +633,9 @@
634634
635635 static function newThread( $root, $article, $superthread = null, $type = self::TYPE_NORMAL ) {
636636
 637+ // SCHEMA changes must be reflected here.
 638+ // TODO: It's dumb that the commitRevision code isn't used here.
 639+
637640 $dbr =& wfGetDB( DB_MASTER );
638641
639642 if ( !in_array($type, self::$VALID_TYPES) ) {
@@ -651,11 +654,16 @@
652655 } else {
653656 $change_type = self::CHANGE_NEW_THREAD;
654657 }
 658+
 659+ global $wgUser; // TODO global.
655660
656661 $res = $dbr->insert('thread',
657662 array('thread_root' => $root->getID(),
658663 'thread_timestamp' => wfTimestampNow(),
659664 'thread_change_type' => $change_type,
 665+ 'thread_change_comment' => "", // TODO
 666+ 'thread_change_user' => $wgUser->getID(),
 667+ 'thread_change_user_text' => $wgUser->getName(),
660668 'thread_type' => $type) + $aclause,
661669 __METHOD__);
662670

Status & tagging log