new hook for custiom calendar status on event creation

This commit is contained in:
Cornelius Weiß 2005-06-12 08:56:19 +00:00
parent 3183e68629
commit 1620054b81

View File

@ -241,6 +241,19 @@ class bo_resources
} }
} }
/**
* returns status for a new calendar entry depending on resources ACL
* @author Cornelius Weiß <egw@von-und-zu-weiss.de>
* @param int/array $res_id single id or array $num => $res_id
* @return array
*/
function get_calendar_new_status($res_id)
{
$cat_id = $this->so->get_value('cat_id',$res_id);
$cat_admin = $this->acl->get_cat_admin($cat_id);
return $this->acl->is_permitted($cat_id,EGW_ACL_DIRECT_BOOKING) ? A : U;
}
/** /**
* @author Cornelius Weiß <egw@von-und-zu-weiss.de> * @author Cornelius Weiß <egw@von-und-zu-weiss.de>
* query infolog for entries matching $pattern * query infolog for entries matching $pattern