notifications bug

This commit is contained in:
Hannes Mannerheim 2014-11-25 21:38:00 +01:00
parent b69f5d364a
commit 5e8c84edb2
2 changed files with 17 additions and 10 deletions

View File

@ -103,15 +103,22 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction
$notice = self::twitterSimpleStatusArray(Notice::getKV($notification->notice_id));
}
}
$notifications_populated[] = array(
'id'=> $notification->id,
'from_profile'=> self::twitterUserArray(Profile::getKV($notification->from_profile_id)),
'ntype'=> $notification->ntype,
'notice'=> $notice,
'created_at'=>self::dateTwitter($notification->created),
'is_seen'=>$notification->is_seen
);
$from_profile = Profile::getKV($notification->from_profile_id);
// a user might have deleted their profile, don't show these notifications
if($from_profile instanceof Profile) {
$notifications_populated[] = array(
'id'=> $notification->id,
'from_profile'=> self::twitterUserArray($from_profile),
'ntype'=> $notification->ntype,
'notice'=> $notice,
'created_at'=>self::dateTwitter($notification->created),
'is_seen'=>$notification->is_seen
);
}
}
// mark as seen

View File

@ -2008,7 +2008,7 @@ window.siteTitle = $('head title').html(); // remember this for later use
// replace placeholders in translation
$.each(window.sL,function(k,v){
window.sL[k] = v.replace('{site-title}',window.siteTitle);
window.sL[k] = v.replace(/{site-title}/g,window.siteTitle);
});
// set some static string