{
| { $query2 = $db->simple_select("forumpermissions", "canviewthreads,candlattachments,canratethreads,caneditposts,candeleteposts,candeletethreads,caneditattachments,canvotepolls,cansearch", "fid='{$fid}' AND gid='{$usergroup['gid']}'", array('limit' => 1)); $existing_permissions = $db->fetch_array($query2);
|
// Delete existing permissions $db->delete_query("forumpermissions", "fid='{$fid}' AND gid='{$usergroup['gid']}'");
| // Delete existing permissions $db->delete_query("forumpermissions", "fid='{$fid}' AND gid='{$usergroup['gid']}'");
|
"fid" => $fid, "gid" => $usergroup['gid'], "canview" => $pview, "canviewthreads" => $pview, "candlattachments" => $pview, "canpostthreads" => $pthreads, "canpostreplys" => $preplies, "canpostattachments" => $pattachments, "canratethreads" => $pview, "caneditposts" => $ppost, "candeleteposts" => $ppost, "candeletethreads" => $pthreads, "caneditattachments" => $pattachments, "canpostpolls" => $ppolls, "canvotepolls" => $pview, "cansearch" => $pview
| "fid" => intval($fid), "gid" => intval($usergroup['gid']), "canview" => intval($pview), "canviewthreads" => intval($existing_permissions['canviewthreads']), "candlattachments" => intval($existing_permissions['candlattachments']), "canpostthreads" => intval($pthreads), "canpostreplys" => intval($preplies), "canpostattachments" => intval($pattachments), "canratethreads" => intval($existing_permissions['canratethreads']), "caneditposts" => intval($existing_permissions['caneditposts']), "candeleteposts" => intval($existing_permissions['candeleteposts']), "candeletethreads" => intval($existing_permissions['candeletethreads']), "caneditattachments" => intval($existing_permissions['caneditattachments']), "canpostpolls" => intval($ppolls), "canvotepolls" => intval($existing_permissions['canvotepolls']), "cansearch" => intval($existing_permissions['cansearch'])
|