Skip to content

Commit

Permalink
Merge pull request #325 from humhub/fix/search
Browse files Browse the repository at this point in the history
[1.16] Update to new search indexing
  • Loading branch information
luke- committed Apr 4, 2024
2 parents 62b0156 + 4911131 commit 95c396f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

2.2.0 (Unreleased)
---------------------
- Fix #325: Update to new search indexing

2.1.1 (April 1, 2024)
---------------------
- Enh #318: Add menu item "Move content" on wiki view page
Expand Down
4 changes: 3 additions & 1 deletion models/WikiPageRevision.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace humhub\modules\wiki\models;

use humhub\components\ActiveRecord;
use humhub\modules\content\services\ContentSearchService;
use humhub\modules\user\models\User;
use Yii;

Expand Down Expand Up @@ -93,7 +94,8 @@ public function afterSave($insert, $changedAttributes)
WikiPageRevision::updateAll(['is_latest' => 0], 'wiki_page_id=:wikiPageId AND id!=:selfId', [':wikiPageId' => $this->wiki_page_id, ':selfId' => $this->id]);

try {
Yii::$app->search->update(WikiPage::findOne(['id' => $this->wiki_page_id]));
$wikiPage = WikiPage::findOne(['id' => $this->wiki_page_id]);
(new ContentSearchService($wikiPage->content))->update();
} catch (\Throwable $e) {
Yii::error($e);
}
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"name": "Wiki",
"description": "Create and edit pages with this powerful tool. Build a collaborative knowledge base, view and share information with your colleagues.",
"keywords": ["wiki"],
"version": "2.1.1",
"version": "2.2.0",
"humhub": {
"minVersion": "1.15"
"minVersion": "1.16"
},
"homepage": "https://github.com/humhub/wiki",
"authors": [
Expand Down

0 comments on commit 95c396f

Please sign in to comment.