aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-11 15:32:25 -0800
committerfriendica <info@friendica.com>2013-12-11 15:32:25 -0800
commitc57b6745e8d7222d9cecfb04cd81c9ef7eb25d05 (patch)
treecc9eef5ea3c6676cd537f2f89776ab6d3c835db1 /include
parent2c02f57f276658269a6cc2031fb0fc9ac0a9077c (diff)
parent06c81e189f031a74c54aa14b1f29c93379e7cf3c (diff)
downloadvolse-hubzilla-c57b6745e8d7222d9cecfb04cd81c9ef7eb25d05.tar.gz
volse-hubzilla-c57b6745e8d7222d9cecfb04cd81c9ef7eb25d05.tar.bz2
volse-hubzilla-c57b6745e8d7222d9cecfb04cd81c9ef7eb25d05.zip
Merge https://github.com/friendica/red into zpull
Conflicts: view/theme/redbasic/css/style.css
Diffstat (limited to 'include')
-rw-r--r--include/dir_fns.php3
-rw-r--r--include/features.php1
-rw-r--r--include/widgets.php7
3 files changed, 8 insertions, 3 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 0c9a6bd9f..02e8186b7 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -22,7 +22,8 @@ function dir_sort_links() {
function dir_safe_mode() {
$observer = get_observer_hash();
-
+if (! $observer)
+ return;
if ($observer)
$safe_mode = get_xconfig($observer,'directory','safe_mode');
if($safe_mode === '0')
diff --git a/include/features.php b/include/features.php
index 05206106a..978d7af8a 100644
--- a/include/features.php
+++ b/include/features.php
@@ -49,6 +49,7 @@ function get_features() {
array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on')),
array('new_tab', t('Network New Tab'), t('Enable tab to display all new Network activity')),
array('affinity', t('Affinity Tool'), t('Filter stream activity by depth of relationships')),
+ array('suggest', t('Suggest Channels'), t('Show channel suggestions')),
),
// Item tools
diff --git a/include/widgets.php b/include/widgets.php
index cea5a6ce2..abbe1e2e0 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -57,6 +57,9 @@ function widget_collections($args) {
function widget_suggestions($arr) {
+ if((! local_user()) || (! feature_enabled(local_user(),'suggest')))
+ return '';
+
require_once('include/socgraph.php');
$r = suggestion_query(local_user(),get_observer_hash(),0,20);
@@ -143,7 +146,7 @@ function widget_notes($arr) {
if(! feature_enabled(local_user(),'private_notes'))
return '';
- $text = htmlspecialchars(get_pconfig(local_user(),'notes','text'));
+ $text = get_pconfig(local_user(),'notes','text');
$o = replace_macros(get_markup_template('notes.tpl'), array(
'$banner' => t('Notes'),
@@ -330,4 +333,4 @@ function widget_tagcloud_wall($arr) {
if(feature_enabled($a->profile['profile_uid'],'tagadelic'))
return tagblock('search',$a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL);
return '';
-} \ No newline at end of file
+}