Index: trunk/phase3/maintenance/postgresql/pg_tables.sql |
— | — | @@ -21,8 +21,7 @@ |
22 | 22 | cur_minor_edit smallint DEFAULT 0 NOT NULL, |
23 | 23 | cur_is_new smallint DEFAULT 0 NOT NULL, |
24 | 24 | cur_random double precision DEFAULT random(), |
25 | | - cur_touched timestamp without time zone, |
26 | | - inverse_timestamp varchar(14) |
| 25 | + cur_touched timestamp without time zone |
27 | 26 | ); |
28 | 27 | CREATE INDEX cur_title_namespace_idx ON cur (cur_title, cur_namespace); |
29 | 28 | CREATE INDEX cur_random_idx ON cur (cur_random); |
— | — | @@ -39,8 +38,7 @@ |
40 | 39 | old_user_text varchar(255) NOT NULL, |
41 | 40 | old_timestamp timestamp without time zone NOT NULL, |
42 | 41 | old_minor_edit smallint NOT NULL, |
43 | | - old_flags text NOT NULL, |
44 | | - inverse_timestamp varchar(14) NOT NULL |
| 42 | + old_flags text NOT NULL |
45 | 43 | ); |
46 | 44 | CREATE INDEX old_name_title_ts_idx ON "old" (old_namespace, old_title, old_timestamp); |
47 | 45 | CREATE INDEX old_timestamp ON "old" (old_timestamp); |
Index: trunk/phase3/maintenance/importPhase2.php |
— | — | @@ -109,10 +109,10 @@ |
110 | 110 | print "Importing current revision data...\n"; |
111 | 111 | wfQuery( "INSERT INTO cur (cur_id,cur_namespace,cur_title,cur_text,cur_comment, |
112 | 112 | cur_user,cur_user_text,cur_timestamp,cur_restrictions,cur_counter, |
113 | | - cur_is_redirect,cur_minor_edit,cur_is_new,cur_random,cur_touched,inverse_timestamp) |
| 113 | + cur_is_redirect,cur_minor_edit,cur_is_new,cur_random,cur_touched) |
114 | 114 | SELECT cur_id,0,cur_title,cur_text,cur_comment, |
115 | 115 | cur_user,cur_user_text,cur_timestamp,REPLACE(cur_restrictions,'is_',''),cur_counter, |
116 | | - cur_text like '#redirect%',cur_minor_edit,0,RAND(),NOW()+0,99999999999999-cur_timestamp |
| 116 | + cur_text like '#redirect%',cur_minor_edit,0,RAND(),NOW()+0, |
117 | 117 | FROM {$this->olddb}.cur", DB_MASTER ); |
118 | 118 | $n = mysql_affected_rows(); |
119 | 119 | print "$n rows imported.\n"; |
— | — | @@ -124,9 +124,9 @@ |
125 | 125 | |
126 | 126 | print "Importing old revision data...\n"; |
127 | 127 | wfQuery( "INSERT INTO old (old_id,old_namespace,old_title,old_text,old_comment, |
128 | | - old_user,old_user_text,old_timestamp,old_minor_edit,old_flags,inverse_timestamp) |
| 128 | + old_user,old_user_text,old_timestamp,old_minor_edit,old_flags) |
129 | 129 | SELECT old_id,0,old_title,old_text,old_comment, |
130 | | - old_user,old_user_text,old_timestamp,old_minor_edit,'',99999999999999-old_timestamp |
| 130 | + old_user,old_user_text,old_timestamp,old_minor_edit,'' |
131 | 131 | FROM {$this->olddb}.old", DB_MASTER ); |
132 | 132 | $n = mysql_affected_rows(); |
133 | 133 | print "$n rows imported.\n"; |
Index: trunk/phase3/maintenance/archives/patch-restructure.sql |
— | — | @@ -34,14 +34,13 @@ |
35 | 35 | rev_user_text varchar(255) binary NOT NULL default '', |
36 | 36 | rev_timestamp char(14) binary NOT NULL default '', |
37 | 37 | rev_minor_edit tinyint(1) unsigned NOT NULL default '0', |
38 | | - inverse_timestamp char(14) binary NOT NULL default '', |
39 | 38 | |
40 | 39 | PRIMARY KEY rev_page_id (rev_page, rev_id), |
41 | 40 | UNIQUE INDEX rev_id (rev_id), |
42 | 41 | INDEX rev_timestamp (rev_timestamp), |
43 | | - INDEX page_timestamp (rev_page,inverse_timestamp), |
44 | | - INDEX user_timestamp (rev_user,inverse_timestamp), |
45 | | - INDEX usertext_timestamp (rev_user_text,inverse_timestamp) |
| 42 | + INDEX page_timestamp (rev_page,rev_timestamp), |
| 43 | + INDEX user_timestamp (rev_user,rev_timestamp), |
| 44 | + INDEX usertext_timestamp (rev_user_text,rev_timestamp) |
46 | 45 | ); |
47 | 46 | |
48 | 47 | -- If creating new 'text' table it would look like this: |
— | — | @@ -72,8 +71,7 @@ |
73 | 72 | old_user_text, |
74 | 73 | old_timestamp, |
75 | 74 | old_minor_edit, |
76 | | - old_flags, |
77 | | - inverse_timestamp) |
| 75 | + old_flags) |
78 | 76 | SELECT |
79 | 77 | cur_namespace, |
80 | 78 | cur_title, |
— | — | @@ -83,8 +81,7 @@ |
84 | 82 | cur_user_text, |
85 | 83 | cur_timestamp, |
86 | 84 | cur_minor_edit, |
87 | | - '', |
88 | | - inverse_timestamp |
| 85 | + '' |
89 | 86 | FROM /*$wgDBprefix*/cur; |
90 | 87 | |
91 | 88 | -- Now, copy all old data except the text into revisions |
— | — | @@ -96,7 +93,6 @@ |
97 | 94 | rev_user, |
98 | 95 | rev_user_text, |
99 | 96 | rev_timestamp, |
100 | | - inverse_timestamp, |
101 | 97 | rev_minor_edit) |
102 | 98 | SELECT |
103 | 99 | old_id, |
— | — | @@ -105,7 +101,6 @@ |
106 | 102 | old_user, |
107 | 103 | old_user_text, |
108 | 104 | old_timestamp, |
109 | | - old.inverse_timestamp, |
110 | 105 | old_minor_edit |
111 | 106 | FROM /*$wgDBprefix*/old,/*$wgDBprefix*/cur |
112 | 107 | WHERE old_namespace=cur_namespace |
Index: trunk/phase3/maintenance/rebuildrecentchanges.inc |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | 'rc_this_oldid' => 0, |
36 | 36 | 'rc_last_oldid' => 0, |
37 | 37 | 'rc_type' => $dbw->conditional( 'cur_is_new != 0', RC_NEW, RC_EDIT ), |
38 | | - ), '*', $fname, array( 'ORDER BY' => 'inverse_timestamp', 'LIMIT' => 5000 ) |
| 38 | + ), '*', $fname, array( 'ORDER BY' => 'cur_timestamp DESC', 'LIMIT' => 5000 ) |
39 | 39 | ); |
40 | 40 | |
41 | 41 | print( "Loading from OLD table...\n" ); |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | "rc_cur_id,rc_this_oldid,rc_last_oldid,rc_type) SELECT old_timestamp,cur_timestamp," . |
46 | 46 | "old_user,old_user_text,old_namespace,old_title,old_comment," . |
47 | 47 | "old_minor_edit,0,0,cur_id,old_id,0,0 FROM $old,$cur " . |
48 | | - "WHERE old_namespace=cur_namespace AND old_title=cur_title ORDER BY $old.inverse_timestamp " . |
| 48 | + "WHERE old_namespace=cur_namespace AND old_title=cur_title ORDER BY old_timestamp DESC " . |
49 | 49 | "LIMIT 5000"; |
50 | 50 | $dbw->query( $sql ); |
51 | 51 | |
— | — | @@ -83,10 +83,10 @@ |
84 | 84 | if( $obj->rc_cur_id != $lastCurId ) { |
85 | 85 | # Switch! Look up the previous last edit, if any |
86 | 86 | $lastCurId = IntVal( $obj->rc_cur_id ); |
87 | | - $emit = wfInvertTimestamp( $obj->rc_timestamp ); |
| 87 | + $emit = $obj->rc_timestamp; |
88 | 88 | $sql2 = "SELECT old_id FROM $old,$cur " . |
89 | 89 | "WHERE old_namespace=cur_namespace AND old_title=cur_title AND cur_id={$lastCurId} ". |
90 | | - "AND $old.inverse_timestamp>'{$emit}' ORDER BY $old.inverse_timestamp LIMIT 1"; |
| 90 | + "AND old_timestamp<'{$emit}' ORDER BY old_timestamp DESC LIMIT 1"; |
91 | 91 | $res2 = $dbw->query( $sql2 ); |
92 | 92 | if( $row = $dbw->fetchObject( $res2 ) ) { |
93 | 93 | $lastOldId = IntVal( $row->old_id ); |
Index: trunk/phase3/maintenance/InitialiseMessages.inc |
— | — | @@ -197,8 +197,8 @@ |
198 | 198 | $page_id = $dbw->insertID(); |
199 | 199 | |
200 | 200 | $sql = "INSERT INTO $revision (rev_id, rev_page, rev_comment, rev_user, rev_user_text, |
201 | | - rev_timestamp, inverse_timestamp, rev_minor_edit) |
202 | | - VALUES ({$text_id}, {$page_id}, '', 0, '{$username}', '{$timestamp}', '{$invTimestamp}', 0)"; |
| 201 | + rev_timestamp, rev_minor_edit) |
| 202 | + VALUES ({$text_id}, {$page_id}, '', 0, '{$username}', '{$timestamp}', 0)"; |
203 | 203 | $dbw->query( $sql, $fname ); |
204 | 204 | |
205 | 205 | } |
— | — | @@ -225,4 +225,4 @@ |
226 | 226 | global $wgDeferredUpdateList; |
227 | 227 | foreach ( $wgDeferredUpdateList as $up ) { $up->doUpdate(); } |
228 | 228 | } |
229 | | -?> |
\ No newline at end of file |
| 229 | +?> |
Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -359,14 +359,13 @@ |
360 | 360 | rev_user_text varchar(255) binary NOT NULL default '', |
361 | 361 | rev_timestamp char(14) binary NOT NULL default '', |
362 | 362 | rev_minor_edit tinyint(1) unsigned NOT NULL default '0', |
363 | | - inverse_timestamp char(14) binary NOT NULL default '', |
364 | 363 | |
365 | 364 | PRIMARY KEY rev_page_id (rev_page, rev_id), |
366 | 365 | UNIQUE INDEX rev_id (rev_id), |
367 | 366 | INDEX rev_timestamp (rev_timestamp), |
368 | | - INDEX page_timestamp (rev_page,inverse_timestamp), |
369 | | - INDEX user_timestamp (rev_user,inverse_timestamp), |
370 | | - INDEX usertext_timestamp (rev_user_text,inverse_timestamp) |
| 367 | + INDEX page_timestamp (rev_page,rev_timestamp), |
| 368 | + INDEX user_timestamp (rev_user,rev_timestamp), |
| 369 | + INDEX usertext_timestamp (rev_user_text,rev_timestamp) |
371 | 370 | )", $fname ); |
372 | 371 | |
373 | 372 | echo "......Locking tables.\n"; |
— | — | @@ -377,16 +376,15 @@ |
378 | 377 | |
379 | 378 | echo "......Moving text from cur.\n"; |
380 | 379 | $wgDatabase->query( "INSERT INTO $old (old_namespace, old_title, old_text, old_comment, old_user, old_user_text, |
381 | | - old_timestamp, old_minor_edit, old_flags, inverse_timestamp) |
382 | | - SELECT cur_namespace, cur_title, cur_text, cur_comment, cur_user, cur_user_text, cur_timestamp, cur_minor_edit, |
383 | | - '', inverse_timestamp |
| 380 | + old_timestamp, old_minor_edit, old_flags, rev_timestamp) |
| 381 | + SELECT cur_namespace, cur_title, cur_text, cur_comment, cur_user, cur_user_text, cur_timestamp, cur_minor_edit,'' |
384 | 382 | FROM $cur", $fname ); |
385 | 383 | |
386 | 384 | echo "......Setting up revision table.\n"; |
387 | 385 | $wgDatabase->query( "INSERT INTO $revision (rev_id, rev_page, rev_comment, rev_user, rev_user_text, rev_timestamp, |
388 | | - inverse_timestamp, rev_minor_edit) |
| 386 | + rev_minor_edit) |
389 | 387 | SELECT old_id, cur_id, old_comment, old_user, old_user_text, |
390 | | - old_timestamp, $old.inverse_timestamp, old_minor_edit |
| 388 | + old_timestamp, old_minor_edit |
391 | 389 | FROM $old,$cur WHERE old_namespace=cur_namespace AND old_title=cur_title", $fname ); |
392 | 390 | |
393 | 391 | echo "......Setting up page table.\n"; |
Index: trunk/phase3/maintenance/importUseModWiki.php |
— | — | @@ -243,7 +243,6 @@ |
244 | 244 | $timestamp = wfUnix2Timestamp( time() ); |
245 | 245 | $redirect = ( preg_match( '/^#REDIRECT/', $page->text ) ? 1 : 0 ); |
246 | 246 | $random = mt_rand() / mt_getrandmax(); |
247 | | - $inverse = wfInvertTimestamp( $timestamp ); |
248 | 247 | |
249 | 248 | $revisions = array( $page ); |
250 | 249 | } else { |
— | — | @@ -258,14 +257,13 @@ |
259 | 258 | $timestamp = wfUnix2Timestamp( $page->ts ); |
260 | 259 | $redirect = ( preg_match( '/^#REDIRECT/', $page->text ) ? 1 : 0 ); |
261 | 260 | $random = mt_rand() / mt_getrandmax(); |
262 | | - $inverse = wfInvertTimestamp( $timestamp ); |
263 | 261 | |
264 | 262 | $revisions = array(); |
265 | 263 | } |
266 | 264 | $sql = " |
267 | 265 | INSERT |
268 | | - INTO cur (cur_namespace,cur_title,cur_text,cur_comment,cur_user,cur_user_text,cur_timestamp,inverse_timestamp,cur_touched,cur_minor_edit,cur_is_redirect,cur_random) VALUES |
269 | | - ($namespace,'$newtitle','$text','$comment',$userid,'$username','$timestamp','$inverse','$conversiontime',$minor,$redirect,$random);\n"; |
| 266 | + INTO cur (cur_namespace,cur_title,cur_text,cur_comment,cur_user,cur_user_text,cur_timestamp,cur_touched,cur_minor_edit,cur_is_redirect,cur_random) VALUES |
| 267 | + ($namespace,'$newtitle','$text','$comment',$userid,'$username','$timestamp','$conversiontime',$minor,$redirect,$random);\n"; |
270 | 268 | |
271 | 269 | # History |
272 | 270 | $revisions = array_merge( $revisions, fetchKeptPages( $title ) ); |
— | — | @@ -275,18 +273,17 @@ |
276 | 274 | |
277 | 275 | $any = false; |
278 | 276 | $sql .= "INSERT |
279 | | - INTO old (old_namespace,old_title,old_text,old_comment,old_user,old_user_text,old_timestamp,inverse_timestamp,old_minor_edit) VALUES\n"; |
| 277 | + INTO old (old_namespace,old_title,old_text,old_comment,old_user,old_user_text,old_timestamp,old_minor_edit) VALUES\n"; |
280 | 278 | foreach( $revisions as $rev ) { |
281 | 279 | $text = wfStrencode( recodeText( $rev->text ) ); |
282 | 280 | $minor = ($rev->minor ? 1 : 0); |
283 | 281 | list( $userid, $username ) = checkUserCache( $rev->username, $rev->host ); |
284 | 282 | $username = wfStrencode( recodeText( $username ) ); |
285 | 283 | $timestamp = wfUnix2Timestamp( $rev->ts ); |
286 | | - $inverse = wfInvertTimestamp( $timestamp ); |
287 | 284 | $comment = wfStrencode( recodeText( $rev->summary ) ); |
288 | 285 | |
289 | 286 | if($any) $sql .= ","; |
290 | | - $sql .= "\n\t($namespace,'$newtitle','$text','$comment',$userid,'$username','$timestamp','$inverse',$minor)"; |
| 287 | + $sql .= "\n\t($namespace,'$newtitle','$text','$comment',$userid,'$username','$timestamp',$minor)"; |
291 | 288 | $any = true; |
292 | 289 | } |
293 | 290 | $sql .= ";\n\n"; |
Index: trunk/phase3/maintenance/tables.sql |
— | — | @@ -60,14 +60,13 @@ |
61 | 61 | rev_user_text varchar(255) binary NOT NULL default '', |
62 | 62 | rev_timestamp char(14) binary NOT NULL default '', |
63 | 63 | rev_minor_edit tinyint(1) unsigned NOT NULL default '0', |
64 | | - inverse_timestamp char(14) binary NOT NULL default '', |
65 | 64 | |
66 | 65 | PRIMARY KEY rev_page_id (rev_page, rev_id), |
67 | 66 | UNIQUE INDEX rev_id (rev_id), |
68 | 67 | INDEX rev_timestamp (rev_timestamp), |
69 | | - INDEX page_timestamp (rev_page,inverse_timestamp), |
70 | | - INDEX user_timestamp (rev_user,inverse_timestamp), |
71 | | - INDEX usertext_timestamp (rev_user_text,inverse_timestamp) |
| 68 | + INDEX page_timestamp (rev_page,rev_timestamp), |
| 69 | + INDEX user_timestamp (rev_user,rev_timestamp), |
| 70 | + INDEX usertext_timestamp (rev_user_text,rev_timestamp) |
72 | 71 | ); |
73 | 72 | |
74 | 73 | |
Index: trunk/phase3/config/index.php |
— | — | @@ -583,8 +583,8 @@ |
584 | 584 | $page_id = $wgDatabase->insertID(); |
585 | 585 | |
586 | 586 | $sql = "INSERT INTO $revision (rev_id, rev_page, rev_comment, rev_user, rev_user_text, |
587 | | - rev_timestamp, inverse_timestamp, rev_minor_edit) |
588 | | - VALUES ({$text_id}, {$page_id}, '', 0, 'MediaWiki default', '{$now}', '{$won}', 0)"; |
| 587 | + rev_timestamp, rev_minor_edit) |
| 588 | + VALUES ({$text_id}, {$page_id}, '', 0, 'MediaWiki default', '{$now}', 0)"; |
589 | 589 | $wgDatabase->query( $sql, $fname ); |
590 | 590 | |
591 | 591 | print "<li><pre>"; |
Index: trunk/phase3/includes/SpecialRecentchangeslinked.php |
— | — | @@ -74,13 +74,13 @@ |
75 | 75 | "rev_user_text,rev_timestamp,rev_minor_edit,page_is_new FROM $categorylinks, $revision, $page " . |
76 | 76 | "WHERE rev_timestamp > '{$cutoff}' {$cmq} AND cl_from=page_id AND cl_to=$catkey " . |
77 | 77 | "GROUP BY page_id,page_namespace,page_title,rev_user,rev_comment,rev_user_text," . |
78 | | - "rev_timestamp,rev_minor_edit,page_is_new,inverse_timestamp ORDER BY inverse_timestamp LIMIT {$limit}"; |
| 78 | + "rev_timestamp,rev_minor_edit,page_is_new ORDER BY rev_timestamp DESC LIMIT {$limit}"; |
79 | 79 | } else { |
80 | 80 | $sql = "SELECT page_id,page_namespace,page_title,rev_user,rev_comment," . |
81 | 81 | "rev_user_text,rev_timestamp,rev_minor_edit,page_is_new FROM $links, $revision, $page " . |
82 | 82 | "WHERE rev_timestamp > '{$cutoff}' {$cmq} AND l_to=page_id AND l_from=$id " . |
83 | 83 | "GROUP BY page_id,page_namespace,page_title,rev_user,rev_comment,rev_user_text," . |
84 | | - "rev_timestamp,rev_minor_edit,page_is_new,inverse_timestamp ORDER BY inverse_timestamp LIMIT {$limit}"; |
| 84 | + "rev_timestamp,rev_minor_edit,page_is_new ORDER BY rev_timestamp DESC LIMIT {$limit}"; |
85 | 85 | } |
86 | 86 | $res = $dbr->query( $sql, $fname ); |
87 | 87 | |
Index: trunk/phase3/includes/SpecialImport.php |
— | — | @@ -503,7 +503,6 @@ |
504 | 504 | 'old_user' => intval( $user->getId() ), |
505 | 505 | 'old_user_text' => $user->getName(), |
506 | 506 | 'old_timestamp' => $this->timestamp, |
507 | | - 'inverse_timestamp' => wfInvertTimestamp( $this->timestamp ), |
508 | 507 | 'old_minor_edit' => 0, |
509 | 508 | 'old_flags' => '' |
510 | 509 | ), $fname |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -718,7 +718,6 @@ |
719 | 719 | else { $redir = 0; } |
720 | 720 | |
721 | 721 | $now = wfTimestampNow(); |
722 | | - $won = wfInvertTimestamp( $now ); |
723 | 722 | wfSeedRandom(); |
724 | 723 | $rand = wfRandom(); |
725 | 724 | $isminor = ( $isminor && $wgUser->isLoggedIn() ) ? 1 : 0; |
— | — | @@ -759,7 +758,6 @@ |
760 | 759 | 'rev_timestamp' => $dbw->timestamp($now), |
761 | 760 | 'rev_minor_edit' => $isminor, |
762 | 761 | 'rev_user_text' => $wgUser->getName(), |
763 | | - 'inverse_timestamp' => $won, |
764 | 762 | ), $fname ); |
765 | 763 | |
766 | 764 | $this->mTitle->resetArticleID( $newid ); |
— | — | @@ -948,7 +946,6 @@ |
949 | 947 | $this->mCountAdjustment = $this->isCountable( $text ) |
950 | 948 | - $this->isCountable( $oldtext ); |
951 | 949 | $now = wfTimestampNow(); |
952 | | - $won = wfInvertTimestamp( $now ); |
953 | 950 | |
954 | 951 | $mungedText = $text; |
955 | 952 | $flags = Revision::compressRevisionText( $mungedText ); |
— | — | @@ -977,7 +974,6 @@ |
978 | 975 | 'rev_user' => $wgUser->getID(), |
979 | 976 | 'rev_user_text' => $wgUser->getName(), |
980 | 977 | 'rev_timestamp' => $dbw->timestamp( $now ), |
981 | | - 'inverse_timestamp' => $won |
982 | 978 | ), $fname |
983 | 979 | ); |
984 | 980 | |
— | — | @@ -1401,7 +1397,7 @@ |
1402 | 1398 | 'page_namespace' => $ns, |
1403 | 1399 | 'page_title' => $title, |
1404 | 1400 | 'rev_page = page_id' |
1405 | | - ), $fname, $this->getSelectOptions( array( 'ORDER BY' => 'inverse_timestamp' ) ) |
| 1401 | + ), $fname, $this->getSelectOptions( array( 'ORDER BY' => 'rev_timestamp DESC' ) ) |
1406 | 1402 | ); |
1407 | 1403 | |
1408 | 1404 | if( $dbr->numRows( $revisions ) > 1 && !$confirm ) { |
— | — | @@ -1975,7 +1971,6 @@ |
1976 | 1972 | 'rev_user' => $wgUser->getID(), |
1977 | 1973 | 'rev_user_text' => $wgUser->getName(), |
1978 | 1974 | 'rev_timestamp' => $timestamp, |
1979 | | - 'inverse_timestamp' => wfInvertTimestamp( $timestamp ), |
1980 | 1975 | 'rev_minor_edit' => intval($minor) ), |
1981 | 1976 | $fname ); |
1982 | 1977 | wfProfileOut( $fname ); |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -962,8 +962,10 @@ |
963 | 963 | |
964 | 964 | /** |
965 | 965 | * Sorting hack for MySQL 3, which doesn't use index sorts for DESC |
| 966 | + * No longer supported and nuked. |
966 | 967 | */ |
967 | 968 | function wfInvertTimestamp( $ts ) { |
| 969 | + wfDieDebugBacktrace("Inverted timestamps should be nuked away from all code\n"); |
968 | 970 | return strtr( |
969 | 971 | $ts, |
970 | 972 | '0123456789', |
Index: trunk/phase3/includes/SpecialContributions.php |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | rev_id,rev_timestamp,rev_comment,rev_minor_edit,rev_user_text |
106 | 106 | FROM $page,$revision $use_index |
107 | 107 | WHERE page_id=rev_page AND $condition $minorQuery " . |
108 | | - "ORDER BY inverse_timestamp LIMIT {$querylimit}"; |
| 108 | + "ORDER BY rev_timestamp DESC LIMIT {$querylimit}"; |
109 | 109 | $res = $dbr->query( $sql, $fname ); |
110 | 110 | $numRows = $dbr->numRows( $res ); |
111 | 111 | |
Index: trunk/phase3/includes/SpecialUndelete.php |
— | — | @@ -184,7 +184,6 @@ |
185 | 185 | 'cur_is_redirect' => $redir, |
186 | 186 | 'cur_random' => $rand, |
187 | 187 | 'cur_touched' => $dbw->timestamp( $now ), |
188 | | - 'inverse_timestamp' => wfInvertTimestamp( wfTimestamp( TS_MW, $s->ar_timestamp ) ), |
189 | 188 | ), $fname ); |
190 | 189 | |
191 | 190 | $newid = $dbw->insertId(); |
— | — | @@ -213,9 +212,9 @@ |
214 | 213 | $oldones = "AND ar_timestamp IN ( {$oldts} )"; |
215 | 214 | } |
216 | 215 | $sql = "INSERT INTO $old (old_namespace,old_title,old_text," . |
217 | | - "old_comment,old_user,old_user_text,old_timestamp,inverse_timestamp,old_minor_edit," . |
| 216 | + "old_comment,old_user,old_user_text,old_timestamp,old_minor_edit," . |
218 | 217 | "old_flags) SELECT ar_namespace,ar_title,ar_text,ar_comment," . |
219 | | - "ar_user,ar_user_text,ar_timestamp,99999999999999-ar_timestamp,ar_minor_edit,ar_flags " . |
| 218 | + "ar_user,ar_user_text,ar_timestamp,ar_minor_edit,ar_flags " . |
220 | 219 | "FROM $archive WHERE ar_namespace={$namespace} AND ar_title='{$t}' {$oldones}"; |
221 | 220 | if( $restoreAll || !empty( $oldts ) ) { |
222 | 221 | $dbw->query( $sql, $fname ); |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -1442,7 +1442,6 @@ |
1443 | 1443 | $comment = wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() ); |
1444 | 1444 | |
1445 | 1445 | $now = wfTimestampNow(); |
1446 | | - $won = wfInvertTimestamp( $now ); |
1447 | 1446 | $rand = wfRandom(); |
1448 | 1447 | $newid = $nt->getArticleID(); |
1449 | 1448 | $oldid = $this->getArticleID(); |
— | — | @@ -1474,8 +1473,8 @@ |
1475 | 1474 | 'rev_comment' => $comment, |
1476 | 1475 | 'rev_user' => $wgUser->getID(), |
1477 | 1476 | 'rev_user_text' => $wgUser->getName(), |
1478 | | - 'rev_timestamp' => $now, |
1479 | | - 'inverse_timestamp' => $won ), $fname |
| 1477 | + 'rev_timestamp' => $now |
| 1478 | + ), $fname |
1480 | 1479 | ); |
1481 | 1480 | $revid = $dbw->insertId(); |
1482 | 1481 | $dbw->insert( 'text', array( |
— | — | @@ -1578,7 +1577,6 @@ |
1579 | 1578 | $oldid = $this->getArticleID(); |
1580 | 1579 | $dbw =& wfGetDB( DB_MASTER ); |
1581 | 1580 | $now = $dbw->timestamp(); |
1582 | | - $won = wfInvertTimestamp( wfTimestamp(TS_MW,$now) ); |
1583 | 1581 | wfSeedRandom(); |
1584 | 1582 | $rand = wfRandom(); |
1585 | 1583 | |
— | — | @@ -1602,8 +1600,8 @@ |
1603 | 1601 | 'rev_comment' => $comment, |
1604 | 1602 | 'rev_user' => $wgUser->getID(), |
1605 | 1603 | 'rev_user_text' => $wgUser->getName(), |
1606 | | - 'rev_timestamp' => $now, |
1607 | | - 'inverse_timestamp' => $won ), $fname |
| 1604 | + 'rev_timestamp' => $now |
| 1605 | + ), $fname |
1608 | 1606 | ); |
1609 | 1607 | $revid = $dbw->insertId(); |
1610 | 1608 | $dbw->insert( 'text', array( |
— | — | @@ -1728,7 +1726,6 @@ |
1729 | 1727 | $fname = 'Title::createRedirect'; |
1730 | 1728 | $dbw =& wfGetDB( DB_MASTER ); |
1731 | 1729 | $now = wfTimestampNow(); |
1732 | | - $won = wfInvertTimestamp( $now ); |
1733 | 1730 | |
1734 | 1731 | $seqVal = $dbw->nextSequenceValue( 'page_page_id_seq' ); |
1735 | 1732 | $dbw->insert( 'page', array( |
— | — | @@ -1757,7 +1754,6 @@ |
1758 | 1755 | 'rev_user' => $wgUser->getID(), |
1759 | 1756 | 'rev_user_text' => $wgUser->getName(), |
1760 | 1757 | 'rev_timestamp' => $now, |
1761 | | - 'inverse_timestamp' => $won, |
1762 | 1758 | ), $fname ); |
1763 | 1759 | |
1764 | 1760 | $dbw->update( 'page', |
— | — | @@ -1913,4 +1909,4 @@ |
1914 | 1910 | } |
1915 | 1911 | |
1916 | 1912 | } |
1917 | | -?> |
\ No newline at end of file |
| 1913 | +?> |
Index: trunk/phase3/includes/Image.php |
— | — | @@ -701,7 +701,6 @@ |
702 | 702 | |
703 | 703 | |
704 | 704 | $now = wfTimestampNow(); |
705 | | - $won = wfInvertTimestamp( $now ); |
706 | 705 | $size = IntVal( $size ); |
707 | 706 | |
708 | 707 | if ( $wgUseCopyrightUpload ) { |
— | — | @@ -712,7 +711,6 @@ |
713 | 712 | else $textdesc = $desc ; |
714 | 713 | |
715 | 714 | $now = wfTimestampNow(); |
716 | | - $won = wfInvertTimestamp( $now ); |
717 | 715 | |
718 | 716 | # Test to see if the row exists using INSERT IGNORE |
719 | 717 | # This avoids race conditions by locking the row until the commit, and also |
Index: trunk/phase3/includes/PageHistory.php |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | "rev_comment,rev_user_text,rev_timestamp,rev_minor_edit ". |
71 | 71 | "FROM $revision $use_index " . |
72 | 72 | "WHERE rev_page=$id " . |
73 | | - "ORDER BY inverse_timestamp ".$db->limitResult($limitplus,$offset); |
| 73 | + "ORDER BY rev_timestamp DESC ".$db->limitResult($limitplus,$offset); |
74 | 74 | $res = $db->query( $sql, $fname ); |
75 | 75 | |
76 | 76 | $revs = $db->numRows( $res ); |