Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perbaikan status pengunjung tidak bertambah #443

Merged
merged 3 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/Helpers/Counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ public function allVisitors($days = null)
{
$prefix = config('database.connections.' . config('database.default') . '.prefix');
if ($days) {
$hits = DB::table($prefix . 'das_counter_page_visitor')->groupBy('visitor_id')->where('created_at', '>=', Carbon::now()->subDays($days))->count();
$hits = DB::table($prefix . 'das_counter_page_visitor')->distinct('visitor_id')->where('created_at', '>=', Carbon::now()->subDays($days))->count();
} else {
$hits = DB::table($prefix . 'das_counter_page_visitor')->groupBy('visitor_id')->count();
$hits = DB::table($prefix . 'das_counter_page_visitor')->distinct('visitor_id')->count();
}

return number_format($hits);
Expand Down Expand Up @@ -200,7 +200,7 @@ private function processHit($page)
*/
private static function hashVisitor()
{
$cookie = Cookie::get(env('COUNTER_COOKIE', 'kryptonit3-counter'));
$cookie = Cookie::get(env('COUNTER_COOKIE', 'kd_session'));
$visitor = $cookie !== false ? $cookie : $_SERVER['REMOTE_ADDR'];
return hash("SHA256", env('APP_KEY') . $visitor);
}
Expand Down
3 changes: 2 additions & 1 deletion catatan_rilis.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ Terima kasih pada [untuk diisi] yang terus berkontribusi. Terima kasih pula pada
#### Perbaikan BUG

1. [#430](https://github.com/OpenSID/OpenDK/issues/430) Perbaiki ihat daftar prosedur di menu unduhan error 500.
2. [#441](https://github.com/OpenSID/OpenDK/issues/441) Perbaiki perhitungan statistik pengunjung website.


#### TEKNIS

1. [#427](https://github.com/OpenSID/OpenDK/pull/427) Teknis perbaiki error 500 setelah login.
2. [#431](https://github.com/OpenSID/OpenDK/pull/431) Teknis ignore .phpcs-cache
2. [#431](https://github.com/OpenSID/OpenDK/pull/431) Teknis ignore .phpcs-cache.