Fix #1669 and #1670 - announcements no permission error and wrong $unvie...

...wablefids

Merged arrays with unviewable fids so that all are considered now:
https://github.com/mybb/mybb/issues/1669

And corrected variable in 2 conditionals to fix this:
https://github.com/mybb/mybb/issues/1670
A foreach loop is faster than an array_map.