some cloeanup after last commit

This commit is contained in:
Mario
2024-02-28 10:04:22 +00:00
parent 37878bf0a3
commit 96e8316633
4 changed files with 1 additions and 45 deletions

View File

@@ -486,12 +486,6 @@ class Like extends Controller {
$bodyverb = t('%1$s likes %2$s\'s %3$s');
if ($verb === 'dislike')
$bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
if ($verb === 'agree')
$bodyverb = t('%1$s agrees with %2$s\'s %3$s');
if ($verb === 'disagree')
$bodyverb = t('%1$s doesn\'t agree with %2$s\'s %3$s');
if ($verb === 'abstain')
$bodyverb = t('%1$s abstains from a decision on %2$s\'s %3$s');
if ($verb === 'attendyes')
$bodyverb = t('%1$s is attending %2$s\'s %3$s');
if ($verb === 'attendno')

View File

@@ -1108,7 +1108,6 @@ class Photos extends \Zotlabs\Web\Controller {
$conv_responses = array(
'like' => array('title' => t('Likes','title')),'dislike' => array('title' => t('Dislikes','title')),
'agree' => array('title' => t('Agree','title')),'disagree' => array('title' => t('Disagree','title')), 'abstain' => array('title' => t('Abstain','title')),
'attendyes' => array('title' => t('Attending','title')), 'attendno' => array('title' => t('Not attending','title')), 'attendmaybe' => array('title' => t('Might attend','title'))
);

View File

@@ -77,17 +77,6 @@ class Pinned {
}
}
$consensus = (intval($item['item_consensus']) ? true : false);
if($consensus) {
$conv_responses['agree'] = [ 'title' => t('Agree','title') ];
$conv_responses['disagree'] = [ 'title' => t('Disagree','title') ];
$conv_responses['abstain'] = [ 'title' => t('Abstain','title') ];
if($commentable && $observer) {
$conlabels = [ t('I agree'), t('I disagree'), t('I abstain') ];
$canvote = true;
}
}
$this->activity($item, $conv_responses);
$verified = (intval($item['item_verified']) ? t('Message signature validated') : '');

View File

@@ -463,9 +463,6 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
$conv_responses = [
'like' => ['title' => t('Likes','title')],
'dislike' => ['title' => t('Dislikes','title')],
'agree' => ['title' => t('Agree','title')],
'disagree' => ['title' => t('Disagree','title')],
'abstain' => ['title' => t('Abstain','title')],
'attendyes' => ['title' => t('Attending','title')],
'attendno' => ['title' => t('Not attending','title')],
'attendmaybe' => ['title' => t('Might attend','title')],
@@ -883,13 +880,10 @@ function thread_author_menu($item, $mode = '') {
}
}
$contact_url = '';
$posts_link = '';
$poke_link = '';
if($contact) {
$poke_link = ((Apps::system_app_installed($local_channel, 'Poke')) ? z_root() . '/poke/?f=&c=' . $contact['abook_id'] : '');
if (isset($contact['abook_self']) && !intval($contact['abook_self']))
$contact_url = z_root() . '/connections#' . $contact['abook_id'];
$posts_link = z_root() . '/network/?cid=' . $contact['abook_id'];
@@ -943,18 +937,6 @@ function thread_author_menu($item, $mode = '') {
];
}
if($poke_link) {
$menu[] = [
'menu' => 'poke',
'title' => t('Poke'),
'icon' => 'fw',
'action' => '',
'href' => $poke_link,
'data' => '',
'class' => ''
];
}
$args = [ 'item' => $item, 'mode' => $mode, 'menu' => $menu ];
call_hooks('thread_author_menu', $args);
@@ -1013,6 +995,7 @@ function builtin_activity_puller($item, &$conv_responses) {
}
if((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) {
$name = (($item['author']['xchan_name']) ? $item['author']['xchan_name'] : t('Unknown'));
$moderate = ((intval($item['item_blocked']) === ITEM_MODERATED) ? '<a href="moderate/' . $item['id'] . '/approve" onclick="moderate_approve(' . $item['id'] . '); return false;" class="text-success pe-2" title="' . t('Approve this item') . '"><i class="fa fa-check" ></i></a><a href="moderate/' . $item['id'] . '/drop" onclick="moderate_drop(' . $item['id'] . '); return false;" class="text-danger pe-2" title="' . t('Delete this item') . '"><i class="fa fa-trash-o" ></i></a>' : '');
@@ -1581,15 +1564,6 @@ function get_response_button_text($v,$count) {
case 'attendmaybe':
return ['label' => tt('Undecided','Undecided',$count,'noun'), 'icon' => 'calendar-o', 'class' => 'attendmaybe'];
break;
case 'agree':
return ['label' => tt('Agree','Agrees',$count,'noun'), 'icon' => '', 'class' => ''];
break;
case 'disagree':
return ['label' => tt('Disagree','Disagrees',$count,'noun'), 'icon' => '', 'class' => ''];
break;
case 'abstain':
return ['label' => tt('Abstain','Abstains',$count,'noun'), 'icon' => '', 'class' => ''];
break;
default:
return '';
break;