package Cpanel::Easy::PHP5::MagicQuotes;

# cpanel - Cpanel/Easy/PHP5/MagicQuotes.pm        Copyright(c) 2012 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

our $easyconfig = {
    'name'    => 'Magic Quotes',
    'url'     => 'http://www.php.net/manual/en/security.magicquotes.php',
    'modself' => sub {
        my ( $easy, $self_hr, $profile_hr ) = @_;

        # Magicquotes are removed from PHP 5.4 and later.
        my @php54 = grep { $profile_hr->{$_} } ( grep /^Cpanel::Easy::PHP5::[4-9]_(?:\d+)$/, keys %$profile_hr );
        if (@php54) {
            $self_hr->{'skip'} = 1;
        }
    },
    'step' => {
        '0' => {
            'name'    => 'to config options',
            'command' => sub {
                my ($self) = @_;
                $self->add_to_configure( { '--enable-magic-quotes' => '' } );
                return ( 1, 'Ok' );
            },

        },
    },
};

1;
