From 1d8c15f2df45387993624a8217b648ac10491344 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 12:01:28 +0100 Subject: make suggest channels a feature --- include/features.php | 1 + include/widgets.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') 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..6d258d101 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); @@ -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 +} -- cgit v1.2.3 From d93ba783f54cf862bd91b231b7a9f7a19c657675 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Wed, 11 Dec 2013 15:35:19 +0000 Subject: Don't let nobody set an xconfig in safe search. --- include/dir_fns.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') 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') -- cgit v1.2.3 From aea1e1af82ab2f76f0d8a421ff101316421cbd84 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 18:57:42 +0100 Subject: this makes quotes appear as quotes in notes once page is reloaded. i guess thats fine since we use escape_tags() in notes.php --- include/widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/widgets.php b/include/widgets.php index 6d258d101..abbe1e2e0 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -146,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'), -- cgit v1.2.3