Esempio n. 1
0
 public function __construct()
 {
     $this->object = 'dir';
     $this->subtype = 'content';
     $this->method = 'direct';
     $this->filter_name = 'PlatformSkipfiles';
     if (AEFactory::getKettenrad()->getTag() == 'restorepoint') {
         $this->enabled = false;
     }
     // We take advantage of the filter class magic to inject our custom filters
     $configuration = AEFactory::getConfiguration();
     $jreg = JFactory::getConfig();
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $tmpdir = $jreg->get('tmp_path');
     } else {
         $tmpdir = $jreg->getValue('config.tmp_path');
     }
     // Get the site's root
     if ($configuration->get('akeeba.platform.override_root', 0)) {
         $root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
     } else {
         $root = '[SITEROOT]';
     }
     $this->filter_data[$root] = array(self::treatDirectory($configuration->get('akeeba.basic.output_directory')), self::treatDirectory($tmpdir), 'tmp', self::treatDirectory(JPATH_CACHE), self::treatDirectory(JPATH_ADMINISTRATOR . '/cache'), self::treatDirectory(JPATH_ROOT . '/cache'), 'cache', 'administrator/cache', self::treatDirectory(JPATH_ROOT . '/installation'), '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'), 'components/libraries/cmslib/cache', 'logs');
     parent::__construct();
 }
 public function __construct()
 {
     $this->object = 'dir';
     $this->subtype = 'inclusion';
     $this->method = 'direct';
     // FIXME This filter doesn't work very well on many live hosts. Disabled for now.
     parent::__construct();
     return;
     if (empty($this->filter_name)) {
         $this->filter_name = strtolower(basename(__FILE__, '.php'));
     }
     // Get the saved library path and compare it to the default
     $jlibdir = AEPlatform::getInstance()->get_platform_configuration_option('jlibrariesdir', '');
     if (empty($jlibdir)) {
         if (defined('JPATH_LIBRARIES')) {
             $jlibdir = JPATH_LIBRARIES;
         } elseif (defined('JPATH_PLATFORM')) {
             $jlibdir = JPATH_PLATFORM;
         } else {
             $jlibdir = false;
         }
     }
     if ($jlibdir !== false) {
         $jlibdir = AEUtilFilesystem::TranslateWinPath($jlibdir);
         $defaultLibraries = AEUtilFilesystem::TranslateWinPath(JPATH_SITE . '/libraries');
         if ($defaultLibraries != $jlibdir) {
             // The path differs, add it here
             $this->filter_data['JPATH_LIBRARIES'] = $jlibdir;
         }
     } else {
         $this->filter_data = array();
     }
     parent::__construct();
 }
Esempio n. 3
0
 public function __construct()
 {
     // This is a directory inclusion filter.
     $this->object = 'db';
     $this->subtype = 'inclusion';
     $this->method = 'direct';
     $this->filter_name = 'PlatformSitedb';
     // Add a new record for the core Joomla! database
     // Get core database options
     $options = AEPlatform::getInstance()->get_platform_database_options();
     $host = $options['host'];
     $port = NULL;
     $socket = NULL;
     $targetSlot = substr(strstr($host, ":"), 1);
     if (!empty($targetSlot)) {
         // Get the port number or socket name
         if (is_numeric($targetSlot)) {
             $port = $targetSlot;
         } else {
             $socket = $targetSlot;
         }
         // Extract the host name only
         $host = substr($host, 0, strlen($host) - (strlen($targetSlot) + 1));
         // This will take care of the following notation: ":3306"
         if ($host == '') {
             $host = 'localhost';
         }
     }
     // This is the format of the database inclusion filters
     $entry = array('host' => $host, 'port' => is_null($socket) ? is_null($port) ? '' : $port : $socket, 'username' => $options['user'], 'password' => $options['password'], 'database' => $options['database'], 'prefix' => $options['prefix'], 'dumpFile' => 'joomla.sql', 'driver' => AEPlatform::getInstance()->get_default_database_driver(true));
     // We take advantage of the filter class magic to inject our custom filters
     $configuration =& AEFactory::getConfiguration();
     $this->filter_data['[SITEDB]'] = $entry;
     parent::__construct();
 }
Esempio n. 4
0
	function __construct()
	{
		$this->object	= 'dir';
		$this->subtype	= 'content';
		$this->method	= 'direct';

		if(empty($this->filter_name)) $this->filter_name = strtolower(basename(__FILE__,'.php'));
		parent::__construct();
	}
 public function __construct()
 {
     $this->object = 'dir';
     $this->subtype = 'all';
     $this->method = 'direct';
     $this->filter_name = 'PlatformFolders';
     // We take advantage of the filter class magic to inject our custom filters
     $this->filter_data['[SITEROOT]'] = array('awstats', 'cgi-bin');
     parent::__construct();
 }
 public function __construct()
 {
     $this->object = 'dbobject';
     $this->subtype = 'content';
     $this->method = 'direct';
     $this->filter_name = 'PlatformTabledata';
     // We take advantage of the filter class magic to inject our custom filters
     $this->filter_data['[SITEDB]'] = array('#__session', '#__guardxt_runs');
     parent::__construct();
 }
Esempio n. 7
0
 public function __construct()
 {
     $this->object = 'file';
     $this->subtype = 'all';
     $this->method = 'direct';
     $this->filter_name = 'PlatformFiles';
     // We take advantage of the filter class magic to inject our custom filters
     $this->filter_data['[SITEROOT]'] = array('kickstart.php', 'error_log', 'administrator/error_log');
     parent::__construct();
 }
