[CHD-1209] Patch to allow a list of Groups, Buckets including both Inbox's and All in a signal pull down.
I did this so I could use this for reports were I need both inbox = $category_id=0 and all $category_id=-1 without this patch you can have inbox or all = $category_id=0. That is how it is used throughout cerb4 now.
Change to Application.class.php
Under Class CerberusApplication
Function translateTeamCategoryCode
I made the following changes.
/**
* Translates the string version of a group/bucket combo into their
* respective IDs.
*
* @todo This needs a better name and home
*/
static function translateTeamCategoryCode($code) {
$t_or_c = substr($code,0,1);
$t_or_c_id = intval(substr($code,1));
if($t_or_c=='c') {
$categories = DAO_Bucket::getAll();
$team_id = $categories[$t_or_c_id]->team_id;
$category_id = $t_or_c_id;
} else {
$team_id = $t_or_c_id;
if($t_or_c=='a') {
$category_id = -1;
} else {
$category_id = 0;
}
}
return array($team_id, $category_id);
}Link to a real patch,
http://github.com/rmiddle/cerb4/commit/a62f740b1688df581d4d0bbf51de8947c...
| Attachment | Size |
|---|---|
| cerb4-chd-1209.patch | 590 bytes |
| cerb5-chd-1209.patch | 590 bytes |
Post new comment