"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/admin/modules/home/index.php" between
mybb_1821.zip and mybb_1822.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

index.php  (mybb_1821):index.php  (mybb_1822)
skipping to change at line 108 skipping to change at line 108
$updated_cache['news'] = array(); $updated_cache['news'] = array();
if($feed_parser->error == '') if($feed_parser->error == '')
{ {
require_once MYBB_ROOT . '/inc/class_parser.php'; require_once MYBB_ROOT . '/inc/class_parser.php';
$post_parser = new postParser(); $post_parser = new postParser();
foreach($feed_parser->items as $item) foreach($feed_parser->items as $item)
{ {
$description = $item['description'];
$content = $item['content'];
$description = $post_parser->parse_message($description,
array(
'allow_html' => true,
)
);
$content = $post_parser->parse_message($content, array(
'allow_html' => true,
)
);
$description = preg_replace('#<img(.*)/>#', '', $descript
ion);
$content = preg_replace('#<img(.*)/>#', '', $content);
if(!isset($updated_cache['news'][2])) if(!isset($updated_cache['news'][2]))
{ {
$updated_cache['news'][] = array( $updated_cache['news'][] = array(
'title' => htmlspecialchars_uni($item['ti 'title' => $item['title'],
tle']), 'description' => $item['description'],
'description' => $description, 'link' => $item['link'],
'link' => htmlspecialchars_uni($item['lin 'author' => $item['author'],
k']),
'author' => htmlspecialchars_uni($item['a
uthor']),
'dateline' => $item['date_timestamp'], 'dateline' => $item['date_timestamp'],
); );
} }
$stamp = ''; $stamp = '';
if($item['date_timestamp']) if($item['date_timestamp'])
{ {
$stamp = my_date('relative', $item['date_timestam p']); $stamp = my_date('relative', (int)$item['date_tim estamp']);
} }
$link = htmlspecialchars_uni($item['link']); $link = htmlspecialchars_uni($item['link']);
$title = htmlspecialchars_uni($item['title']);
$description = htmlspecialchars_uni(strip_tags($item['des
cription']));
$table->construct_cell("<span style=\"font-size: 16px;\"> <strong>".htmlspecialchars_uni($item['title'])."</strong></span><br /><br />{$co ntent}<strong><span style=\"float: right;\">{$stamp}</span><br /><br /><a href=\ "{$link}\" target=\"_blank\" rel=\"noopener\">&raquo; {$lang->read_more}</a></st rong>"); $table->construct_cell("<span style=\"font-size: 16px;\"> <strong>{$title}</strong></span><br /><br />{$description}<strong><span style=\" float: right;\">{$stamp}</span><br /><br /><a href=\"{$link}\" target=\"_blank\" rel=\"noopener\">&raquo; {$lang->read_more}</a></strong>");
$table->construct_row(); $table->construct_row();
} }
} }
else else
{ {
$table->construct_cell("{$lang->error_fetch_news} <!-- error code : {$feed_parser->error} -->"); $table->construct_cell("{$lang->error_fetch_news} <!-- error code : {$feed_parser->error} -->");
$table->construct_row(); $table->construct_row();
} }
$cache->update("update_check", $updated_cache); $cache->update("update_check", $updated_cache);
skipping to change at line 359 skipping to change at line 345
<div class="float_left" style="width: 48%;">'; <div class="float_left" style="width: 48%;">';
// Latest news widget // Latest news widget
$table = new Table; $table = new Table;
$table->construct_header($lang->news_description); $table->construct_header($lang->news_description);
if(!empty($update_check['news']) && is_array($update_check['news'])) if(!empty($update_check['news']) && is_array($update_check['news']))
{ {
foreach($update_check['news'] as $news_item) foreach($update_check['news'] as $news_item)
{ {
$posted = my_date('relative', $news_item['dateline']); $posted = my_date('relative', (int)$news_item['dateline']
$table->construct_cell("<strong><a href=\"{$news_item['li );
nk']}\" target=\"_blank\" rel=\"noopener\">{$news_item['title']}</a></strong><br $link = htmlspecialchars_uni($news_item['link']);
/><span class=\"smalltext\">{$posted}</span>"); $title = htmlspecialchars_uni($news_item['title']);
$description = htmlspecialchars_uni(strip_tags($news_item
['description']));
$table->construct_cell("<strong><a href=\"{$link}\" targe
t=\"_blank\" rel=\"noopener\">{$title}</a></strong><br /><span class=\"smalltext
\">{$posted}</span>");
$table->construct_row(); $table->construct_row();
$table->construct_cell($news_item['description']); $table->construct_cell($description);
$table->construct_row(); $table->construct_row();
} }
} }
else else
{ {
$table->construct_cell($lang->no_announcements); $table->construct_cell($lang->no_announcements);
$table->construct_row(); $table->construct_row();
} }
$table->output($lang->latest_mybb_announcements); $table->output($lang->latest_mybb_announcements);
 End of changes. 7 change blocks. 
32 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)