r23256 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23255‎ | r23256 | r23257 >
Date:21:54, 22 June 2007
Author:david
Status:old
Tags:
Comment:
saving revision numbers works
Modified paths:
  • /branches/liquidthreads/extensions/LqtExtension.php (modified) (history)
  • /branches/liquidthreads/extensions/LqtModel.php (modified) (history)
  • /branches/liquidthreads/maintenance/lqt.sql (modified) (history)

Diff [purge]

Index: branches/liquidthreads/maintenance/lqt.sql
@@ -26,7 +26,7 @@
2727 -- of the live thread. It is only the id/revision combo which must be unique.
2828 hthread_id int(8) unsigned NOT NULL,
2929 hthread_revision int(8) unsigned NOT NULL,
30 - hthread_contents TEXT NOT NULL,
 30+ hthread_contents BLOB NOT NULL,
3131 PRIMARY KEY hthread_id_revision (hthread_id, hthread_revision)
3232 ) TYPE=InnoDB;
3333
Index: branches/liquidthreads/extensions/LqtExtension.php
@@ -256,7 +256,7 @@
257257 //$this->renameThread($thread, $subject);
258258 }
259259 // this is unrelated to the subject change and is for all edits:
260 -// $thread->setRootRevision( );
 260+ $thread->setRootRevision( Revision::newFromTitle($thread->root()->getTitle()) );
261261 $thread->commitRevision();
262262 }
263263
@@ -610,7 +610,7 @@
611611
612612 $this->showArchiveWidget();
613613
614 - var_dump(HistoricalThread::withIdAtRevision(3,3));
 614+ var_dump(HistoricalThread::withIdAtRevision(3,5));
615615
616616 if( $this->methodApplies('talkpage_new_thread') ) {
617617 $this->showNewThreadForm();
Index: branches/liquidthreads/extensions/LqtModel.php
@@ -254,6 +254,14 @@
255255 return $this->root;
256256 }
257257
 258+ function setRootRevision($rr) {
 259+ if( (is_object($rr)) ) {
 260+ $this->rootRevision = $rr->getId();
 261+ } else if (is_int($rr)) {
 262+ $this->rootRevision = $rr;
 263+ }
 264+ }
 265+
258266 function summary() {
259267 if ( !$this->summaryId ) return null;
260268 if ( !$this->summary ) $this->summary = new Post( Title::newFromID( $this->summaryId ) );

Status & tagging log