aboutsummaryrefslogtreecommitdiffstats
path: root/mod/editwebpage.php
diff options
context:
space:
mode:
authorfriendica <redmatrix@redmatrix.me>2015-04-17 17:21:10 -0700
committerfriendica <redmatrix@redmatrix.me>2015-04-17 17:21:10 -0700
commit9f35971860e35a70162e469d7812c14ff949bf98 (patch)
tree621b3a34395bfce3a6d6ebc883dcc9a70921d0f3 /mod/editwebpage.php
parent3d99a6b5c4b8d754dff0666f7cca84724e0f95d9 (diff)
parentc02ff823f6b84cda431f6ca39701c88d22607b77 (diff)
downloadvolse-hubzilla-9f35971860e35a70162e469d7812c14ff949bf98.tar.gz
volse-hubzilla-9f35971860e35a70162e469d7812c14ff949bf98.tar.bz2
volse-hubzilla-9f35971860e35a70162e469d7812c14ff949bf98.zip
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'mod/editwebpage.php')
-rw-r--r--mod/editwebpage.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/mod/editwebpage.php b/mod/editwebpage.php
index 55cd3b4ef..a7564a126 100644
--- a/mod/editwebpage.php
+++ b/mod/editwebpage.php
@@ -135,12 +135,7 @@ function editwebpage_content(&$a) {
$layoutselect = '<input type="hidden" name="layout_mid" value="' . $layout . '" />';
else
$layoutselect = layout_select($itm[0]['uid'],$itm[0]['layout_mid']);
-
- $o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
- '$title' => t('Edit Webpage')
- ));
-
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
@@ -150,7 +145,6 @@ function editwebpage_content(&$a) {
'$confirmdelete' => t('Delete webpage?')
));
-
$tpl = get_markup_template("jot.tpl");
$jotplugins = '';
@@ -164,8 +158,9 @@ function editwebpage_content(&$a) {
$rp = 'webpages/' . $which;
-logger('canwrite: ' . (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')));
- $o .= replace_macros($tpl,array(
+ logger('canwrite: ' . (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')));
+
+ $editor = replace_macros($tpl,array(
'$return_path' => $rp,
'$webpage' => ITEM_WEBPAGE,
'$placeholdpagetitle' => t('Page link title'),
@@ -218,8 +213,12 @@ logger('canwrite: ' . (perm_is_allowed($owner, get_observer_hash(), 'post_photos
));
- if(($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash))
- $o .= '<br /><br /><a class="page-delete-link" href="item/drop/' . $itm[0]['id'] . '" >' . t('Delete Webpage') . '</a><br />';
+ $o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
+ '$title' => t('Edit Webpage'),
+ '$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
+ '$editor' => $editor,
+ '$id' => $itm[0]['id']
+ ));
return $o;