if ($this->cnt > 0) {
while ($notice->fetch()) {
+ // Check scope of notice to current profile (including guests)
+ if (!$notice->isCurrentProfileInScope()) {
+ // Not in scope
+ continue;
+ }
+
++$cnt;
if (!$this->max_id) {
$source = null;
$ns = $notice->getSource();
- if ($ns) {
+ if ($ns instanceof Notice_source) {
if (!empty($ns->name) && !empty($ns->url)) {
$source = '<a href="'
. htmlspecialchars($ns->url)