Esempio n. 8
0
	function __construct()
	{
		$this->object	= 'dbobject';
		$this->subtype	= 'all';
		$this->method	= 'direct';
		
		if(AEFactory::getKettenrad()->getTag() == 'restorepoint') $this->enabled = false;

		if(empty($this->filter_name)) $this->filter_name = strtolower(basename(__FILE__,'.php'));
		parent::__construct();
	}
 function __construct()
 {
     $this->object = 'file';
     $this->subtype = 'all';
     $this->method = 'regex';
     if (empty($this->filter_name)) {
         $this->filter_name = strtolower(basename(__FILE__, '.php'));
     }
     parent::__construct();
     $this->filter_data['[SITEROOT]'] = array('#/Thumbs.db$#', '#^Thumbs.db$#', '#/.DS_Store$#i', '#^.DS_Store$#i');
 }
Esempio n. 10
0
 public function __construct()
 {
     $this->object = 'dbobject';
     $this->subtype = 'content';
     $this->method = 'direct';
     $this->filter_name = 'PlatformTabledata';
     // We take advantage of the filter class magic to inject our custom filters
     $this->filter_data['[SITEDB]'] = array('#__session', '#__guardxt_runs');
     if (AEFactory::getKettenrad()->getTag() == 'restorepoint') {
         $this->enabled = false;
     }
     parent::__construct();
 }
Esempio n. 11
0
 public function __construct()
 {
     $this->object = 'components';
     $this->subtype = 'all';
     $this->method = 'direct';
     if (empty($this->filter_name)) {
         $this->filter_name = strtolower(basename(__FILE__, '.php'));
     }
     if (AEFactory::getKettenrad()->getTag() == 'restorepoint') {
         $this->enabled = false;
     }
     $this->joomla16 = !@file_exists(JPATH_SITE . '/includes/joomla.php');
     parent::__construct();
 }
 public function hasFilters()
 {
     // Reset the filters
     $this->filter_data = array();
     // Add filters for modules
     $admin = substr(JPATH_ADMINISTRATOR, strlen(JPATH_SITE) + 1);
     $filterObjects = array(array('modules', 'frontend', 'modules'), array('modules', 'backend', $admin . '/modules'));
     foreach ($filterObjects as $filterObject) {
         $this->createFilterEntry($filterObject[0], $filterObject[1], $filterObject[2]);
     }
     // Plugins are a special case. They're stored in the front end, but
     // there are subdirectories based on type. Extensions can define custom types,
     // therefore there is no predetermined set of directories. We have to scan for it.
     $this->createPluginFilters();
     return parent::hasFilters();
 }
Esempio n. 13
0
 public function __construct()
 {
     // This is a directory inclusion filter.
     $this->object = 'dir';
     $this->subtype = 'inclusion';
     $this->method = 'direct';
     $this->filter_name = 'PlatformSiteroot';
     // Directory inclusion format:
     // array(real_directory, add_path)
     $add_path = null;
     // A null add_path means that we dump this dir's contents in the archive's root
     // We take advantage of the filter class magic to inject our custom filters
     $configuration =& AEFactory::getConfiguration();
     $this->filter_data[] = array('[SITEROOT]', $add_path);
     parent::__construct();
 }
Esempio n. 14
0
 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();
 }
Esempio n. 15
0
 public function __construct()
 {
     $this->object = 'dir';
     $this->subtype = 'all';
     $this->method = 'direct';
     $this->filter_name = 'PlatformFolders';
     // Get the site's root
     $configuration = AEFactory::getConfiguration();
     if ($configuration->get('akeeba.platform.override_root', 0)) {
         $root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
     } else {
         $root = '[SITEROOT]';
     }
     // We take advantage of the filter class magic to inject our custom filters
     $this->filter_data[$root] = array('awstats', 'cgi-bin');
     parent::__construct();
 }
 function __construct()
 {
     $this->object = 'file';
     $this->subtype = 'all';
     $this->method = 'regex';
     if (empty($this->filter_name)) {
         $this->filter_name = strtolower(basename(__FILE__, '.php'));
     }
     parent::__construct();
     // Get the site's root
     $configuration = AEFactory::getConfiguration();
     if ($configuration->get('akeeba.platform.override_root', 0)) {
         $root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
     } else {
         $root = '[SITEROOT]';
     }
     $this->filter_data[$root] = array('#/Thumbs.db$#', '#^Thumbs.db$#', '#/.DS_Store$#i', '#^.DS_Store$#i');
 }
Esempio n. 17
0
	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();
	}
Esempio n. 18
0
 public function __construct()
 {
     $this->object = 'file';
     $this->subtype = 'all';
     $this->method = 'direct';
     $this->filter_name = 'PlatformFiles';
     if (AEFactory::getKettenrad()->getTag() == 'restorepoint') {
         $this->enabled = false;
     }
     // Get the site's root
     $configuration = AEFactory::getConfiguration();
     if ($configuration->get('akeeba.platform.override_root', 0)) {
         $root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
     } else {
         $root = '[SITEROOT]';
     }
     // We take advantage of the filter class magic to inject our custom filters
     $this->filter_data[$root] = array('kickstart.php', 'error_log', 'administrator/error_log');
     parent::__construct();
 }