r57525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57524‎ | r57525 | r57526 >
Date:16:33, 8 October 2009
Author:werdna
Status:deferred
Tags:
Comment:
Merge r57524
Modified paths:
  • /branches/wmf-deployment/extensions/LiquidThreads (modified) (history)
  • /branches/wmf-deployment/extensions/LiquidThreads/classes/Thread.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/LiquidThreads/classes/Thread.php
@@ -135,8 +135,9 @@
136136 global $wgUser;
137137
138138 global $wgThreadActionsNoBump;
139 - if ( !in_array( $change_type, $wgThreadActionsNoBump ) ) {
140 - $this->sortkey = wfTimestampNow();
 139+ $bump = !in_array( $change_type, $wgThreadActionsNoBump );
 140+ if ( $bump ) {
 141+ $this->sortkey = wfTimestampNow( TS_DB );
141142 }
142143
143144 $this->modified = wfTimestampNow();
@@ -145,6 +146,7 @@
146147
147148 $topmost = $this->topmostThread();
148149 $topmost->modified = wfTimestampNow();
 150+ if ( $bump ) $topmost->setSortkey( wfTimestampNow( TS_DB ) );
149151 $topmost->save();
150152
151153 ThreadRevision::create( $this, $change_type, $change_object, $reason );
@@ -352,7 +354,7 @@
353355 $dbr = wfGetDB( DB_SLAVE );
354356 $this->modified = $dbr->timestamp( wfTimestampNow() );
355357 $this->created = $dbr->timestamp( wfTimestampNow() );
356 - $this->sortkey = $dbr->timestamp( wfTimestampNow() );
 358+ $this->sortkey = wfTimestampNow( TS_DB );
357359 $this->editedness = Threads::EDITED_NEVER;
358360 $this->replyCount = 0;
359361 return;
@@ -1175,7 +1177,7 @@
11761178 function setSortKey( $k = null ) {
11771179 if ( is_null($k) ) {
11781180 $dbr = wfGetDB( DB_SLAVE );
1179 - $k = $dbr->timestamp( wfTimestampNow() );
 1181+ $k = wfTimestampNow( TS_DB );
11801182 }
11811183
11821184 $this->sortkey = $k;
Property changes on: branches/wmf-deployment/extensions/LiquidThreads
___________________________________________________________________
Name: svn:mergeinfo
11831185 - /branches/REL1_15/phase3/extensions/LiquidThreads:51646
/trunk/extensions/LiquidThreads:56151-57522
/trunk/phase3/extensions/LiquidThreads:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
11841186 + /branches/REL1_15/phase3/extensions/LiquidThreads:51646
/trunk/extensions/LiquidThreads:56151-57522,57524
/trunk/phase3/extensions/LiquidThreads:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57524Sortkey adjustments....werdna16:31, 8 October 2009

Status & tagging log