mambax7 /
xoositemap
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Xoositemap module |
||
| 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 The XOOPS Project http://sourceforge.net/projects/xoops/ |
||
| 13 | * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
||
| 14 | * @package Xoositemap |
||
| 15 | * @since 2.6.0 |
||
| 16 | * @author Laurent JEN (Aka DuGris) |
||
| 17 | * @version $Id$ |
||
| 18 | */ |
||
| 19 | include dirname(dirname(__DIR__)) . '/mainfile.php'; |
||
| 20 | |||
| 21 | $op = ''; |
||
| 22 | if (isset($_POST)) { |
||
| 23 | foreach ($_POST as $k => $v) { |
||
| 24 | ${$k} = $v; |
||
| 25 | } |
||
| 26 | } |
||
| 27 | if (isset($_GET)) { |
||
| 28 | foreach ($_GET as $k => $v) { |
||
| 29 | ${$k} = $v; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | $helper = \XoopsModules\Xoositemap\Helper::getInstance(); |
||
| 34 | $sitemapConfig = $helper->loadConfig(); |
||
| 35 | |||
| 36 | if ('' != $op) { |
||
| 37 | $modules[] = $op; |
||
| 38 | } else { |
||
| 39 | $modules = $sitemapConfig['xoositemapModule']; |
||
| 40 | } |
||
| 41 | $xoops = \Xoops::getInstance(); |
||
| 42 | $xoops->header('xoositemap_index.tpl'); |
||
| 43 | $xoops->theme()->addStylesheet('modules/xoositemap/assets/css/module.css'); |
||
| 44 | |||
| 45 | $sitemap = []; |
||
| 46 | foreach ($modules as $k => $mod) { |
||
| 47 | $moduleObj = $xoops->module->getByDirname($mod); |
||
| 48 | |||
| 49 | $plugin = \Xoops\Module\Plugin::getPlugin($moduleObj->getVar('dirname'), 'xoositemap'); |
||
|
0 ignored issues
–
show
|
|||
| 50 | if (is_object($plugin)) { |
||
| 51 | $results = $plugin->Xoositemap($sitemapConfig['xoositemap_subcat']); |
||
| 52 | |||
| 53 | $sitemap[$k]['name'] = $moduleObj->getVar('name'); |
||
| 54 | $sitemap[$k]['dirname'] = $moduleObj->getVar('dirname'); |
||
| 55 | $sitemap[$k]['image'] = \XoopsBaseConfig::get('url') . '/modules/' . $moduleObj->getVar('dirname') . '/assets/icons/logo_large.png'; |
||
|
0 ignored issues
–
show
The type
XoopsBaseConfig was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 56 | |||
| 57 | if (count($results) > 0) { |
||
| 58 | foreach (array_keys($results) as $i) { |
||
| 59 | $results[$i]['date'] = \XoopsLocale::formatTimestamp($results[$i]['time'], 's'); |
||
|
0 ignored issues
–
show
The type
XoopsLocale was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 60 | } |
||
| 61 | $sitemap[$k]['sitemap'] = $results; |
||
| 62 | |||
| 63 | foreach ($results as $data) { |
||
| 64 | if (isset($data['category'])) { |
||
| 65 | $sitemap[$k]['category'] = true; |
||
| 66 | break; |
||
| 67 | } |
||
| 68 | } |
||
| 69 | } |
||
| 70 | } |
||
| 71 | } |
||
| 72 | |||
| 73 | $xoops->tpl()->assign('moduletitle', $xoops->module->name()); |
||
| 74 | $xoops->tpl()->assign('xoositemap_config', $sitemapConfig); |
||
| 75 | $xoops->tpl()->assign('sitemap', $sitemap); |
||
| 76 |
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