From: Brion Vibber Date: Mon, 1 Sep 2003 08:29:24 +0000 (+0000) Subject: Fix timestamp on undelete X-Git-Tag: 1.1.0~297 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=65eef80740a6f6ecaa2a1faf3d06257ab20cf5ca;p=lhc%2Fweb%2Fwiklou.git Fix timestamp on undelete --- diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index 5ac500540e..0c19aae64d 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -120,11 +120,12 @@ function wfSpecialUndelete( $par ) $row = wfFetchObject( $res ); if( $row->count == 0) { # Have to create new article... + $now = wfTimestampNow(); $max = wfGetSQL( "archive", "MAX(ar_timestamp)", "ar_namespace={$namespace} AND ar_title='{$t}'" ); $sql = "INSERT INTO cur (cur_namespace,cur_title,cur_text," . - "cur_comment,cur_user,cur_user_text,cur_timestamp,inverse_timestamp,cur_minor_edit,cur_random)" . + "cur_comment,cur_user,cur_user_text,cur_timestamp,inverse_timestamp,cur_minor_edit,cur_random,cur_touched)" . "SELECT ar_namespace,ar_title,ar_text,ar_comment," . - "ar_user,ar_user_text,ar_timestamp,99999999999999-ar_timestamp,ar_minor_edit,RAND() FROM archive " . + "ar_user,ar_user_text,ar_timestamp,99999999999999-ar_timestamp,ar_minor_edit,RAND(),'{$now}' FROM archive " . "WHERE ar_namespace={$namespace} AND ar_title='{$t}' AND ar_timestamp={$max}"; wfQuery( $sql, $fname ); $newid = wfInsertId();