diff options
author | Domas Mituzas <midom@users.mediawiki.org> | 2005-02-21 15:33:58 +0000 |
---|---|---|
committer | Domas Mituzas <midom@users.mediawiki.org> | 2005-02-21 15:33:58 +0000 |
commit | 0aa2629efc67b65d661df536f2c0f2fed59f3d64 (patch) | |
tree | 6b9e1df63a600e896026ac5bff77bff438336e9f /maintenance/importUseModWiki.php | |
parent | 014a1d1bab9f1ca1f744723704fb07c3dd531a5b (diff) | |
download | mediawikicore-0aa2629efc67b65d661df536f2c0f2fed59f3d64.tar.gz mediawikicore-0aa2629efc67b65d661df536f2c0f2fed59f3d64.zip |
remove inverse_timestamp wherever it is found and disable wfInvertTimestamp()
dear mysql3, try to remember how beautiful filesorts are, you're so good at it.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/7515
Diffstat (limited to 'maintenance/importUseModWiki.php')
-rw-r--r-- | maintenance/importUseModWiki.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/maintenance/importUseModWiki.php b/maintenance/importUseModWiki.php index 720e4ab8f396..8a23f8bc778d 100644 --- a/maintenance/importUseModWiki.php +++ b/maintenance/importUseModWiki.php @@ -243,7 +243,6 @@ function importPage( $title ) $timestamp = wfUnix2Timestamp( time() ); $redirect = ( preg_match( '/^#REDIRECT/', $page->text ) ? 1 : 0 ); $random = mt_rand() / mt_getrandmax(); - $inverse = wfInvertTimestamp( $timestamp ); $revisions = array( $page ); } else { @@ -258,14 +257,13 @@ function importPage( $title ) $timestamp = wfUnix2Timestamp( $page->ts ); $redirect = ( preg_match( '/^#REDIRECT/', $page->text ) ? 1 : 0 ); $random = mt_rand() / mt_getrandmax(); - $inverse = wfInvertTimestamp( $timestamp ); $revisions = array(); } $sql = " INSERT - 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 - ($namespace,'$newtitle','$text','$comment',$userid,'$username','$timestamp','$inverse','$conversiontime',$minor,$redirect,$random);\n"; + 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 + ($namespace,'$newtitle','$text','$comment',$userid,'$username','$timestamp','$conversiontime',$minor,$redirect,$random);\n"; # History $revisions = array_merge( $revisions, fetchKeptPages( $title ) ); @@ -275,18 +273,17 @@ INSERT $any = false; $sql .= "INSERT - INTO old (old_namespace,old_title,old_text,old_comment,old_user,old_user_text,old_timestamp,inverse_timestamp,old_minor_edit) VALUES\n"; + INTO old (old_namespace,old_title,old_text,old_comment,old_user,old_user_text,old_timestamp,old_minor_edit) VALUES\n"; foreach( $revisions as $rev ) { $text = wfStrencode( recodeText( $rev->text ) ); $minor = ($rev->minor ? 1 : 0); list( $userid, $username ) = checkUserCache( $rev->username, $rev->host ); $username = wfStrencode( recodeText( $username ) ); $timestamp = wfUnix2Timestamp( $rev->ts ); - $inverse = wfInvertTimestamp( $timestamp ); $comment = wfStrencode( recodeText( $rev->summary ) ); if($any) $sql .= ","; - $sql .= "\n\t($namespace,'$newtitle','$text','$comment',$userid,'$username','$timestamp','$inverse',$minor)"; + $sql .= "\n\t($namespace,'$newtitle','$text','$comment',$userid,'$username','$timestamp',$minor)"; $any = true; } $sql .= ";\n\n"; |