Commit 82e5d426 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't insert groupmessage activity type if it's already there


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 149c3cc1
......@@ -1254,7 +1254,9 @@ function xmldb_core_upgrade($oldversion=0) {
}
if ($oldversion < 2009102200) {
insert_record('activity_type', (object) array('name' => 'groupmessage', 'admin' => 0, 'delay' => 0));
if (!count_records_select('activity_type', 'name = ? AND plugintype IS NULL AND pluginname IS NULL', array('groupmessage'))) {
insert_record('activity_type', (object) array('name' => 'groupmessage', 'admin' => 0, 'delay' => 0));
}
}
if ($oldversion < 2009102900) {
......
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