Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
557102b7
Commit
557102b7
authored
Apr 14, 2011
by
Francois Marier
Committed by
Gerrit Code Review
Apr 14, 2011
Browse files
Merge "Use hardcoded dates in logged-in user query for stats page (bug #759414)"
parents
c8f31479
55bf5bdc
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/lib/mahara.php
View file @
557102b7
...
...
@@ -2515,11 +2515,11 @@ function cron_site_data_daily() {
// Logged-in users
$interval
=
is_postgres
()
?
"'1 day'"
:
'1 day'
;
$where
=
"lastaccess >=
CURRENT_
DATE AND lastaccess <
CURRENT_
DATE
+ INTERVAL
$interval
"
;
$where
=
"lastaccess >= DATE
(?)
AND lastaccess < DATE
(?)
+ INTERVAL
$interval
"
;
insert_record
(
'site_data'
,
(
object
)
array
(
'ctime'
=>
$time
,
'type'
=>
'loggedin-users-daily'
,
'value'
=>
count_records_select
(
'usr'
,
$where
),
'value'
=>
count_records_select
(
'usr'
,
$where
,
array
(
$time
,
$time
)
),
));
// Process log file containing view visits
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment