• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

PukiWiki


Commit MetaInfo

修訂06b71b2f3bef03514080af8a6b9dfc17fa913be7 (tree)
時間2016-01-17 22:49:25
作者umorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack2/141 Fix: counter plugin fails for yesterday on PHP5.1+

Change Summary

差異

--- a/plugin/counter.inc.php
+++ b/plugin/counter.inc.php
@@ -88,7 +88,7 @@ function plugin_counter_get_count($page)
8888 // Anothoer day?
8989 if ($counters[$page]['date'] != $default['date']) {
9090 $modify = TRUE;
91- $is_yesterday = ($counters[$page]['date'] == get_date('Y/m/d', strtotime('yesterday', UTIME)));
91+ $is_yesterday = ($counters[$page]['date'] == get_date('Y/m/d', UTIME - 24 * 60 * 60));
9292 $counters[$page]['ip'] = $_SERVER['REMOTE_ADDR'];
9393 $counters[$page]['date'] = $default['date'];
9494 $counters[$page]['yesterday'] = $is_yesterday ? $counters[$page]['today'] : 0;
@@ -116,4 +116,3 @@ function plugin_counter_get_count($page)
116116
117117 return $counters[$page];
118118 }
119-?>