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