public function __construct() { $this->object = 'dir'; $this->subtype = 'children'; $this->method = 'direct'; $this->filter_name = 'PlatformSkipdirs'; // We take advantage of the filter class magic to inject our custom filters $configuration = AEFactory::getConfiguration(); if (defined('AKEEBACLI')) { $tmpdir = AEUtilJconfig::getValue('tmp_path'); } else { $jreg = JFactory::getConfig(); $tmpdir = $jreg->getValue('config.tmp_path'); } $this->filter_data['[SITEROOT]'] = array(self::treatDirectory($configuration->get('akeeba.basic.output_directory')), self::treatDirectory($tmpdir), self::treatDirectory(JPATH_CACHE), self::treatDirectory(JPATH_ADMINISTRATOR . '/cache'), self::treatDirectory(JPATH_ROOT . '/cache'), self::treatDirectory(JPATH_ROOT . '/installation'), self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/cache'), self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/administrator/cache'), 'administrator/components/com_akeeba/backup', self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/components/libraries/cmslib/cache'), 'logs'); parent::__construct(); }
public function __construct() { $this->object = 'dir'; $this->subtype = 'children'; $this->method = 'direct'; $this->filter_name = 'PlatformSkipdirs'; // We take advantage of the filter class magic to inject our custom filters $configuration =& AEFactory::getConfiguration(); if(defined('AKEEBACLI')) { $tmpdir = AEUtilJconfig::getValue('tmp_path'); } else { $jreg =& JFactory::getConfig(); $tmpdir = $jreg->getValue('config.tmp_path'); } $this->filter_data['[SITEROOT]'] = array ( // Output & temp directory of the component self::treatDirectory($configuration->get('akeeba.basic.output_directory')), self::treatDirectory($configuration->get('akeeba.basic.temporary_directory')), // Joomla! temporary directory self::treatDirectory($tmpdir), // Joomla! front- and back-end cache, as reported by Joomla! self::treatDirectory(JPATH_CACHE), self::treatDirectory(JPATH_ADMINISTRATOR.DS.'cache'), self::treatDirectory(JPATH_ROOT.DS.'cache'), // This is not needed except on sites running SVN or beta releases self::treatDirectory(JPATH_ROOT.DS.'installation'), // Joomla! front- and back-end cache, as calculated by us (redundancy, for funky server setups) self::treatDirectory( AEPlatform::get_site_root().DS.'cache' ), self::treatDirectory( AEPlatform::get_site_root().DS.'administrator'.DS.'cache'), 'administrator/components/com_akeeba/backup', // MyBlog's cache self::treatDirectory( AEPlatform::get_site_root().DS.'components'.DS.'libraries'.DS.'cmslib'.DS.'cache' ), // The logs directory 'logs' ); parent::__construct(); }
private static function getLanguageFilename($default = false, $frontend = true) { // We'll try to fetch the active front-end language from the database if ($default) { $lang = 'en-GB'; } else { $lang = AEUtilJconfig::getValue('language', 'en-GB'); } if ($frontend) { $lang_base = JPATH_SITE . '/language'; } else { $lang_base = JPATH_ADMINISTRATOR . '/language'; } $lang_file = $lang_base . '/' . $lang . '/' . $lang . '.com_akeeba.ini'; if (file_exists($lang_file)) { return $lang_file; } else { return $lang_base . '/en-GB/en-GB.com_akeeba.ini'; } }
public static function getCredentials($client, $force = false) { $options = array('enabled' => AEUtilJconfig::getValue('ftp_enable'), 'host' => AEUtilJconfig::getValue('ftp_host'), 'port' => AEUtilJconfig::getValue('ftp_port'), 'user' => AEUtilJconfig::getValue('ftp_user'), 'pass' => AEUtilJconfig::getValue('ftp_pass'), 'root' => AEUtilJconfig::getValue('ftp_root')); return $options; }