Commit 09997ec4 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Enable multipleblogs for users with zero blogs


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent cf87c1a5
...@@ -1387,11 +1387,11 @@ function xmldb_core_upgrade($oldversion=0) { ...@@ -1387,11 +1387,11 @@ function xmldb_core_upgrade($oldversion=0) {
$sql = " $sql = "
SELECT u.id SELECT u.id
FROM {usr} u FROM {usr} u
JOIN {artefact} a LEFT JOIN {artefact} a
ON a.owner = u.id ON (a.owner = u.id AND a.artefacttype = 'blog')
WHERE a.artefacttype = 'blog' WHERE u.id > 0
GROUP BY u.id GROUP BY u.id
HAVING COUNT(a.id) > 1"; HAVING COUNT(a.id) != 1";
$manyblogusers = get_records_sql_array($sql, null); $manyblogusers = get_records_sql_array($sql, null);
......
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