summaryrefslogtreecommitdiff
path: root/lib/noticelist.php
diff options
context:
space:
mode:
authorBrenda Wallace <shiny@cpan.org>2010-01-09 21:43:25 +0000
committerBrenda Wallace <shiny@cpan.org>2010-01-09 21:43:25 +0000
commit4de09d6bd4eab3259d42fa846e4dd31f2516a038 (patch)
treedf650402df1abcb64e1aa9640eeeb782b3c20f03 /lib/noticelist.php
parentf4459dfedcdea2f2a6078bedf9530deb45b6d52c (diff)
parentf396701b6466749c09ce16b1e7f2f96c10b05cdd (diff)
Merge commit 'origin/0.9.x' into 0.9.x
Diffstat (limited to 'lib/noticelist.php')
-rw-r--r--lib/noticelist.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 4c11ceed6..78abf34a7 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -191,6 +191,14 @@ class NoticeListItem extends Widget
function show()
{
+ if (empty($this->notice)) {
+ common_log(LOG_WARNING, "Trying to show missing notice; skipping.");
+ return;
+ } else if (empty($this->profile)) {
+ common_log(LOG_WARNING, "Trying to show missing profile (" . $this->notice->profile_id . "); skipping.");
+ return;
+ }
+
$this->showStart();
if (Event::handle('StartShowNoticeItem', array($this))) {
$this->showNotice();
@@ -371,7 +379,7 @@ class NoticeListItem extends Widget
function showNoticeLink()
{
- if($this->notice->is_local){
+ if($this->notice->is_local == Notice::LOCAL_PUBLIC || $this->notice->is_local == Notice::LOCAL_NONPUBLIC){
$noticeurl = common_local_url('shownotice',
array('notice' => $this->notice->id));
}else{