Completed
Pull Request — master (#9)
by Michael
01:23
created

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/*
3
 * ****************************************************************************
4
 * xsitemap - MODULE FOR XOOPS CMS
5
 * Copyright (c) Urbanspaceman (http://www.takeaweb.it)
6
 *
7
 * You may not change or alter any portion of this comment or credits
8
 * of supporting developers from this source code or any supporting source code
9
 * which is considered copyrighted (c) material of the original comment or credit authors.
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 */
14
/**
15
 * @package    module\xsitemap\frontside
16
 * @author     Urbanspaceman (http://www.takeaweb.it)
17
 * @copyright  Urbanspaceman (http://www.takeaweb.it)
18
 * @copyright  XOOPS Project
19
 * @license    http://www.fsf.org/copyleft/gpl.html GNU public license
20
 * @link       https://xoops.org XOOPS
21
 * @since      1.00
22
 **/
23
24
use Xmf\Request;
25
use Xoopsmodules\xsitemap;
26
27
require_once __DIR__ . '/header.php';
28
29
$moduleDirName = basename(__DIR__);
30
require_once __DIR__ . '/../../mainfile.php';
31
32
//template assign
33
$GLOBALS['xoopsOption']['template_main'] = 'xsitemap_index.tpl';
34
35
include_once $GLOBALS['xoops']->path('header.php');
36
include_once $GLOBALS['xoops']->path('class/tree.php');
37
include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/class/plugin.php');
38
//include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/class/Utility.php');
0 ignored issues
show
Unused Code Comprehensibility introduced by
60% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
39
include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/class/dummy.php');
40
41
$xsitemap_configs = $GLOBALS['xoopsModuleConfig'];
42
43
$xsitemap_show = $utility::generateSitemap();
44
45
$GLOBALS['xoTheme']->addStylesheet($GLOBALS['xoops']->url('browse.php?modules/' . $moduleDirName . '/assets/css/style.css'));
46
$GLOBALS['xoopsTpl']->assign([
47
                                 'xsitemap'           => $xsitemap_show,
48
                                 'num_col'            => $xsitemap_configs['columns_number'],
49
                                 'show_sublink'       => $xsitemap_configs['show_sublink'],
50
                                 'show_subcategories' => $xsitemap_configs['show_subcategories']
51
                             ]);
52
53
include_once $GLOBALS['xoops']->path('footer.php');
54