PMA\libraries\Util::handleDisableFKCheckInit PHP Method

handleDisableFKCheckInit() public static method

Handle foreign key check request
public static handleDisableFKCheckInit ( ) : boolean
return boolean Default foreign key checks value
    public static function handleDisableFKCheckInit()
    {
        $default_fk_check_value = $GLOBALS['dbi']->getVariable('FOREIGN_KEY_CHECKS') == 'ON';
        if (isset($_REQUEST['fk_checks'])) {
            if (empty($_REQUEST['fk_checks'])) {
                // Disable foreign key checks
                $GLOBALS['dbi']->setVariable('FOREIGN_KEY_CHECKS', 'OFF');
            } else {
                // Enable foreign key checks
                $GLOBALS['dbi']->setVariable('FOREIGN_KEY_CHECKS', 'ON');
            }
        }
        // else do nothing, go with default
        return $default_fk_check_value;
    }
Util