package cPanel::Bulletin_Boards::phpBB;

use strict;
use warnings;

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

our $meta_info = {
   adminuser_pass => 1,
   admin_user_pass_length => 10,
   admin_email => 1,
   installdir => 'forum',
   description => 'PHP/MySQL Based Bulletin Board',
   addopt_url => 'http://www.phpbb.com/phpBB/index.php?c=4',
   security => 'Do not allow users to post HTML when posting. It has lower rating because it relies on 777 directory permissions and a 644 config file and has had many security issues inherent to PHP. Vendor does well in upgrading when problems are found but it requires more effort on your part to make sure you come back here to upgrade whenever necessary.',
   version => '2.0.18', 
   security_rank => 2,
   website => 'http://phpbb.com/', 
   config_files => ['config.php'],
   chmod => {
      '0644' => ['config.php'],
      '0777' => [qw(images/avatars images/avatars/tmp)],
   },
   mysql => ['phpbb'], 
   table_prefix => 'phpbb',
};

#### action functions ##
sub install { 
   my $aoc = shift;
   $aoc->{phpbb2_dbms} = defined $aoc->{mysql_version} 
                         && $aoc->{mysql_version} >= 4 ? 'mysql4' : 'mysql';
   $aoc->stdinstall(@_);
}

sub upgrade { 
   my $aoc = shift;
# do for "working copy" entry
#   $aoc->{phpbb2_dbms} = $aoc->{mysql_version} >= 4 ? 'mysql4' : 'mysql';
   $aoc->stdupgrade(@_);
}

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

#### non action functions ##
sub installform { print shift->{installform} }
sub upgradeform { print shift->{upgradeform} }
sub uninstallform { print shift->{uninstallform} }

1;
