From b2e5b6c977c8f8af9bfd49dac3ce41a2183025da Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 5 Jul 2017 20:16:40 -0700 Subject: affinitiy slider settings were being updated on any submit of of settings/featured, plus minor non-code changes --- Zotlabs/Module/Settings/Featured.php | 18 ++++++++++-------- Zotlabs/Zot/Auth.php | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Settings/Featured.php b/Zotlabs/Module/Settings/Featured.php index 4885abd1d..ebe2996d3 100644 --- a/Zotlabs/Module/Settings/Featured.php +++ b/Zotlabs/Module/Settings/Featured.php @@ -10,14 +10,16 @@ class Featured { call_hooks('feature_settings_post', $_POST); - if(intval($_POST['affinity_cmax'])) { - set_pconfig(local_channel(),'affinity','cmax',intval($_POST['affinity_cmax'])); - } - if(intval($_POST['affinity_cmin'])) { - set_pconfig(local_channel(),'affinity','cmin',intval($_POST['affinity_cmin'])); - } - if(intval($_POST['affinity_cmax']) || intval($_POST['affinity_cmin'])) { - info( t('Affinity Slider settings updated.') . EOL); + if($_POST['affinity_slider-submit']) { + if(intval($_POST['affinity_cmax'])) { + set_pconfig(local_channel(),'affinity','cmax',intval($_POST['affinity_cmax'])); + } + if(intval($_POST['affinity_cmin'])) { + set_pconfig(local_channel(),'affinity','cmin',intval($_POST['affinity_cmin'])); + } + if(intval($_POST['affinity_cmax']) || intval($_POST['affinity_cmin'])) { + info( t('Affinity Slider settings updated.') . EOL); + } } build_sync_packet(); diff --git a/Zotlabs/Zot/Auth.php b/Zotlabs/Zot/Auth.php index d4d3bee1d..92b0fff78 100644 --- a/Zotlabs/Zot/Auth.php +++ b/Zotlabs/Zot/Auth.php @@ -176,7 +176,7 @@ class Auth { return false; } - $this->Debug('auth check request returned .' . print_r($j, true)); + $this->Debug('auth check request returned ' . print_r($j, true)); if(! $j['success']) return false; -- cgit v1.2.3 From 2d63bbb91e97d3a54440564620ef3093ecbe71fb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 10 Jul 2017 20:18:33 -0700 Subject: prevent expiration of conversations you are involved with - allows you to find your own comments months from now --- Zotlabs/Module/Item.php | 9 +++++++-- Zotlabs/Module/Like.php | 5 +++++ Zotlabs/Module/React.php | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index e96d4c669..9e64528fa 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -861,8 +861,8 @@ class Item extends \Zotlabs\Web\Controller { } - if(mb_strlen($datarray['title']) > 255) - $datarray['title'] = mb_substr($datarray['title'],0,255); + if(mb_strlen($datarray['title']) > 191) + $datarray['title'] = mb_substr($datarray['title'],0,191); if($webpage) { Zlib\IConfig::Set($datarray,'system', webpage_to_namespace($webpage), @@ -928,6 +928,11 @@ class Item extends \Zotlabs\Web\Controller { if($parent) { + // prevent conversations which you are involved from being expired + + if(local_channel()) + retain_item($parent); + // only send comment notification if this is a wall-to-wall comment, // otherwise it will happen during delivery diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php index 71336e8f3..c995079ce 100644 --- a/Zotlabs/Module/Like.php +++ b/Zotlabs/Module/Like.php @@ -504,6 +504,11 @@ class Like extends \Zotlabs\Web\Controller { $post = item_store($arr); $post_id = $post['item_id']; + + // save the conversation from expiration + + if(local_channel() && array_key_exists('item',$post) && (intval($post['item']['id']) != intval($post['item']['parent']))) + retain_item($post['item']['parent']); $arr['id'] = $post_id; diff --git a/Zotlabs/Module/React.php b/Zotlabs/Module/React.php index ed4f87e7e..6cd79c952 100644 --- a/Zotlabs/Module/React.php +++ b/Zotlabs/Module/React.php @@ -39,6 +39,10 @@ class React extends \Zotlabs\Web\Controller { $n['author_xchan'] = $channel['channel_hash']; $x = item_store($n); + + if(local_channel()) + retain_item($postid); + if($x['success']) { $nid = $x['item_id']; \Zotlabs\Daemon\Master::Summon(array('Notifier','like',$nid)); -- cgit v1.2.3