Index: trunk/phpwiki/fpw/special_wantedpages.php |
— | — | @@ -75,13 +75,14 @@ |
76 | 76 | global $doRefresh , $wikiRefreshThisPage , $wikiResourcesWarning , $wikiNoRefresh ; |
77 | 77 | $pn = "Log:Most_Wanted" ; |
78 | 78 | $minRefreshPeriod = 5*60; # Refuse to update more often than every 5 minutes |
| 79 | + $timeOffset = 10000000; # Drop our date back a few months to keep us out of RecentChanges |
79 | 80 | $ret = "<nowiki>" ; |
80 | 81 | |
81 | 82 | $ret .= "<p align=center><font size='+1'><b><a href=\"" ; |
82 | 83 | $ret .= wikiLink ( "special:WantedPages&doRefresh=yes" ) ; |
83 | 84 | $ret .= "\">$wikiRefreshThisPage</a></b></font><br>$wikiResourcesWarning</p></nowiki>\n" ; |
84 | 85 | if ( $doRefresh == "yes" ) { |
85 | | - $timestamp = getMySQL ( "cur" , "UNIX_TIMESTAMP(cur_timestamp)" , "cur_title=\"$pn\"" ) ; |
| 86 | + $timestamp = getMySQL ( "cur" , "UNIX_TIMESTAMP(cur_timestamp)" , "cur_title=\"$pn\"" ) + $timeOffset ; |
86 | 87 | if ( ( $lastrefreshed = time() - $timestamp ) < $minRefreshPeriod ) { |
87 | 88 | $ret .= "<p><i>" . str_replace ( array ( "$1", "$2" ) , |
88 | 89 | array ( round ( $lastrefreshed / 60 ) , round ( ( $minRefreshPeriod - $lastrefreshed ) / 60 ) ), |
— | — | @@ -92,9 +93,7 @@ |
93 | 94 | $p = new wikiPage ; |
94 | 95 | $p->setTitle ( $pn ) ; |
95 | 96 | $p->ensureExistence () ; |
96 | | - #$p->setEntry ( $o , "Refresh" , 0 , "System" , 1 , ",cur_timestamp=cur_timestamp" ) ; # Storing, don't show on RC |
97 | | - $p->setEntry ( $o , "Refresh" , 0 , "System" , 1 , "" ) ; # Storing, don't show on RC |
98 | | - $timestamp2 = getMySQL ( "cur" , "UNIX_TIMESTAMP(cur_timestamp)" , "cur_title=\"$pn\"" ) ; |
| 97 | + $p->setEntry ( $o , "Refresh" , 0 , "System" , 1 , ",cur_timestamp=FROM_UNIXTIME(" . (time() - $timeOffset) . ")" ) ; |
99 | 98 | return $ret; |
100 | 99 | } |
101 | 100 | } |