//
// Get $f_access
//
// If f_access has been passed, or auth is needed to return an array of forums
// then we need to pull the auth information on the given forum (or all forums)
if (empty($f_access))
{
if (!$forums = $datastore->get('cat_forums'))
{
$datastore->update('cat_forums');
$forums = $datastore->get('cat_forums');
}
if ($forum_id == AUTH_LIST_ALL)
{
$f_access = $forums['f'];
}
else if (isset($forums['f'][$forum_id]))
{
$f_access[$forum_id] = $forums['f'][$forum_id];
}
}
else if (isset($f_access['forum_id']))
{
// Change passed $f_access format for later using in foreach()
$f_access = array($f_access['forum_id'] => $f_access);
}
if (empty($f_access))
{
trigger_error(__FUNCTION__ .'(): empty $f_access', E_USER_ERROR);
}