| @@ 150-158 (lines=9) @@ | ||
| 147 | $catsAvailableCount = 0; |
|
| 148 | $cats_string = ''; |
|
| 149 | $cat_ids = explode('|' , $letterObj->getVar('letter_cats')); |
|
| 150 | foreach ($cat_ids as $cat_id) { |
|
| 151 | $catObj = $xnewsletter->getHandler('cat')->get($cat_id); |
|
| 152 | if ($gperm_handler->checkRight('newsletter_read_cat', $catObj->getVar('cat_id'), $groups, $xnewsletter->getModule()->mid())) { |
|
| 153 | ++$catsAvailableCount; |
|
| 154 | unset($letter_array['letter_cats']); |
|
| 155 | $letter_array['letter_cats'][] = $catObj->toArray(); |
|
| 156 | } |
|
| 157 | unset($catObj); |
|
| 158 | } |
|
| 159 | if ($catsAvailableCount > 0) { |
|
| 160 | $letters_array[] = $letter_array; |
|
| 161 | } |
|
| @@ 315-322 (lines=8) @@ | ||
| 312 | $cats_string = ''; |
|
| 313 | $cat_ids = explode('|' , $letterObj->getVar('letter_cats')); |
|
| 314 | unset($letter_array['letter_cats']); // IN PROGRESS |
|
| 315 | foreach ($cat_ids as $cat_id) { |
|
| 316 | $catObj = $xnewsletter->getHandler('cat')->get($cat_id); |
|
| 317 | if ($gperm_handler->checkRight('newsletter_read_cat', $catObj->getVar('cat_id'), $groups, $xnewsletter->getModule()->mid())) { |
|
| 318 | ++$catsAvailableCount; |
|
| 319 | $letter_array['letter_cats'][] = $catObj->toArray(); |
|
| 320 | } |
|
| 321 | unset($catObj); |
|
| 322 | } |
|
| 323 | if ($catsAvailableCount > 0) { |
|
| 324 | $letters_array[] = $letter_array; |
|
| 325 | } |
|