From 47b8071ca7968ea489bd00c0746a2be39d6a6f2d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 15 Jan 2014 03:12:47 -0800 Subject: dav: throw exception if channel for requested DAV directory is deleted --- mod/events.php | 3 +-- mod/page.php | 4 ++-- mod/pubsites.php | 6 ++++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'mod') diff --git a/mod/events.php b/mod/events.php index 5cf0e425b..2a6067e65 100755 --- a/mod/events.php +++ b/mod/events.php @@ -355,8 +355,7 @@ function events_content(&$a) { '$new_event'=> array($a->get_baseurl().'/events/new',t('Create New Event'),'',''), '$previus' => array($a->get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''), '$next' => array($a->get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''), - '$calendar' => cal($y,$m,$links, ' eventcal'), - + '$calendar' => cal($y,$m,$links, ' eventcal'), '$events' => $events, diff --git a/mod/page.php b/mod/page.php index df17dbf52..56592116f 100644 --- a/mod/page.php +++ b/mod/page.php @@ -38,7 +38,7 @@ function page_content(&$a) { $channel_address = argv(1); $page_id = argv(2); - +dbg(1); $u = q("select channel_id from channel where channel_address = '%s' limit 1", dbesc($channel_address) ); @@ -63,7 +63,7 @@ function page_content(&$a) { dbesc($page_id), intval(ITEM_WEBPAGE) ); - +dbg(0); if(! $r) { // Check again with no permissions clause to see if it is a permissions issue diff --git a/mod/pubsites.php b/mod/pubsites.php index c15ba31ac..c08ca2ae5 100644 --- a/mod/pubsites.php +++ b/mod/pubsites.php @@ -29,8 +29,10 @@ function pubsites_content(&$a) { $j = json_decode($ret['body'],true); if($j) { $o .= ''; - foreach($j['sites'] as $jj) { - $o .= ''; + if($j['sites']) { + foreach($j['sites'] as $jj) { + $o .= ''; + } } $o .= '
' . t('Site URL') . '' . t('Access Type') . '' . t('Registration Policy') . '' . t('Location') . '
' . '' . $jj['url'] . '' . '' . $jj['access'] . '' . $jj['register'] . '' . $jj['location'] . '
' . '' . $jj['url'] . '' . '' . $jj['access'] . '' . $jj['register'] . '' . $jj['location'] . '
'; -- cgit v1.2.3