mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Fix wrong content id used in building cache key (#4882)
This commit is contained in:
parent
f70acfa8d7
commit
c3667ccdd9
@ -8,6 +8,7 @@
|
|||||||
- Fix #4850: New AuthClient method onSuccessLogin() not available on standard OAuths
|
- Fix #4850: New AuthClient method onSuccessLogin() not available on standard OAuths
|
||||||
- Fix #4856: Allow to invite users to space with pending membership application
|
- Fix #4856: Allow to invite users to space with pending membership application
|
||||||
- Fix #4869: Fix cached comment content in email notification
|
- Fix #4869: Fix cached comment content in email notification
|
||||||
|
- Fix #4857: Fix wrong content id on building cache key
|
||||||
- Fix #4838: ProsemirrorRichText::replaceLinkExtension() not compatible with HumHub < 1.8
|
- Fix #4838: ProsemirrorRichText::replaceLinkExtension() not compatible with HumHub < 1.8
|
||||||
- Fix #4847: RichText::postProcess(null) throws error
|
- Fix #4847: RichText::postProcess(null) throws error
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ use cebe\markdown\GithubMarkdown;
|
|||||||
use humhub\components\ActiveRecord;
|
use humhub\components\ActiveRecord;
|
||||||
use humhub\components\Event;
|
use humhub\components\Event;
|
||||||
use humhub\libs\Html;
|
use humhub\libs\Html;
|
||||||
|
use humhub\modules\content\components\ContentAddonActiveRecord;
|
||||||
use humhub\modules\content\interfaces\ContentOwner;
|
use humhub\modules\content\interfaces\ContentOwner;
|
||||||
use humhub\modules\content\widgets\richtext\extensions\link\LinkParserBlock;
|
use humhub\modules\content\widgets\richtext\extensions\link\LinkParserBlock;
|
||||||
use humhub\modules\content\widgets\richtext\extensions\link\RichTextLinkExtension;
|
use humhub\modules\content\widgets\richtext\extensions\link\RichTextLinkExtension;
|
||||||
@ -169,7 +170,12 @@ abstract class BaseRichTextConverter extends GithubMarkdown
|
|||||||
*/
|
*/
|
||||||
public static function buildCacheKeyForContent(ContentOwner $content, $prefix = null)
|
public static function buildCacheKeyForContent(ContentOwner $content, $prefix = null)
|
||||||
{
|
{
|
||||||
$result = 'content_'.$content->content->id;
|
if ($content instanceof ContentAddonActiveRecord) {
|
||||||
|
// prevent cache key for comments to use the same cache key of original content
|
||||||
|
return static::buildCacheKeyForRecord($content);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = 'content_' . $content->content->id;
|
||||||
return $prefix ? $prefix.'_'.$result : $result;
|
return $prefix ? $prefix.'_'.$result : $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ class MailContentEntry extends \yii\base\Widget
|
|||||||
$content = RichTextToHtmlConverter::process($this->content->getContentDescription(), [
|
$content = RichTextToHtmlConverter::process($this->content->getContentDescription(), [
|
||||||
RichTextToHtmlConverter::OPTION_IMAGE_AS_URL => true,
|
RichTextToHtmlConverter::OPTION_IMAGE_AS_URL => true,
|
||||||
RichTextToHtmlConverter::OPTION_LINK_AS_TEXT => true,
|
RichTextToHtmlConverter::OPTION_LINK_AS_TEXT => true,
|
||||||
RichTextToHtmlConverter::OPTION_CACHE_KEY => RichTextToHtmlConverter::buildCacheKeyForContent($this->content, 'mail_entry_' . $this->content->getContentName() . '_' . $this->content->id),
|
RichTextToHtmlConverter::OPTION_CACHE_KEY => RichTextToHtmlConverter::buildCacheKeyForContent($this->content, 'mail_entry'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if(!$this->originator) {
|
if(!$this->originator) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user