diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-11-04 10:11:48 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-11-04 10:11:48 +0100 |
commit | 9dfb471c0bbf2978e528689f6c0885ff9abddc7d (patch) | |
tree | 026b4eb97df9dfa0516c46c72e9b70d19e32529c | |
parent | a899ce1c22386b9ff882048cba35d46f560ee654 (diff) | |
parent | 9abb061e7185a29cb85ebbad04deba715e1a6a06 (diff) | |
download | volse-hubzilla-9dfb471c0bbf2978e528689f6c0885ff9abddc7d.tar.gz volse-hubzilla-9dfb471c0bbf2978e528689f6c0885ff9abddc7d.tar.bz2 volse-hubzilla-9dfb471c0bbf2978e528689f6c0885ff9abddc7d.zip |
Merge remote-tracking branch 'mike/master' into dev
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Search.php | 3 | ||||
-rw-r--r-- | include/conversation.php | 12 | ||||
-rw-r--r-- | view/pdl/mod_search.pdl | 1 |
4 files changed, 18 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index e82c11a35..d5798e671 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -778,10 +778,14 @@ class Enotify { // Call localize_item to get a one line status for activities. // This should set $item['localized'] to indicate we have a brief summary. + // and perhaps $item['shortlocalized'] for an even briefer summary localize_item($item); - if($item['localize']) { + if($item['shortlocalize']) { + $itemem_text = $item['shortlocalize']; + } + elseif($item['localize']) { $itemem_text = $item['localize']; } else { diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php index 7bc3429b1..a572a5a42 100644 --- a/Zotlabs/Module/Search.php +++ b/Zotlabs/Module/Search.php @@ -56,8 +56,7 @@ class Search extends \Zotlabs\Web\Controller { $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0); - if((! local_channel()) || (! feature_enabled(local_channel(),'savedsearch'))) - $o .= search($search,'search-box','/search',((local_channel()) ? true : false)); + $o .= search($search,'search-box','/search',((local_channel()) ? true : false)); if(strpos($search,'#') === 0) { $tag = true; diff --git a/include/conversation.php b/include/conversation.php index f395b2cbe..5ff8b3864 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -162,6 +162,18 @@ function localize_item(&$item){ elseif(activity_match($item['verb'],ACTIVITY_DISLIKE)) { $bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s'); } + + // short version, in notification strings the author will be displayed separately + + if(activity_match($item['verb'],ACTIVITY_LIKE)) { + $shortbodyverb = t('likes %1$s\'s %2$s'); + } + elseif(activity_match($item['verb'],ACTIVITY_DISLIKE)) { + $shortbodyverb = t('doesn\'t like %1$s\'s %2$s'); + } + + $item['shortlocalize'] = sprintf($bodyverb, $objauthor, $plink); + $item['body'] = $item['localize'] = sprintf($bodyverb, $author, $objauthor, $plink); if($Bphoto != "") $item['body'] .= "\n\n\n" . '[zrl=' . chanlink_url($author_link) . '][zmg=80x80]' . $Bphoto . '[/zmg][/zrl]'; diff --git a/view/pdl/mod_search.pdl b/view/pdl/mod_search.pdl index 0bcdfdee3..e69657dac 100644 --- a/view/pdl/mod_search.pdl +++ b/view/pdl/mod_search.pdl @@ -1,5 +1,4 @@ [region=aside] -[widget=sitesearch][/widget] [/region] [region=right_aside] [widget=notifications][/widget] |