From f2f3372aa9fd6ce5e121f52359bc4a05a79592d1 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 6 Sep 2013 04:07:43 -0700 Subject: provide ability to delete webpages, layouts and blocks --- mod/editblock.php | 8 +++++++- mod/editlayout.php | 7 ++++++- mod/editwebpage.php | 7 ++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/mod/editblock.php b/mod/editblock.php index 6654a66b5..48136b126 100644 --- a/mod/editblock.php +++ b/mod/editblock.php @@ -80,7 +80,7 @@ function editblock_content(&$a) { $o .= replace_macros(get_markup_template('edpost_head.tpl'), array( - '$title' => t('Edit block') + '$title' => t('Edit Block') )); @@ -147,6 +147,12 @@ function editblock_content(&$a) { '$sourceapp' => t($a->sourcename), )); + + $ob = get_observer_hash(); + + if(($itm[0]['author_xchan'] === $ob) || ($itm[0]['owner_xchan'] === $ob)) + $o .= '

' . t('Delete Block') . '
'; + return $o; } diff --git a/mod/editlayout.php b/mod/editlayout.php index 1cebdc845..474244653 100644 --- a/mod/editlayout.php +++ b/mod/editlayout.php @@ -66,7 +66,7 @@ function editlayout_content(&$a) { $plaintext = false; $o .= replace_macros(get_markup_template('edpost_head.tpl'), array( - '$title' => t('Edit block') + '$title' => t('Edit Layout') )); @@ -132,6 +132,11 @@ function editlayout_content(&$a) { '$sourceapp' => t($a->sourcename), )); + $ob = get_observer_hash(); + + if(($itm[0]['author_xchan'] === $ob) || ($itm[0]['owner_xchan'] === $ob)) + $o .= '

' . t('Delete Layout') . '
'; + return $o; } diff --git a/mod/editwebpage.php b/mod/editwebpage.php index 273c6a465..ea07a3758 100644 --- a/mod/editwebpage.php +++ b/mod/editwebpage.php @@ -85,7 +85,7 @@ function editwebpage_content(&$a) { $o .= replace_macros(get_markup_template('edpost_head.tpl'), array( - '$title' => t('Edit post') + '$title' => t('Edit Webpage') )); @@ -153,6 +153,11 @@ function editwebpage_content(&$a) { '$sourceapp' => t($a->sourcename), )); + $ob = get_observer_hash(); + + if(($itm[0]['author_xchan'] === $ob) || ($itm[0]['owner_xchan'] === $ob)) + $o .= '

' . t('Delete Webpage') . '
'; + return $o; } -- cgit v1.2.3