|
|
@@ -100,8 +100,8 @@ class SiteController extends ActionController
|
|
|
|
|
|
// Redirections creation status
|
|
|
private const REDIRECTION_UNKNOWN_STATUS = 0;
|
|
|
- private const REDIRECTION_UPDATED = 1;
|
|
|
- private const REDIRECTION_CREATED = 2;
|
|
|
+ public const REDIRECTION_UPDATED = 1;
|
|
|
+ public const REDIRECTION_CREATED = 2;
|
|
|
|
|
|
/**
|
|
|
* @var ConnectionPool
|
|
|
@@ -502,6 +502,7 @@ class SiteController extends ActionController
|
|
|
$include .= ",EXT:frontend_editing/Configuration/TypoScript";
|
|
|
$include .= ",EXT:frontend_editing/Configuration/TypoScript/FluidStyledContent9";
|
|
|
$include .= ",EXT:ot_templating/Configuration/TypoScript";
|
|
|
+ $include .= ",EXT:hcaptcha/Configuration/TypoScript";
|
|
|
|
|
|
$queryBuilder = $this->connectionPool->getQueryBuilderForTable('sys_template');
|
|
|
$queryBuilder->insert('sys_template')
|
|
|
@@ -1769,7 +1770,9 @@ class SiteController extends ActionController
|
|
|
$backupConfigDir = $_ENV['TYPO3_PATH_APP'] . "/config/bkp_sites";
|
|
|
|
|
|
if (file_exists($backupConfigDir)) {
|
|
|
- throw new RuntimeException('A directory or a file with this name already exist: ' . $backupConfigDir);
|
|
|
+ throw new RuntimeException(
|
|
|
+ 'A directory or a file with this name already exist: ' . $backupConfigDir . '. Delete it before continuing.'
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
$this->connectionPool->getConnectionByName('Default')->beginTransaction();
|
|
|
@@ -1781,16 +1784,25 @@ class SiteController extends ActionController
|
|
|
$websites = $this->otWebsiteRepository->getAll();
|
|
|
|
|
|
foreach ($websites as $website) {
|
|
|
- $identifier = $website['subdomain'] . '_' . $website['organization_id'];
|
|
|
+ if (!((int)$website['organization_id'] > 0)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ $identifier = str_replace('/', '', $website['subdomain']) . '_' . $website['organization_id'];
|
|
|
$configDir = $configRootDir . $identifier;
|
|
|
$configFilename = $configDir . "/config.yaml";
|
|
|
|
|
|
$siteConfig = $this->otWebsiteRepository->generateWebsiteConfiguration($website, $identifier);
|
|
|
+
|
|
|
$config = $siteConfig->getConfiguration();
|
|
|
|
|
|
$yamlConfig = Yaml::dump($config, 99, 2);
|
|
|
|
|
|
- $this->mkDir($configDir);
|
|
|
+ try {
|
|
|
+ $this->mkDir($configDir);
|
|
|
+ } catch (\Throwable $e) {
|
|
|
+ throw new RuntimeException('Unable to create the directory ' . $configDir, 0, $e);
|
|
|
+ }
|
|
|
$this->writeFile($configFilename, $yamlConfig);
|
|
|
|
|
|
// ## Update the ot_website identifier
|
|
|
@@ -2024,7 +2036,7 @@ class SiteController extends ActionController
|
|
|
$cnn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
|
|
|
|
$stmt = $cnn->query(
|
|
|
- "SELECT o.id, o.name, o.facebook, o.twitter, o.instagram,
|
|
|
+ "SELECT o.id, o.name, o.facebook, o.twitter, o.instagram, o.youtube,
|
|
|
o.category, o.logo_id, p.logoDonorsMove
|
|
|
FROM opentalent.Organization o INNER JOIN opentalent.Parameters p
|
|
|
ON o.parameters_id = p.id
|
|
|
@@ -2092,6 +2104,7 @@ class SiteController extends ActionController
|
|
|
" twitter = " . $organizationExtraData['twitter'] . "\n" .
|
|
|
" facebook = " . $organizationExtraData['facebook'] . "\n" .
|
|
|
" instagram = " . $organizationExtraData['instagram'] . "\n" .
|
|
|
+ " youtube = " . $organizationExtraData['youtube'] . "\n" .
|
|
|
" }\n" .
|
|
|
" network {\n" .
|
|
|
" logo = " . $organizationExtraData['network']['logo'] . "\n" .
|