Commit cf87c1a5 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Upgrade without warnings when there are no users with multiple blogs


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 78b46a86
......@@ -1395,17 +1395,19 @@ function xmldb_core_upgrade($oldversion=0) {
$manyblogusers = get_records_sql_array($sql, null);
foreach($manyblogusers as $u) {
$where = (object)array(
'usr' => $u->id,
'field' => 'multipleblogs',
);
$data = (object)array(
'usr' => $u->id,
'field' => 'multipleblogs',
'value' => 1,
);
ensure_record_exists('usr_account_preference', $where, $data);
if ($manyblogusers) {
foreach($manyblogusers as $u) {
$where = (object)array(
'usr' => $u->id,
'field' => 'multipleblogs',
);
$data = (object)array(
'usr' => $u->id,
'field' => 'multipleblogs',
'value' => 1,
);
ensure_record_exists('usr_account_preference', $where, $data);
}
}
}
......
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