Code Duplication    Length = 19-19 lines in 2 locations

htdocs/modules/protector/class/protector.php 1 location

@@ 519-537 (lines=19) @@
516
        }
517
    }
518
519
    function dblayertrap_init($force_override = false)
520
    {
521
        if (!empty($GLOBALS['xoopsOption']['nocommon']) || defined('_LEGACY_PREVENT_EXEC_COMMON_') || defined('_LEGACY_PREVENT_LOAD_CORE_')) {
522
            return;
523
        } // skip
524
525
        $this->_dblayertrap_doubtfuls = array();
526
        $this->_dblayertrap_check_recursive($_GET);
527
        $this->_dblayertrap_check_recursive($_POST);
528
        $this->_dblayertrap_check_recursive($_COOKIE);
529
        if (empty($this->_conf['dblayertrap_wo_server'])) {
530
            $this->_dblayertrap_check_recursive($_SERVER);
531
        }
532
533
        if (!empty($this->_dblayertrap_doubtfuls) || $force_override) {
534
            @define('XOOPS_DB_ALTERNATIVE', 'ProtectorMysqlDatabase');
535
            require_once dirname(__DIR__) . '/class/ProtectorMysqlDatabase.class.php';
536
        }
537
    }
538
539
    function _bigumbrella_check_recursive($val)
540
    {

htdocs/modules/protector/class/ProtectorDatabaseLayer.php 1 location

@@ 94-112 (lines=19) @@
91
     * \Xoops\Core\Database\Logging\XoopsDebugStack::startQuery($sql, array $params = null, array $types = null)
92
     * to broadcast SQL to analyze instead of using ProtectorMysqlDatabase.class.php
93
     */
94
    protected function dblayertrap_init($force_override = false)
95
    {
96
        if (!empty($GLOBALS['xoopsOption']['nocommon']) || defined('_LEGACY_PREVENT_EXEC_COMMON_') || defined('_LEGACY_PREVENT_LOAD_CORE_')) {
97
            return;
98
        } // skip
99
100
        $this->dbLayerTrapDoubtfuls = array();
101
        $this->dbLayerTrapCheckRecursive($_GET);
102
        $this->dbLayerTrapCheckRecursive($_POST);
103
        $this->dbLayerTrapCheckRecursive($_COOKIE);
104
        if (empty($this->_conf['dblayertrap_wo_server'])) {
105
            $this->dbLayerTrapCheckRecursive($_SERVER);
106
        }
107
108
        if (!empty($this->dbLayerTrapDoubtfuls) || $force_override) {
109
            @define('XOOPS_DB_ALTERNATIVE', 'ProtectorMysqlDatabase');
110
            require_once dirname(__DIR__) . '/class/ProtectorMysqlDatabase.class.php';
111
        }
112
    }
113
114
// end moved from protector.php
115