Commit 4bed8a15 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add create group event

parent fd09d25b
......@@ -1170,6 +1170,13 @@ function xmldb_core_upgrade($oldversion=0) {
execute_sql("DELETE FROM {group_member_request} WHERE \"group\" NOT IN (SELECT id FROM {group} WHERE jointype = 'request')");
}
if ($oldversion < 2009081800) {
$event = (object)array(
'name' => 'creategroup',
);
ensure_record_exists('event_type', $event, $event);
}
return $status;
}
......
......@@ -298,6 +298,8 @@ function group_create($data) {
}
}
$data['id'] = $id;
handle_event('creategroup', $data);
db_commit();
return $id;
......
......@@ -700,6 +700,7 @@ function core_install_firstcoredata_defaults() {
'removefriend',
'addfriendrequest',
'removefriendrequest',
'creategroup',
);
foreach ($eventtypes as $et) {
......
......@@ -27,7 +27,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2009080601;
$config->version = 2009081800;
$config->release = '1.2.0alpha4dev';
$config->minupgradefrom = 2008040200;
$config->minupgraderelease = '1.0.0 (release tag 1.0.0_RELEASE)';
......
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