Commit 76e95469 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remember the date we started collecting site stats


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 886f416c
......@@ -1403,6 +1403,9 @@ function xmldb_core_upgrade($oldversion=0) {
// Put best guess at installation time into config table.
set_config('installation_time', get_field_sql("SELECT MIN(ctime) FROM {site_content}"));
// Save the current time so we know when we started collecting stats
set_config('stats_installation_time', db_format_timestamp(time()));
// Add ctime to usr table for daily count of users created
$table = new XMLDBTable('usr');
$field = new XMLDBField('ctime');
......
......@@ -561,6 +561,7 @@ function core_postinst() {
set_config('lang', 'en.utf8');
set_config('installation_key', get_random_key());
set_config('installation_time', $now);
set_config('stats_installation_time', $now);
// PostgreSQL supports indexes over functions of columns, MySQL does not.
// We make use if this if we can
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment