Exemplo n.º 1
0
 public function __construct()
 {
     $this->object = 'dbobject';
     $this->subtype = 'content';
     $this->method = 'api';
     parent::__construct();
 }
Exemplo n.º 2
0
 public function __construct()
 {
     $this->object = 'dir';
     $this->subtype = 'inclusion';
     $this->method = 'direct';
     $this->filter_name = 'Libraries';
     // 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 = Platform::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 = Factory::getFilesystemTools()->TranslateWinPath($jlibdir);
         $defaultLibraries = Factory::getFilesystemTools()->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();
 }
Exemplo n.º 3
0
 function __construct()
 {
     $this->object = 'file';
     $this->subtype = 'all';
     $this->method = 'api';
     if (empty($this->filter_name)) {
         $this->filter_name = strtolower(basename(__FILE__, '.php'));
     }
     parent::__construct();
 }
Exemplo n.º 4
0
 public function __construct()
 {
     $this->object = 'dbobject';
     $this->subtype = 'content';
     $this->method = 'direct';
     $this->filter_name = 'Excludetabledata';
     // We take advantage of the filter class magic to inject our custom filters
     $this->filter_data['[SITEDB]'] = array('#__session', '#__guardxt_runs');
     parent::__construct();
 }
Exemplo n.º 5
0
 public function __construct()
 {
     $this->object = 'file';
     $this->subtype = 'all';
     $this->method = 'direct';
     $this->filter_name = 'Excludefiles';
     // We take advantage of the filter class magic to inject our custom filters
     $allFiles = explode('|', Factory::getConfiguration()->get('akeeba.basic.exclude_files'));
     $this->filter_data['[SITEROOT]'] = array_unique($allFiles);
     parent::__construct();
 }
Exemplo n.º 6
0
 public function __construct()
 {
     $this->object = 'file';
     $this->subtype = 'all';
     $this->method = 'regex';
     $this->filter_name = 'Regexfilesext';
     $extensions = Factory::getConfiguration()->get('akeeba.basic.file_extensions', 'php|phps|php3|inc');
     $extensions = str_replace('.', '\\.', $extensions);
     $this->filter_data['[SITEROOT]'] = array("!#\\.(" . $extensions . ")\$#");
     parent::__construct();
 }
Exemplo n.º 7
0
 function __construct()
 {
     $this->object = 'dir';
     $this->subtype = 'content';
     $this->method = 'direct';
     if (empty($this->filter_name)) {
         $this->filter_name = strtolower(basename(__FILE__, '.php'));
     }
     if (Factory::getKettenrad()->getTag() == 'restorepoint') {
         $this->enabled = false;
     }
     parent::__construct();
 }
Exemplo n.º 8
0
 public function __construct()
 {
     $this->object = 'dir';
     $this->subtype = 'all';
     $this->method = 'direct';
     $this->filter_name = 'Excludefolders';
     // Get the site's root
     $configuration = Factory::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();
 }
Exemplo n.º 9
0
 public function __construct()
 {
     // This is a directory inclusion filter.
     $this->object = 'db';
     $this->subtype = 'inclusion';
     $this->method = 'direct';
     $this->filter_name = 'Sitedb';
     // Add a new record for the core Joomla! database
     // Get core database options
     $configuration = Factory::getConfiguration();
     if ($configuration->get('akeeba.platform.override_db', 0)) {
         $options = array('port' => $configuration->get('akeeba.platform.dbport', ''), 'host' => $configuration->get('akeeba.platform.dbhost', ''), 'user' => $configuration->get('akeeba.platform.dbusername', ''), 'password' => $configuration->get('akeeba.platform.dbpassword', ''), 'database' => $configuration->get('akeeba.platform.dbname', ''), 'prefix' => $configuration->get('akeeba.platform.dbprefix', ''));
         $driver = '\\Akeeba\\Engine\\Driver\\' . ucfirst($configuration->get('akeeba.platform.dbdriver', 'mysqli'));
     } else {
         $options = Platform::getInstance()->get_platform_database_options();
         $driver = Platform::getInstance()->get_default_database_driver(true);
     }
     $host = $options['host'];
     $port = array_key_exists('port', $options) ? $options['port'] : null;
     if (empty($port)) {
         $port = null;
     }
     $socket = null;
     $targetSlot = substr(strstr($host, ":"), 1);
     if (!empty($targetSlot)) {
         // Get the port number or socket name
         if (is_numeric($targetSlot) && is_null($port)) {
             $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' => 'site.sql', 'driver' => $driver);
     // We take advantage of the filter class magic to inject our custom filters
     $configuration = Factory::getConfiguration();
     $this->filter_data['[SITEDB]'] = $entry;
     parent::__construct();
 }
Exemplo n.º 10
0
 function __construct()
 {
     $this->object = 'dir';
     $this->subtype = 'all';
     $this->method = 'regex';
     $this->filter_name = 'Cvsfolders';
     if (empty($this->filter_name)) {
         $this->filter_name = strtolower(basename(__FILE__, '.php'));
     }
     parent::__construct();
     // Get the site's root
     $configuration = Factory::getConfiguration();
     if ($configuration->get('akeeba.platform.override_root', 0)) {
         $root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
     } else {
         $root = '[SITEROOT]';
     }
     $this->filter_data[$root] = array('#/\\.git$#', '#^\\.git$#', '#/\\.svn$#', '#^\\.svn$#');
 }
Exemplo n.º 11
0
 function __construct()
 {
     $this->object = 'file';
     $this->subtype = 'all';
     $this->method = 'regex';
     $this->filter_name = 'Systemcachefiles';
     if (empty($this->filter_name)) {
         $this->filter_name = strtolower(basename(__FILE__, '.php'));
     }
     parent::__construct();
     // Get the site's root
     $configuration = Factory::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');
 }
Exemplo n.º 12
0
 public function __construct()
 {
     $this->object = 'dir';
     $this->subtype = 'content';
     $this->method = 'direct';
     $this->filter_name = 'Joomlaskipfiles';
     // We take advantage of the filter class magic to inject our custom filters
     $configuration = Factory::getConfiguration();
     $jreg = \JFactory::getConfig();
     $tmpdir = $jreg->get('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($this->treatDirectory($configuration->get('akeeba.basic.output_directory')), $this->treatDirectory($tmpdir), 'tmp', $this->treatDirectory(JPATH_CACHE), $this->treatDirectory(JPATH_ADMINISTRATOR . '/cache'), $this->treatDirectory(JPATH_ROOT . '/cache'), 'cache', 'administrator/cache', $this->treatDirectory(JPATH_ROOT . '/installation'), 'installation', $this->treatDirectory(Platform::getInstance()->get_site_root() . '/cache'), $this->treatDirectory(Platform::getInstance()->get_site_root() . '/administrator/cache'), $this->treatDirectory(Platform::getInstance()->get_site_root() . '/components/libraries/cmslib/cache'), 'components/libraries/cmslib/cache', 'logs');
     parent::__construct();
 }
Exemplo n.º 13
0
 public function __construct()
 {
     // This is a directory inclusion filter.
     $this->object = 'dir';
     $this->subtype = 'inclusion';
     $this->method = 'direct';
     $this->filter_name = 'Siteroot';
     // 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 = Factory::getConfiguration();
     if ($configuration->get('akeeba.platform.override_root', 0)) {
         $root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
     } else {
         $root = '[SITEROOT]';
     }
     $this->filter_data[] = array($root, $add_path);
     parent::__construct();
 }