} // ... and create new dir if necessary if ($_SESSION['application']['htmlpurifier.use_cache'] && $_SESSION['application']['htmlpurifier.cache_dir']) { conjoon_mkdir($_SESSION['application']['htmlpurifier.cache_dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['application']['htmlpurifier.cache_dir'] . '/.htaccess'); } // process doctrine cache directories InstallLogger::stdout(InstallLogger::logMessage("Processing Doctrine cache directories"), true); $doctrineCacheConfigKeys = array('query_cache', 'metadata_cache'); foreach ($doctrineCacheConfigKeys as $doctrineCacheConfigKey) { // remove old doctrine cache if needed if (isset($_SESSION['installation_info']['application.doctrine.cache.' . $doctrineCacheConfigKey . '.type']) && $_SESSION['installation_info']['application.doctrine.cache.' . $doctrineCacheConfigKey . '.type'] == 'file' && isset($_SESSION['installation_info']['application.doctrine.cache.' . $doctrineCacheConfigKey . '.dir']) && file_exists($_SESSION['installation_info']['application.doctrine.cache.' . $doctrineCacheConfigKey . '.dir'])) { @conjoon_rmdir($_SESSION['installation_info']['application.doctrine.cache.' . $doctrineCacheConfigKey . '.dir']); } // ... and create new dir if necessary if ($_SESSION['application']['doctrine.cache.' . $doctrineCacheConfigKey . '.type'] == 'file' && $_SESSION['application']['doctrine.cache.' . $doctrineCacheConfigKey . '.dir']) { conjoon_mkdir($_SESSION['application']['doctrine.cache.' . $doctrineCacheConfigKey . '.dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['application']['doctrine.cache.' . $doctrineCacheConfigKey . '.dir'] . '/.htaccess'); } } // process file related directory // ... and create new dir if necessary // dont remove previous directories snce it might be needed to // re-store previous files handled by the dirs configured // for previous installations InstallLogger::stdout(InstallLogger::logMessage("Processing file system functionality"), true); if ($_SESSION['files']['storage.filesystem.enabled'] && $_SESSION['files']['storage.filesystem.dir']) { conjoon_mkdir($_SESSION['files']['storage.filesystem.dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['files']['storage.filesystem.dir'] . '/.htaccess'); } echo "<script type=\"text/javascript\">this.location.href=\"./index.php?action=install_chunk_5\"</script>";
} else { $_SESSION['application']['doctrine.cache.enabled'] = true; foreach ($DOCTRINE_CACHE_TYPES as $doctrineCacheKey => $doctrineCacheValues) { $_SESSION['application']['doctrine.cache.' . $doctrineCacheKey . '.enabled'] = $_POST['doctrine_cache_' . $doctrineCacheKey . '_enabled'] == true; if ($_SESSION['application']['doctrine.cache.' . $doctrineCacheKey . '.enabled']) { $_SESSION['application']['doctrine.cache.' . $doctrineCacheKey . '.type'] = $_POST['doctrine_cache_' . $doctrineCacheKey . '_type']; if ($_SESSION['application']['doctrine.cache.' . $doctrineCacheKey . '.type'] == 'file') { // check directories $tryCacheDir = $_POST['doctrine_cache_' . $doctrineCacheKey . '_dir']; if (trim($tryCacheDir) == "") { $tryCacheDir = conjoon_cacheSetup_getCacheDir('doctrine.cache.' . $doctrineCacheKey . '.dir', 'application'); } if (strpos($tryCacheDir, '/') !== 0 && strpos($tryCacheDir, ':') !== 1) { $tryCacheDir = rtrim($_SESSION['app_path'], '/') . '/' . rtrim($_SESSION['setup_ini']['app_path']['folder'], '/') . '/' . $tryCacheDir; } $dirCheck = conjoon_mkdir($tryCacheDir, true); $_SESSION['application']['doctrine.cache.' . $doctrineCacheKey . '.dir'] = $tryCacheDir; if ($dirCheck === false) { $_SESSION['application']['doctrine.cache.' . $doctrineCacheKey . '.dir.install_failed'] = true; $_SESSION['lib_settings_failed'] = true; } } } else { $_SESSION['application']['doctrine.cache.' . $doctrineCacheKey . '.dir'] = $_SESSION['setup_ini']['application']['doctrine.cache.' . $doctrineCacheKey . '.cache_dir']; } } } if (!$_SESSION['lib_settings_failed']) { header("Location: ./?action=lib_settings_success"); die; }
} if ($_SESSION['cache']['email.folders_root_type.caching']) { conjoon_mkdir($_SESSION['cache']['email.folders_root_type.backend.cache_dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['cache']['email.folders_root_type.backend.cache_dir'] . '/.htaccess'); } if ($_SESSION['cache']['feed.item.caching']) { conjoon_mkdir($_SESSION['cache']['feed.item.backend.cache_dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['cache']['feed.item.backend.cache_dir'] . '/.htaccess'); } if ($_SESSION['cache']['feed.item_list.caching']) { conjoon_mkdir($_SESSION['cache']['feed.item_list.backend.cache_dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['cache']['feed.item_list.backend.cache_dir'] . '/.htaccess'); } if ($_SESSION['cache']['feed.reader.caching']) { conjoon_mkdir($_SESSION['cache']['feed.reader.backend.cache_dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['cache']['feed.reader.backend.cache_dir'] . '/.htaccess'); } if ($_SESSION['cache']['feed.account.caching']) { conjoon_mkdir($_SESSION['cache']['feed.account.backend.cache_dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['cache']['feed.account.backend.cache_dir'] . '/.htaccess'); } if ($_SESSION['cache']['feed.account_list.caching']) { conjoon_mkdir($_SESSION['cache']['feed.account_list.backend.cache_dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['cache']['feed.account_list.backend.cache_dir'] . '/.htaccess'); } if ($_SESSION['cache']['twitter.accounts.caching']) { conjoon_mkdir($_SESSION['cache']['twitter.accounts.backend.cache_dir']); conjoon_copy('./htaccess.deny.txt', $_SESSION['cache']['twitter.accounts.backend.cache_dir'] . '/.htaccess'); } } echo "<script type=\"text/javascript\">this.location.href=\"./index.php?action=install_chunk_6\"</script>";