Skip to content

Commit

Permalink
Фикс^2
Browse files Browse the repository at this point in the history
- [FIX] Тег {category} исправлен
- [FIX] Тег {link-category} исправлен
  • Loading branch information
Gokujo committed Jul 5, 2022
1 parent bc0c873 commit 4026b07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "1.7.2.1",
"version": "1.7.2.2",
"name": "TelegramPosting"
}
10 changes: 4 additions & 6 deletions upload/engine/inc/maharder/telegram/classes/repost.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,8 @@ public function parse_content($content, array $filter = [])
$content = str_replace('{comments-num}', number_format($row['comm_num'], 0, ',', ' '), $content);
$content = str_replace('{views}', number_format($row['news_read'], 0, ',', ' '), $content);
$content = str_replace('{category-hashtag}', implode($config['tags_separator'], $cat_hashtags), $content);
$content = str_replace('{category}', implode($config['category_separator'], $my_cat), $content);
$content = str_replace('{link-category}', implode($config['category_separator'], $my_cat_link), $content);
$content = str_replace('{category}', $my_cat, $content);
$content = str_replace('{link-category}', $my_cat_link, $content);
$content = str_replace('{news-id}', $row['id'], $content);

if($config['rating_type'] == "1") {
Expand Down Expand Up @@ -898,10 +898,8 @@ public function parse_content($content, array $filter = [])
$dislikes = ($row['vote_num'] - $row['rating']) / 2;
$likes = $row['vote_num'] - $dislikes;
$content = str_replace(
[
'[/rating]', '{rating}', '[rating]', '{vote-num}', '{dislikes}', '{likes}'
], [
'', $this->ShowRating(
['[/rating]', '{rating}', '[rating]', '{vote-num}', '{dislikes}', '{likes}'],
['', $this->ShowRating(
$row['id'], $row['rating'], $row['vote_num'], $user_group[$member_id['user_group']]['allow_rating']
), '', $row['vote_num'], $dislikes, $likes
], $content
Expand Down

0 comments on commit 4026b07

Please sign in to comment.