-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
84 additions
and
16 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
src/plugin/forum/Installation/Migrations/Version20231207143300.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
namespace Claroline\ForumBundle\Installation\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20231207143300 extends AbstractMigration | ||
{ | ||
public function up(Schema $schema): void | ||
{ | ||
$this->addSql(' | ||
UPDATE `claro_template_content` | ||
LEFT JOIN `claro_template` ct on ct.id = `claro_template_content`.`template_id` | ||
LEFT JOIN `claro_template_type` ctt on ctt.id = ct.`claro_template_type` | ||
SET `title` = REPLACE(`title`, \'%date%\', \'%post_datetime%\') | ||
WHERE `title` LIKE \'%date%\' AND ctt.entity_name = \'forum_new_message\' | ||
'); | ||
|
||
$this->addSql(' | ||
UPDATE `claro_template_content` | ||
LEFT JOIN `claro_template` ct on ct.id = `claro_template_content`.`template_id` | ||
LEFT JOIN `claro_template_type` ctt on ctt.id = ct.`claro_template_type` | ||
SET `content` = REPLACE(`content`, \'%date%\', \'%post_datetime%\') | ||
WHERE `content` LIKE \'%date%\' AND ctt.entity_name = \'forum_new_message\' | ||
'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->addSql(' | ||
UPDATE `claro_template_content` | ||
LEFT JOIN `claro_template` ct on ct.id = `claro_template_content`.`template_id` | ||
LEFT JOIN `claro_template_type` ctt on ctt.id = ct.`claro_template_type` | ||
SET `title` = REPLACE(`title`, \'%post_datetime%\', \'%date%\') | ||
WHERE `title` LIKE \'%post_datetime%\' AND ctt.entity_name = \'forum_new_message\' | ||
'); | ||
|
||
$this->addSql(' | ||
UPDATE `claro_template_content` | ||
LEFT JOIN `claro_template` ct on ct.id = `claro_template_content`.`template_id` | ||
LEFT JOIN `claro_template_type` ctt on ctt.id = ct.`claro_template_type` | ||
SET `content` = REPLACE(`content`, \'%post_datetime%\', \'%date%\') | ||
WHERE `content` LIKE \'%post_datetime%\' AND ctt.entity_name = \'forum_new_message\' | ||
'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/plugin/forum/Resources/views/template/forum_new_message.en.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/plugin/forum/Resources/views/template/forum_new_message.fr.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters