mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
Bugtracker #4456 - handle empty news category icon - thanks marj
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/news_shortcodes.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/news_shortcodes.php,v $
|
||||||
| $Revision: 1.6 $
|
| $Revision: 1.7 $
|
||||||
| $Date: 2007-11-08 21:06:03 $
|
| $Date: 2008-07-15 21:11:43 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -44,13 +44,15 @@ global $tp, $news_shortcodes;
|
|||||||
$news_item = getcachedvars('current_news_item');
|
$news_item = getcachedvars('current_news_item');
|
||||||
$param = getcachedvars('current_news_param');
|
$param = getcachedvars('current_news_param');
|
||||||
$category_icon = $tp -> parseTemplate('{NEWSHEADER}', FALSE, $news_shortcodes);
|
$category_icon = $tp -> parseTemplate('{NEWSHEADER}', FALSE, $news_shortcodes);
|
||||||
|
if (!$category_icon) return '';
|
||||||
return "<a href='".e_BASE."news.php?cat.".$news_item['news_category']."'><img style='".$param['caticon']."' src='".$category_icon."' alt='' /></a>";
|
return "<a href='".e_BASE."news.php?cat.".$news_item['news_category']."'><img style='".$param['caticon']."' src='".$category_icon."' alt='' /></a>";
|
||||||
SC_END
|
SC_END
|
||||||
|
|
||||||
SC_BEGIN NEWSHEADER
|
SC_BEGIN NEWSHEADER
|
||||||
$news_item = getcachedvars('current_news_item');
|
$news_item = getcachedvars('current_news_item');
|
||||||
$param = getcachedvars('current_news_param');
|
$param = getcachedvars('current_news_param');
|
||||||
$category_icon = str_replace("../", "", $news_item['category_icon']);
|
$category_icon = str_replace("../", "", trim($news_item['category_icon']));
|
||||||
|
if (!$category_icon) return '';
|
||||||
if ($category_icon && strstr("images", $category_icon)) {
|
if ($category_icon && strstr("images", $category_icon)) {
|
||||||
return THEME.$category_icon;
|
return THEME.$category_icon;
|
||||||
} else {
|
} else {
|
||||||
@@ -263,6 +265,7 @@ global $tp, $news_shortcodes;
|
|||||||
$news_item = getcachedvars('current_news_item');
|
$news_item = getcachedvars('current_news_item');
|
||||||
$param = getcachedvars('current_news_param');
|
$param = getcachedvars('current_news_param');
|
||||||
$category_icon = $tp -> parseTemplate('{NEWSHEADER}', FALSE, $news_shortcodes);
|
$category_icon = $tp -> parseTemplate('{NEWSHEADER}', FALSE, $news_shortcodes);
|
||||||
|
if (!$category_icon) return '';
|
||||||
if($param['caticon'] == ""){$param['caticon'] = "border:0px";}
|
if($param['caticon'] == ""){$param['caticon'] = "border:0px";}
|
||||||
return "<a href='".e_BASE."news.php?cat.".$news_item['news_category']."'><img style='".$param['caticon']."' src='".$category_icon."' alt='' /></a>";
|
return "<a href='".e_BASE."news.php?cat.".$news_item['news_category']."'><img style='".$param['caticon']."' src='".$category_icon."' alt='' /></a>";
|
||||||
SC_END
|
SC_END
|
||||||
|
Reference in New Issue
Block a user