We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 6902c0af authored by Evan Prodromou's avatar Evan Prodromou

Add group posts to createsim.php

parent bc2f64d7
......@@ -103,6 +103,21 @@ function newNotice($i, $tagmax)
}
}
$in_group = rand(0, 5);
if ($in_group == 0) {
$groups = $user->getGroups();
if ($groups->N > 0) {
$gval = rand(0, $group->N);
$groups->fetch(); // go to 0th
for ($i = 0; $i < $gval; $i++) {
$groups->fetch();
}
$options['groups'] = array($groups->id);
$content = "!".$groups->nickname." ".$content;
}
}
$notice = Notice::saveNew($user->id, $content, 'system', $options);
}
......
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