Merge remote-tracking branch 'mike/master' into dev

This commit is contained in:
Mario Vavti 2017-11-04 10:11:48 +01:00
commit 9dfb471c0b
4 changed files with 18 additions and 4 deletions

View file

@ -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 {

View file

@ -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;

View file

@ -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]';

View file

@ -1,5 +1,4 @@
[region=aside]
[widget=sitesearch][/widget]
[/region]
[region=right_aside]
[widget=notifications][/widget]