|
@@ -770,7 +770,7 @@ class SiteController extends ActionController
|
|
|
->fetchOne() === 1;
|
|
->fetchOne() === 1;
|
|
|
|
|
|
|
|
$confirm_file = $_ENV['TYPO3_PATH_APP'] . "/DEL" . $organizationId;
|
|
$confirm_file = $_ENV['TYPO3_PATH_APP'] . "/DEL" . $organizationId;
|
|
|
- if (!$force && $hard && !file_exists($confirm_file)) {
|
|
|
|
|
|
|
+ if ($hard && !$force && !file_exists($confirm_file)) {
|
|
|
throw new RuntimeException(
|
|
throw new RuntimeException(
|
|
|
"You are going to completely delete the website with root uid " . $rootUid .
|
|
"You are going to completely delete the website with root uid " . $rootUid .
|
|
|
", and all of its pages, files, contents...etc. If you are sure, create a file named '" .
|
|
", and all of its pages, files, contents...etc. If you are sure, create a file named '" .
|
|
@@ -933,7 +933,9 @@ class SiteController extends ActionController
|
|
|
|
|
|
|
|
// Add the redirection
|
|
// Add the redirection
|
|
|
if ($redirectToParent) {
|
|
if ($redirectToParent) {
|
|
|
- $this->addRedirection($originDomain, $targetDomain);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ $this->addRedirection($originDomain, $targetDomain);
|
|
|
|
|
+ } catch (RuntimeException $e) {} // silent the error until this https://assistance.opentalent.fr/browse/V8-3344
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Try to commit the result
|
|
// Try to commit the result
|
|
@@ -1382,7 +1384,9 @@ class SiteController extends ActionController
|
|
|
|
|
|
|
|
if ($redirect) {
|
|
if ($redirect) {
|
|
|
// Add the redirection
|
|
// Add the redirection
|
|
|
- $this->addRedirection($originDomain, $newDomain);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ $this->addRedirection($originDomain, $newDomain);
|
|
|
|
|
+ } catch (\RuntimeException $e) {} // silent the error until this https://assistance.opentalent.fr/browse/V8-3344
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
OtCacheManager::clearSiteCache($rootUid, true);
|
|
OtCacheManager::clearSiteCache($rootUid, true);
|
|
@@ -1445,6 +1449,7 @@ class SiteController extends ActionController
|
|
|
* @param $fromDomain
|
|
* @param $fromDomain
|
|
|
* @param $toDomain
|
|
* @param $toDomain
|
|
|
* @return int Status of the operation
|
|
* @return int Status of the operation
|
|
|
|
|
+ * @throws Exception
|
|
|
*/
|
|
*/
|
|
|
public function addRedirection($fromDomain, $toDomain): int
|
|
public function addRedirection($fromDomain, $toDomain): int
|
|
|
{
|
|
{
|
|
@@ -1527,6 +1532,7 @@ class SiteController extends ActionController
|
|
|
* @param $fromDomain
|
|
* @param $fromDomain
|
|
|
* @param bool $hard
|
|
* @param bool $hard
|
|
|
* @return int Number of affected rows
|
|
* @return int Number of affected rows
|
|
|
|
|
+ * @throws Exception
|
|
|
*/
|
|
*/
|
|
|
public function removeRedirectionsFrom($fromDomain, bool $hard=false): int
|
|
public function removeRedirectionsFrom($fromDomain, bool $hard=false): int
|
|
|
{
|
|
{
|