X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FConversation.php;h=6c5313fdc5a1115ef332a6c453783d8d3c0adae6;hb=088a3b6bc429973381e6eb2931c6eacd5b8c8927;hp=aa7c016180493f5e77d78a147aa18452893fde72;hpb=4db4d1843d19a810f3039558d312f0de030e7d6e;p=friendica.git
diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php
index aa7c016180..6c5313fdc5 100644
--- a/src/Content/Conversation.php
+++ b/src/Content/Conversation.php
@@ -234,32 +234,32 @@ class Conversation
$likers .= ' ' . $this->l10n->t('and %d other people', $total - $this->config->get('system', 'max_likers'));
}
- $spanatts = "class=\"fakelink\" onclick=\"openClose('{$verb}list-$id');\"";
+ $spanatts = "class=\"btn btn-link fakelink\" onclick=\"openClose('{$verb}list-$id');\"";
$explikers = '';
switch ($verb) {
case 'like':
- $phrase = $this->l10n->t('%2$d people like this', $spanatts, $total);
+ $phrase = $this->l10n->t(' like this', $spanatts, $total);
$explikers = $this->l10n->t('%s like this.', $likers);
break;
case 'dislike':
- $phrase = $this->l10n->t('%2$d people don\'t like this', $spanatts, $total);
+ $phrase = $this->l10n->t(' don\'t like this', $spanatts, $total);
$explikers = $this->l10n->t('%s don\'t like this.', $likers);
break;
case 'attendyes':
- $phrase = $this->l10n->t('%2$d people attend', $spanatts, $total);
+ $phrase = $this->l10n->t(' attend', $spanatts, $total);
$explikers = $this->l10n->t('%s attend.', $likers);
break;
case 'attendno':
- $phrase = $this->l10n->t('%2$d people don\'t attend', $spanatts, $total);
+ $phrase = $this->l10n->t(' don\'t attend', $spanatts, $total);
$explikers = $this->l10n->t('%s don\'t attend.', $likers);
break;
case 'attendmaybe':
- $phrase = $this->l10n->t('%2$d people attend maybe', $spanatts, $total);
+ $phrase = $this->l10n->t(' attend maybe', $spanatts, $total);
$explikers = $this->l10n->t('%s attend maybe.', $likers);
break;
case 'announce':
- $phrase = $this->l10n->t('%2$d people reshared this', $spanatts, $total);
+ $phrase = $this->l10n->t(' reshared this', $spanatts, $total);
$explikers = $this->l10n->t('%s reshared this.', $likers);
break;
}
@@ -970,7 +970,7 @@ class Conversation
}
$condition = DBA::mergeConditions($condition,
- ["`uid` IN (0, ?) AND (NOT `vid` IN (?, ?) OR `vid` IS NULL)", $uid, Verb::getID(Activity::FOLLOW), Verb::getID(Activity::VIEW)]);
+ ["`uid` IN (0, ?) AND (NOT `vid` IN (?, ?, ?) OR `vid` IS NULL)", $uid, Verb::getID(Activity::FOLLOW), Verb::getID(Activity::VIEW), Verb::getID(Activity::READ)]);
$thread_parents = Post::select(['uri-id', 'causer-id'], $condition, ['order' => ['uri-id' => false, 'uid']]);
@@ -985,8 +985,8 @@ class Conversation
$thread_items = Post::selectForUser($uid, array_merge(ItemModel::DISPLAY_FIELDLIST, ['featured', 'contact-uid', 'gravity', 'post-type', 'post-reason']), $condition, $params);
- $items = [];
- $quoteuriids = [];
+ $items = [];
+ $quote_uri_ids = [];
while ($row = Post::fetch($thread_items)) {
if (!empty($items[$row['uri-id']]) && ($row['uid'] == 0)) {
@@ -1007,7 +1007,7 @@ class Conversation
}
if (in_array($row['gravity'], [ItemModel::GRAVITY_PARENT, ItemModel::GRAVITY_COMMENT])) {
- $quoteuriids[$row['uri-id']] = [
+ $quote_uri_ids[$row['uri-id']] = [
'uri-id' => $row['uri-id'],
'uri' => $row['uri'],
'parent-uri-id' => $row['parent-uri-id'],
@@ -1020,7 +1020,7 @@ class Conversation
DBA::close($thread_items);
- $quotes = Post::select(array_merge(ItemModel::DISPLAY_FIELDLIST, ['featured', 'contact-uid', 'gravity', 'post-type', 'post-reason']), ['quote-uri-id' => array_column($quoteuriids, 'uri-id'), 'body' => '', 'uid' => 0]);
+ $quotes = Post::select(array_merge(ItemModel::DISPLAY_FIELDLIST, ['featured', 'contact-uid', 'gravity', 'post-type', 'post-reason']), ['quote-uri-id' => array_column($quote_uri_ids, 'uri-id'), 'body' => '', 'uid' => 0]);
while ($quote = Post::fetch($quotes)) {
$row = $quote;
@@ -1028,10 +1028,10 @@ class Conversation
$row['verb'] = $row['body'] = $row['raw-body'] = Activity::ANNOUNCE;
$row['gravity'] = ItemModel::GRAVITY_ACTIVITY;
$row['object-type'] = Activity\ObjectType::NOTE;
- $row['parent-uri'] = $quoteuriids[$quote['quote-uri-id']]['parent-uri'];
- $row['parent-uri-id'] = $quoteuriids[$quote['quote-uri-id']]['parent-uri-id'];
- $row['thr-parent'] = $quoteuriids[$quote['quote-uri-id']]['uri'];
- $row['thr-parent-id'] = $quoteuriids[$quote['quote-uri-id']]['uri-id'];
+ $row['parent-uri'] = $quote_uri_ids[$quote['quote-uri-id']]['parent-uri'];
+ $row['parent-uri-id'] = $quote_uri_ids[$quote['quote-uri-id']]['parent-uri-id'];
+ $row['thr-parent'] = $quote_uri_ids[$quote['quote-uri-id']]['uri'];
+ $row['thr-parent-id'] = $quote_uri_ids[$quote['quote-uri-id']]['uri-id'];
$items[$row['uri-id']] = $this->addRowInformation($row, [], []);
}