Index: branches/REL1_3A/phase3/includes/RecentChange.php |
— | — | @@ -109,10 +109,16 @@ |
110 | 110 | $now = $this->mAttribs['rc_timestamp']; |
111 | 111 | $curId = $this->mAttribs['rc_cur_id']; |
112 | 112 | |
113 | | - # Update rc_this_oldid for the entries which were current |
114 | | - $sql = "UPDATE recentchanges SET rc_this_oldid={$oldid} " . |
115 | | - "WHERE rc_namespace=$ns AND rc_title='$title' AND rc_timestamp='$lastTime'"; |
116 | | - wfQuery( $sql, DB_WRITE, $fname ); |
| 113 | + # HACK HACK HACK on Jamesday's insistence |
| 114 | + # http://bugzilla.wikipedia.org/show_bug.cgi?id=730 |
| 115 | + $age = time() - wfTimestamp2Unix( $lastTime ); |
| 116 | + $maxage = 7 * 24 * 3600; # our one week cutoff |
| 117 | + if( $age < $maxage ) { |
| 118 | + # Update rc_this_oldid for the entries which were current |
| 119 | + $sql = "UPDATE recentchanges SET rc_this_oldid={$oldid} " . |
| 120 | + "WHERE rc_namespace=$ns AND rc_title='$title' AND rc_timestamp='$lastTime'"; |
| 121 | + wfQuery( $sql, DB_WRITE, $fname ); |
| 122 | + } |
117 | 123 | |
118 | 124 | # Update rc_cur_time |
119 | 125 | $sql = "UPDATE recentchanges SET rc_cur_time='{$now}' " . |