From dea721a3f866956e0d0b86316679e05498b1d81c Mon Sep 17 00:00:00 2001 From: Friendika <info@friendika.com> Date: Wed, 8 Jun 2011 21:43:32 -0700 Subject: [PATCH] minor fixes to apps (don't show notes if not logged in) and photos (tag delete link is leaking to unauthorised users) --- mod/apps.php | 14 ++++++++++++-- mod/photos.php | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/mod/apps.php b/mod/apps.php index 58752de322..f25722df78 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -5,10 +5,20 @@ function apps_content(&$a) { $o .= '<h3>' . t('Applications') . '</h3>'; - $o .= '<div class="app-title"><a href="notes">' . t('Private Notes') . '</a></div>'; + $apps = false; - if($a->apps) + if(local_user()) { + $apps = true; + $o .= '<div class="app-title"><a href="notes">' . t('Private Notes') . '</a></div>'; + } + + if($a->apps) { + $apps = true; $o .= $a->apps; + } + + if(! $apps) + notice( t('No installed applications.') . EOL); return $o; diff --git a/mod/photos.php b/mod/photos.php index f1a2d635cb..f8749f5f7c 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1106,9 +1106,10 @@ function photos_content(&$a) { $tag_str .= bbcode($t); } $tags = array(t('Tags: '), $tag_str); - if($cmd === 'edit') + if($cmd === 'edit') { $tags[] = $a->get_baseurl() . '/tagrm/' . $link_item['id']; $tags[] = t('[Remove any tag]'); + } } -- 2.39.5