Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stream channel for search indexing #339

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
1.10.6 (Unreleased)
----------------------
- Fix: Add autofocus on item or element edit (for HumHub 1.17 - see https://github.com/humhub/humhub/issues/7136)
- Fix #339: Fix stream channel for search indexing

1.10.5 (July 15, 2024)
----------------------
Expand Down
35 changes: 35 additions & 0 deletions migrations/m240805_130544_stream_channel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

use humhub\components\Migration;
use humhub\modules\content\models\Content;
use humhub\modules\custom_pages\models\ContainerPage;
use humhub\modules\custom_pages\models\ContainerSnippet;
use humhub\modules\custom_pages\models\Page;
use humhub\modules\custom_pages\models\Snippet;

/**
* Class m240805_130544_stream_channel
*/
class m240805_130544_stream_channel extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
Content::updateAll(
['stream_channel' => 'default'],
['IN', 'object_model', [Page::class, Snippet::class, ContainerPage::class, ContainerSnippet::class]],
);
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
echo "m240805_130544_stream_channel cannot be reverted.\n";

return false;
}
}
Loading