Completed
Pull Request — master (#12)
by
unknown
01:54
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
 * Module: Lexikon
4
 * Author: Yerres
5
 * Licence: GNU
6
 */
7
8
include __DIR__ . '/header.php';
9
$GLOBALS['xoopsOption']['template_main'] = 'lx_content.tpl';
10
include XOOPS_ROOT_PATH . '/header.php';
11
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...
12
$myts = MyTextSanitizer::getInstance();
13
if (!is_object($xoopsUser) && $xoopsModuleConfig['contentsyndication'] == 0) {
14
    redirect_header(XOOPS_URL . '/user.php?xoops_redirect=' . parse_url($_SERVER['PHP_SELF']), 5, _NOPERM);
15
}
16
17
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
18
19
include __DIR__ . '/include/syndication.inc.php';
20
$yform->assign($xoopsTpl);
21
22
// Various strings
23
$xoopsTpl->assign('introcontentsyn', sprintf(_MD_LEXIKON_INTROCONTENTSYN, $xoopsConfig['sitename']));
24
$xoopsTpl->assign('modulename', $xoopsModule->dirname());
25
$xoopsTpl->assign('lang_modulename', $xoopsModule->name());
26
$xoopsTpl->assign('lang_moduledirname', $xoopsModule->getVar('dirname'));
27
28
$xoopsTpl->assign('xoops_pagetitle', _MD_LEXIKON_SYNDICATION . ' - ' . $myts->htmlSpecialChars($xoopsModule->name()));
29
$xoopsTpl->assign('xoops_module_header', '<link rel="stylesheet" type="text/css" href="assets/css/style.css" />');
30
31
// Meta data
32
$meta_description = _MD_LEXIKON_SYNDICATION . ' - ' . $myts->htmlSpecialChars($xoopsModule->name());
33
if (isset($xoTheme) && is_object($xoTheme)) {
34
    $xoTheme->addMeta('meta', 'description', $meta_description);
35
} else {
36
    $xoopsTpl->assign('xoops_meta_description', $meta_description);
37
}
38
39
include XOOPS_ROOT_PATH . '/footer.php';
40