aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-04 20:53:59 -0800
committerfriendica <info@friendica.com>2012-11-04 20:53:59 -0800
commit152641bf243dde9cf01d9a95038939ac9ddf0f3e (patch)
tree8ac950c4cb23d963691c8fa946fd6fed19eb8d9e /include
parent94f737b69912a32b5ae693f5aab3da0df7956926 (diff)
downloadvolse-hubzilla-152641bf243dde9cf01d9a95038939ac9ddf0f3e.tar.gz
volse-hubzilla-152641bf243dde9cf01d9a95038939ac9ddf0f3e.tar.bz2
volse-hubzilla-152641bf243dde9cf01d9a95038939ac9ddf0f3e.zip
that was certainly some fun debugging (not)
Diffstat (limited to 'include')
-rw-r--r--include/ItemObject.php2
-rw-r--r--include/conversation.php14
-rw-r--r--include/template_processor.php2
3 files changed, 6 insertions, 12 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index e55c61433..89e8dd3bc 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -556,7 +556,7 @@ class Item extends BaseObject {
'$edimg' => t('Image'),
'$edurl' => t('Link'),
'$edvideo' => t('Video'),
- '$preview' => t('Preview'),
+ '$preview' => ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''),
'$indent' => $indent,
'$sourceapp' => t($a->sourcename),
'$ww' => (($conv->get_mode() === 'network') ? $ww : '')
diff --git a/include/conversation.php b/include/conversation.php
index 13b6c566c..e9e550a12 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1655,7 +1655,7 @@ function format_like($cnt,$arr,$type,$id) {
}}
-function status_editor($a,$x, $notes_cid = 0, $popup=false) {
+function status_editor($a,$x,$popup=false) {
$o = '';
@@ -1688,16 +1688,9 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
$jotplugins = '';
$jotnets = '';
- $catsenabled = feature_enabled($x['profile_uid'],'categories');
-
call_hooks('jot_tool', $jotplugins);
call_hooks('jot_networks', $jotnets);
- if($notes_cid)
- $jotnets .= '<input type="hidden" name="contact_allow[]" value="' . $notes_cid .'" />';
-
- $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
-
$o .= replace_macros($tpl,array(
'$return_path' => $a->query_string,
'$action' => $a->get_baseurl(true) . '/item',
@@ -1718,7 +1711,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
'$shortnoloc' => t('clear location'),
'$title' => "",
'$placeholdertitle' => t('Set title'),
- '$catsenabled' => $catsenabled,
+ '$catsenabled' => ((feature_enabled($x['profile_uid'],'categories')) ? 'categories' : ''),
'$category' => "",
'$placeholdercategory' => t('Categories (comma-separated list)'),
'$wait' => t('Please wait'),
@@ -1738,8 +1731,9 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
'$acl' => $x['acl'],
'$bang' => $x['bang'],
'$profile_uid' => $x['profile_uid'],
- '$preview' => t('Preview'),
+ '$preview' => ((feature_enabled($x['profile_uid'],'preview')) ? t('Preview') : ''),
'$sourceapp' => t($a->sourcename),
+ '$jotplugins' => $jotplugins,
));
diff --git a/include/template_processor.php b/include/template_processor.php
index 0f52d12a4..89f03dfe0 100644
--- a/include/template_processor.php
+++ b/include/template_processor.php
@@ -71,7 +71,7 @@
$val = $this->_get_var($args[2]);
}
$x = preg_split("|{{ *else *}}|", $args[3]);
- return ( $val ? $x[0] : (isset($x[1]) ? $x[1] : ""));
+ return ( ($val) ? $x[0] : (isset($x[1]) ? $x[1] : ""));
}
/**