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)); $notice = self::twitterSimpleStatusArray(Notice::getKV($notification->notice_id));
} }
} }
$notifications_populated[] = array( $from_profile = Profile::getKV($notification->from_profile_id);
'id'=> $notification->id,
'from_profile'=> self::twitterUserArray(Profile::getKV($notification->from_profile_id)), // a user might have deleted their profile, don't show these notifications
'ntype'=> $notification->ntype, if($from_profile instanceof Profile) {
'notice'=> $notice,
'created_at'=>self::dateTwitter($notification->created), $notifications_populated[] = array(
'is_seen'=>$notification->is_seen '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 // mark as seen

View File

@ -2008,7 +2008,7 @@ window.siteTitle = $('head title').html(); // remember this for later use
// replace placeholders in translation // replace placeholders in translation
$.each(window.sL,function(k,v){ $.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 // set some static string