Code Duplication    Length = 10-10 lines in 2 locations

htdocs/xoops_lib/Xoops.php 2 locations

@@ 1704-1713 (lines=10) @@
1701
     *
1702
     * @return void
1703
     */
1704
    public function addConfigs($configs, $dirname = 'system')
1705
    {
1706
        $dirname = trim(strtolower($dirname));
1707
        if (empty($dirname)) {
1708
            $dirname = $this->isModule() ? $this->module->getVar('dirname') : 'system';
1709
        }
1710
        if (!empty($dirname)) {
1711
            $this->moduleConfigs[$dirname] = array_merge($this->moduleConfigs[$dirname], (array)$configs);
1712
        }
1713
    }
1714
1715
    /**
1716
     * Set Config Value
@@ 1724-1733 (lines=10) @@
1721
     *
1722
     * @return void
1723
     */
1724
    public function setConfig($key, $value = null, $dirname = 'system')
1725
    {
1726
        if (!is_null($value)) {
1727
            $dirname = trim(strtolower($dirname));
1728
            if (empty($dirname)) {
1729
                $dirname = $this->isModule() ? $this->module->getVar('dirname') : 'system';
1730
            }
1731
            $this->moduleConfigs[$dirname][$key] =& $value;
1732
        }
1733
    }
1734
1735
    /**
1736
     * Unset Config Value