Skip to content

Commit

Permalink
[upd] изменен вывод последней ноовости на главной
Browse files Browse the repository at this point in the history
  • Loading branch information
KpuTuK committed Oct 6, 2019
1 parent 1e427df commit e0b3aa2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/news/helpers/news_widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public static function display($widget_id)
if ($config['view_last_news'] == 0) {
return '<img src="' . URL . 'modules/news/images/news.png" alt="" /> <a href="' . a_url('news') . '">Новости</a> (' . date('d.m.Y', $last_news['time']) . ')<br />';
} else {
$last_news['text'] = preg_replace('|[[\/\!]*?[^\[\]]*?]|si', '', $last_news['text']);
$last_news['text'] = main::limit_words(strip_tags($last_news['text']), 15);
$last_news['text'] = nl2br(main::bbcode(main::limit_words($last_news['text'], 20)));

$code = '<b>' . $last_news['subject'] . '</b> (' . date('d.m.Y', $last_news['time']) . ')<br />' . PHP_EOL;
$code .= $last_news['text'] . '...<br />' . PHP_EOL;
Expand Down

0 comments on commit e0b3aa2

Please sign in to comment.