/** * Check whether the configuration in the configurations file is correct or not * This method displays a warning message on top of the page when the ftp connection failed or the configuration * is disabled */ protected function checkFtpAccess() { global $_ARRAYLANG; // Only check FTP access if SystemInfo has been licensed. // SystemInfo is a component that allows access to the webserver. // SystemInfo should only be licensed if the website is run on a self-hosted environment if (!in_array('SystemInfo', \Env::get('cx')->getLicense()->getLegalComponentsList())) { return; } // if ftp access is not activated or not possible to connect (not correct credentials) if (!\Cx\Lib\FileSystem\FileSystem::init()) { \Message::add(sprintf($_ARRAYLANG['TXT_SETTING_FTP_CONFIG_WARNING'], \Env::get('cx')->getWebsiteDocumentRootPath() . '/config/configuration.php'), \Message::CLASS_ERROR); } }