Quote:
Originally Posted by Andreas
Untested, but
PHP Code:
// Rebuild Bitfields
require_once(DIR . '/includes/class_bitfield_builder.php');
vB_Bitfield_Builder::save($db);
$myobj =& vB_Bitfield_Builder::init();
$groupinfo = array();
for ($x = 1; $x < 9; $x++)
{
$groupinfo["$x"]['mypermissions'] = 0;
}
foreach ($myobj->data['ugp']['mypermissions'] AS $permtitle => $permvalue)
{
if (empty($permvalue['group']))
{
continue;
}
if (!empty($permvalue['install']))
{
foreach ($permvalue['install'] AS $gid)
{
$groupinfo["$gid"]['mypermission'] += $permvalue['value'];
}
}
}
foreach ($groupinfo AS $usergroupid => $permissions)
{
$db->query_write("UPDATE " . TABLE_PREFIX . "usergroup SET mypermissions=$permissions[mypermissions] WHERE usergroupid=$usergroupid");
}
build_forum_permissions();
|
Did this become broken in vb351 or vb352? For my hack, this code doesn't seem to allow the default install groups to be set during installation anymore (someone complained after installing it on vb3.5.2, which is when I tried the install/uninstall code again on my own test forum).
I spent the last 8 hours clicking around and found Andreas had a problem with his signature hack when vb351 came out, but since I didn't see the previous version, I don't know what he did to fix.
Sorry if this was answered elsewhere.