1 | <?php |
||
2 | /** |
||
3 | * XOOPS feed creator |
||
4 | * |
||
5 | * You may not change or alter any portion of this comment or credits |
||
6 | * of supporting developers from this source code or any supporting source code |
||
7 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||
8 | * This program is distributed in the hope that it will be useful, |
||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
11 | * |
||
12 | * @copyright (c) 2000-2016 XOOPS Project (www.xoops.org) |
||
13 | * @license GNU GPL 2 (https://www.gnu.org/licenses/gpl-2.0.html) |
||
14 | * @since 2.0.0 |
||
15 | */ |
||
16 | |||
17 | include __DIR__ . '/mainfile.php'; |
||
18 | |||
19 | $GLOBALS['xoopsLogger']->activated = false; |
||
20 | if (function_exists('mb_http_output')) { |
||
21 | mb_http_output('pass'); |
||
22 | } |
||
23 | header('Content-Type:text/xml; charset=utf-8'); |
||
24 | |||
25 | include_once $GLOBALS['xoops']->path('class/template.php'); |
||
26 | $tpl = new XoopsTpl(); |
||
27 | $tpl->caching = 2; |
||
28 | $tpl->cache_lifetime = 3600; |
||
29 | if (!$tpl->isCached('db:system_rss.tpl')) { |
||
30 | xoops_load('XoopsLocal'); |
||
31 | $tpl->assign('channel_title', XoopsLocal::convert_encoding(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES | ENT_HTML5))); |
||
32 | $tpl->assign('channel_link', XOOPS_URL . '/'); |
||
33 | $tpl->assign('channel_desc', XoopsLocal::convert_encoding(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES | ENT_HTML5))); |
||
34 | $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss')); |
||
35 | $tpl->assign('channel_webmaster', checkEmail($xoopsConfig['adminmail'], true)); |
||
36 | $tpl->assign('channel_editor', checkEmail($xoopsConfig['adminmail'], true)); |
||
37 | $tpl->assign('channel_category', 'News'); |
||
38 | $tpl->assign('channel_generator', 'XOOPS'); |
||
39 | $tpl->assign('channel_language', _LANGCODE); |
||
40 | $tpl->assign('image_url', XOOPS_URL . '/images/logo.png'); |
||
41 | $dimension = getimagesize(XOOPS_ROOT_PATH . '/images/logo.png'); |
||
42 | if (empty($dimension[0])) { |
||
43 | $width = 88; |
||
44 | } else { |
||
45 | $width = ($dimension[0] > 144) ? 144 : $dimension[0]; |
||
46 | } |
||
47 | if (empty($dimension[1])) { |
||
48 | $height = 31; |
||
49 | } else { |
||
50 | $height = ($dimension[1] > 400) ? 400 : $dimension[1]; |
||
51 | } |
||
52 | $tpl->assign('image_width', $width); |
||
53 | $tpl->assign('image_height', $height); |
||
54 | if (file_exists($fileinc = $GLOBALS['xoops']->path('modules/news/class/class.newsstory.php'))) { |
||
55 | include $fileinc; |
||
56 | $sarray = NewsStory::getAllPublished(10, 0, true); |
||
0 ignored issues
–
show
|
|||
57 | } |
||
58 | if (!empty($sarray) && \is_array($sarray)) { |
||
59 | foreach ($sarray as $story) { |
||
60 | $tpl->append( |
||
61 | 'items', |
||
62 | [ |
||
63 | 'title' => XoopsLocal::convert_encoding(htmlspecialchars($story->title(), ENT_QUOTES | ENT_HTML5)), |
||
64 | 'link' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), |
||
65 | 'guid' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), |
||
66 | 'pubdate' => formatTimestamp($story->published(), 'rss'), |
||
67 | 'description' => XoopsLocal::convert_encoding(htmlspecialchars($story->hometext(), ENT_QUOTES | ENT_HTML5)), |
||
68 | ], |
||
69 | ); |
||
70 | } |
||
71 | } |
||
72 | } |
||
73 | $tpl->display('db:system_rss.tpl'); |
||
74 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths