Skip to content
GitLab
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
b99fde67
Commit
b99fde67
authored
Dec 22, 2009
by
Richard Mansfield
Browse files
Add site_data table for counts of views/users/groups over time
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
c48f7edf
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/db/install.xml
View file @
b99fde67
...
...
@@ -793,5 +793,15 @@
<KEY
NAME=
"hostfk"
TYPE=
"foreign"
FIELDS=
"host"
REFTABLE=
"host"
REFFIELDS=
"wwwroot"
/>
</KEYS>
</TABLE>
<TABLE
NAME=
"site_data"
>
<FIELDS>
<FIELD
NAME=
"ctime"
TYPE=
"datetime"
NOTNULL=
"true"
/>
<FIELD
NAME=
"type"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"true"
/>
<FIELD
NAME=
"value"
TYPE=
"text"
LENGTH=
"small"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"ctime,type"
/>
</KEYS>
</TABLE>
</TABLES>
</XMLDB>
htdocs/lib/db/upgrade.php
View file @
b99fde67
...
...
@@ -1320,6 +1320,22 @@ function xmldb_core_upgrade($oldversion=0) {
add_field
(
$table
,
$field
);
}
// @TODO: Stats upgrade:
// Need table for weekly stats: counts of users, groups, views, view visits
// Daily data: count of logged-in users
// Add ctime to usr table for count of users created
// Add site start time to config table; initialise with earliest ctime from view, artefact, site_content?
// Add visits column to view table, updated daily from log on filesystem
// Records in cron table
if
(
$oldversion
<
2009122200
)
{
$table
=
new
XMLDBTable
(
'site_data'
);
$table
->
addFieldInfo
(
'ctime'
,
XMLDB_TYPE_DATETIME
,
null
,
XMLDB_NOTNULL
);
$table
->
addFieldInfo
(
'type'
,
XMLDB_TYPE_CHAR
,
255
,
null
,
XMLDB_NOTNULL
);
$table
->
addFieldInfo
(
'value'
,
XMLDB_TYPE_TEXT
,
'small'
,
null
);
$table
->
addKeyInfo
(
'primary'
,
XMLDB_KEY_PRIMARY
,
array
(
'ctime'
,
'type'
));
create_table
(
$table
);
}
return
$status
;
}
...
...
htdocs/lib/version.php
View file @
b99fde67
...
...
@@ -28,7 +28,7 @@
defined
(
'INTERNAL'
)
||
die
();
$config
=
new
StdClass
;
$config
->
version
=
200912
09
00
;
$config
->
version
=
200912
22
00
;
$config
->
release
=
'1.3.0dev'
;
$config
->
minupgradefrom
=
2008040200
;
$config
->
minupgraderelease
=
'1.0.0 (release tag 1.0.0_RELEASE)'
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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