From d3c064cc345ac66a0c3ce2c79d566740b090be8c Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 30 Mar 2015 19:41:42 -0700 Subject: title of preview button incorrect, fix ability to upload to webpages --- mod/editblock.php | 3 ++- mod/editlayout.php | 2 +- mod/editpost.php | 2 +- mod/editwebpage.php | 4 +++- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'mod') diff --git a/mod/editblock.php b/mod/editblock.php index cacb5c27d..73be6a9f3 100644 --- a/mod/editblock.php +++ b/mod/editblock.php @@ -146,6 +146,7 @@ function editblock_content(&$a) { '$underline' => t('Underline'), '$quote' => t('Quote'), '$code' => t('Code'), + '$writefiles' => (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')), '$upload' => t('Upload photo'), '$attach' => t('Attach file'), '$weblink' => t('Insert web link'), @@ -175,7 +176,7 @@ function editblock_content(&$a) { '$acl' => '', '$bang' => '', '$profile_uid' => (intval($channel['channel_id'])), - '$preview' => true, // ((feature_enabled($uid,'preview')) ? t('Preview') : ''), + '$preview' => t('Preview'), '$jotplugins' => $jotplugins, '$sourceapp' => $itm[0]['app'], '$defexpire' => '', diff --git a/mod/editlayout.php b/mod/editlayout.php index 21607de8c..f6d76f6b4 100644 --- a/mod/editlayout.php +++ b/mod/editlayout.php @@ -170,7 +170,7 @@ function editlayout_content(&$a) { '$acl' => '', '$bang' => '', '$profile_uid' => (intval($owner)), - '$preview' => true, // ((feature_enabled($uid,'preview')) ? t('Preview') : ''), + '$preview' => t('Preview'), '$jotplugins' => $jotplugins, '$sourceapp' => t($a->sourcename), '$defexpire' => '', diff --git a/mod/editpost.php b/mod/editpost.php index edc5fa1b7..58ebe31cb 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -146,7 +146,7 @@ function editpost_content(&$a) { '$acl' => '', '$bang' => '', '$profile_uid' => local_channel(), - '$preview' => true, // ((feature_enabled(local_channel(),'preview')) ? t('Preview') : ''), + '$preview' => t('Preview'), '$jotplugins' => $jotplugins, '$sourceapp' => t($a->sourcename), '$catsenabled' => $catsenabled, diff --git a/mod/editwebpage.php b/mod/editwebpage.php index 3e0bd9ff4..e81cde479 100644 --- a/mod/editwebpage.php +++ b/mod/editwebpage.php @@ -164,11 +164,13 @@ 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( '$return_path' => $rp, '$webpage' => ITEM_WEBPAGE, '$placeholdpagetitle' => t('Page link title'), '$pagetitle' => $page_title, + '$writefiles' => (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')), '$action' => 'item', '$share' => t('Edit'), @@ -207,7 +209,7 @@ function editwebpage_content(&$a) { 'lockstate' => (((strlen($itm[0]['allow_cid'])) || (strlen($itm[0]['allow_gid'])) || (strlen($itm[0]['deny_cid'])) || (strlen($itm[0]['deny_gid']))) ? 'lock' : 'unlock'), '$bang' => '', '$profile_uid' => (intval($owner)), - '$preview' => true, // ((feature_enabled($uid,'preview')) ? t('Preview') : ''), + '$preview' => t('Preview'), '$jotplugins' => $jotplugins, '$sourceapp' => $a->sourcename, '$defexpire' => '', -- cgit v1.2.3