/** * Extend the bootstrap code to add some define's used by the ZIP format engine * * @return void */ protected function __bootstrap_code() { if (!defined('_AKEEBA_COMPRESSION_THRESHOLD')) { $config = Factory::getConfiguration(); define("_AKEEBA_COMPRESSION_THRESHOLD", $config->get('engine.archiver.common.big_file_threshold')); // Don't compress files over this size define("_AKEEBA_DIRECTORY_READ_CHUNK", $config->get('engine.archiver.zip.cd_glue_chunk_size')); // How much data to read at once when finalizing ZIP archives } $this->crcCalculator = Factory::getCRC32Calculator(); parent::__bootstrap_code(); }
/** * Extend the bootstrap code to add some define's used by the JPA format engine * * @codeCoverageIgnore * * @return void */ protected function __bootstrap_code() { if (!defined('_AKEEBA_COMPRESSION_THRESHOLD')) { $config = Factory::getConfiguration(); define("_AKEEBA_COMPRESSION_THRESHOLD", $config->get('engine.archiver.common.big_file_threshold')); // Don't compress files over this size /** * Akeeba Backup and JPA Format version change chart: * Akeeba Backup 3.0: JPA Format 1.1 is used * Akeeba Backup 3.1: JPA Format 1.2 with file modification timestamp is used */ define('_JPA_MAJOR', 1); // JPA Format major version number define('_JPA_MINOR', 2); // JPA Format minor version number } parent::__bootstrap_code(); }
/** * Common code which gets called on instance creation or wake-up (unserialization). Reloads the component's * parameters. * * @return void */ protected function __bootstrap_code() { if (is_null($this->generateDiff)) { \JLoader::import('joomla.html.parameter'); \JLoader::import('joomla.application.component.helper'); $db = \JFactory::getDbo(); $sql = $db->getQuery(true)->select($db->qn('params'))->from($db->qn('#__extensions'))->where($db->qn('type') . ' = ' . $db->q('component'))->where($db->qn('element') . ' = ' . $db->q('com_admintools')); $db->setQuery($sql); $rawparams = $db->loadResult(); $params = new \JRegistry(); $params->loadString($rawparams, 'JSON'); $this->generateDiff = $params->get('scandiffs', false); $this->ignoreNonThreats = $params->get('scanignorenonthreats', false); $email = $params->get('scanemail', ''); \Akeeba\Engine\Factory::getConfiguration()->set('admintools.scanner.email', $email); } parent::__bootstrap_code(); }