Exemplo n.º 1
0
 public function action_hpm_init()
 {
     DB::register_table('packages');
     include 'habaripackage.php';
     include 'habaripackages.php';
     include 'packagearchive.php';
     include 'archivereader.php';
     include 'tarreader.php';
     include 'zipreader.php';
     include 'txtreader.php';
     PackageArchive::register_archive_reader('application/x-zip', 'ZipReader');
     PackageArchive::register_archive_reader('application/zip', 'ZipReader');
     PackageArchive::register_archive_reader('application/x-tar', 'TarReader');
     PackageArchive::register_archive_reader('application/tar', 'TarReader');
     PackageArchive::register_archive_reader('application/x-gzip', 'TarReader');
     PackageArchive::register_archive_reader('text/plain', 'TxtReader');
     PackageArchive::register_archive_reader('text/php', 'TxtReader');
     PackageArchive::register_archive_reader('application/php', 'TxtReader');
     $this->add_template('hpm', dirname(__FILE__) . '/templates/hpm.php');
     $this->add_template('hpm_packages', dirname(__FILE__) . '/templates/hpm_packages.php');
     $this->add_template('hpm_notice', dirname(__FILE__) . '/templates/hpm_notice.php');
 }