Completed
Pull Request — master (#482)
by Richard
17:16 queued 06:22
created

SearchPreload::eventCoreIncludeCommonClassmaps()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %
Metric Value
dl 7
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
/*
3
 You may not change or alter any portion of this comment or credits
4
 of supporting developers from this source code or any supporting source code
5
 which is considered copyrighted (c) material of the original comment or credit authors.
6
7
 This program is distributed in the hope that it will be useful,
8
 but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
12
use Xoops\Core\PreloadItem;
13
14
/**
15
 * Search core preloads
16
 *
17
 * @author          trabis <[email protected]>
18
 * @copyright       XOOPS Project (http://xoops.org)
19
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
20
 */
21
class SearchPreload extends PreloadItem
22
{
23
    /**
24
     * listen for core.header.start
25
     *
26
     * @param mixed $args not used
27
     *
28
     * @return void
29
     */
30
    public static function eventCoreHeaderEnd($args)
0 ignored issues
show
Unused Code introduced by
The parameter $args is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
    {
32
        $xoops = Xoops::getInstance();
33
        $search = $xoops->getModuleHelper('search');
34
        if ($search->getConfig('enable_search')) {
35
            $xoops->tpl()->assign('search_url', $search->url('index.php'));
36
        }
37
    }
38
}
39