package cPanel::CMS::PostNuke;

use strict;
use warnings;

our $VERSION = 0.2;
my $pkg = __PACKAGE__;

my $new = <<'END_UPGRADE';
<p>New installs of PostNuke are no longer available since PostNuke has reached its <acronym title="End Of Life">EOL</acronym>.</p>
<p>See <a target="_blank" href="http://www.postnuke.com/module-Content-view-pid-6.html">their announcement</a> for more information.</p>

END_UPGRADE

our $meta_info = {
    setphpsuexecvar => 1,
    adminuser_pass => 1, 
    admin_email    => 1, 
    installdir     => 'postnuke',
    description    => 'PHP/MySQL based CMS', # required
    disable        => {
        install => $new,
    },
    security       => 'Configuration has to be world readable. Requires 777 permissions to function which is highly exploitable and insecure. Subject to all common PHP security problems',
    version        => '0.764.cp', # required
    security_rank  => 1, 
    website        => 'http://www.postnuke.com/', 
    config_files   => ['config.php'],
    mysql          => ['pn'],
    table_prefix   => 'pn', 
    chmod          => {
        '0777' => [qw(pnTemp/pnRender_compiled pnTemp/pnRender_cache pnTemp/Xanthia_compiled pnTemp/Xanthia_cache pnTemp/Xanthia_Config)],
    },
};

if ( defined &Cpanel::cPAddons::proc_keys_named_after_version ) {
   Cpanel::cPAddons::proc_keys_named_after_version( $meta_info, __PACKAGE__ );
}

#### action functions ##
sub install {
    print $meta_info->{'disable'}{'install'};
    return;
}

sub upgrade { shift->stdupgrade(@_) }
sub uninstall { shift->stduninstall(@_) }

#### non action functions ##
sub installform { print $meta_info->{'disable'}{'install'} }
sub upgradeform { print shift->{upgradeform} }
sub uninstallform { print shift->{uninstallform} }

1;
