From: umorigu Date: Sat, 21 Oct 2017 05:33:36 +0000 (+0900) Subject: BugTrack/2176 showrss plugin: Use default template if error X-Git-Tag: r1_5_4~169 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;ds=sidebyside;h=ba85be1fa7d771eb3b4455a711ac12a85c5b82ab;p=pukiwiki%2Fpukiwiki.git BugTrack/2176 showrss plugin: Use default template if error --- diff --git a/plugin/showrss.inc.php b/plugin/showrss.inc.php index c32cd0a..a42157f 100644 --- a/plugin/showrss.inc.php +++ b/plugin/showrss.inc.php @@ -51,10 +51,10 @@ function plugin_showrss_convert() } $class = ($template == '' || $template == 'default') ? 'ShowRSS_html' : 'ShowRSS_html_' . $template; + if (! class_exists($class)) $class = 'ShowRSS_html'; + if (! is_numeric($cachehour)) return '#showrss: Cache-lifetime seems not numeric: ' . htmlsc($cachehour) . '
' . "\n"; - if (! class_exists($class)) - return '#showrss: Template not found: ' . htmlsc($template) . '
' . "\n"; if (! is_url($uri)) return '#showrss: Seems not URI: ' . htmlsc($uri) . '
' . "\n";