Passed
Push — master ( 3a2152...658ebb )
by Goffy
04:30 queued 12s
created

content.php (1 issue)

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
 * Module: Lexikon
5
 * Version: v 1.00
6
 * Release Date: 18 Dec 2011
7
 * Author: Yerres
8
 * Licence: GNU
9
 */
10
11
include __DIR__ . '/header.php';
12
$GLOBALS['xoopsOption']['template_main'] = 'lx_content.tpl';
13
include XOOPS_ROOT_PATH . '/header.php';
14
global $xoTheme, $xoopsUser, $xoopsModuleConfig;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
15
$myts = MyTextSanitizer::getInstance();
16
if (!is_object($xoopsUser) && $xoopsModuleConfig['contentsyndication'] == 0) {
17
    redirect_header(XOOPS_URL . '/user.php?xoops_redirect=' . parse_url($_SERVER['PHP_SELF']), 5, _NOPERM);
18
}
19
20
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
21
22
include __DIR__ . '/include/syndication.inc.php';
23
$yform->assign($xoopsTpl);
24
25
// Various strings
26
$xoopsTpl->assign('introcontentsyn', sprintf(_MD_LEXIKON_INTROCONTENTSYN, $xoopsConfig['sitename']));
27
$xoopsTpl->assign('modulename', $xoopsModule->dirname());
28
$xoopsTpl->assign('lang_modulename', $xoopsModule->name());
29
$xoopsTpl->assign('lang_moduledirname', $xoopsModule->getVar('dirname'));
30
31
$xoopsTpl->assign('xoops_pagetitle', _MD_LEXIKON_SYNDICATION . ' - ' . $myts->htmlSpecialChars($xoopsModule->name()));
32
$xoopsTpl->assign('xoops_module_header', '<link rel="stylesheet" type="text/css" href="assets/css/style.css" />');
33
34
// Meta data
35
$meta_description = _MD_LEXIKON_SYNDICATION . ' - ' . $myts->htmlSpecialChars($xoopsModule->name());
36
if (isset($xoTheme) && is_object($xoTheme)) {
37
    $xoTheme->addMeta('meta', 'description', $meta_description);
38
} else {
39
    $xoopsTpl->assign('xoops_meta_description', $meta_description);
40
}
41
42
include XOOPS_ROOT_PATH . '/footer.php';
43