Revert removed property AbstractRichText::$record from PR #7211 (#7270)

This commit is contained in:
Yuriy Bakhtin 2024-10-22 12:49:25 +03:00 committed by GitHub
parent 8d1a95df0f
commit 8561e0e107
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 3 deletions

View File

@ -28,7 +28,6 @@ HumHub Changelog
- Enh #7167: Disable DEBUG mode automatically after successful humhub installation. Add `.env` support
- Enh #7202: Increased minimum PHP version to 8.1
- Enh #7208: Improvements in dotenv parsing
- Enh #7211: Remove obsolete property `AbstractRichText::$record`
- Enh #7213: By default, enabled "Mobile" notification types for those enabled for "Web"
- Fix #7215: Wording: replace British "licence" with American "license"
- Fix #6987: Added LatAm Spanish

View File

@ -50,7 +50,7 @@ $module = Yii::$app->getModule('comment');
<div class="content comment_edit_content" id="comment_editarea_<?= $comment->id; ?>">
<div id="comment-message-<?= $comment->id; ?>" class="comment-message" data-ui-markdown data-ui-show-more
data-read-more-text="<?= Yii::t('CommentModule.base', 'Read full comment...') ?>">
<?= RichText::output($comment->message) ?>
<?= RichText::output($comment->message, ['record' => $comment]) ?>
</div>
<?= ShowFiles::widget(['object' => $comment]); ?>
</div>

View File

@ -144,6 +144,14 @@ abstract class AbstractRichText extends JsWidget
*/
protected static $converterClass;
/**
* @var mixed can be used to identify the related record
* Note: This property is used by external modules:
* - Legal Tools: https://github.com/humhub/legal/blob/master/Events.php#L263
* - Link Preview: https://github.com/humhub/linkpreview/blob/master/widgets/Viewer.php#L44
*/
public $record;
/**
* @var array of richtext extension classes used for preparing and post processing output and converter result
* @since 1.8

View File

@ -23,6 +23,6 @@ $isDetailView = $renderOptions->isViewContext(WallStreamEntryOptions::VIEW_CONTE
data-collapse-at="<?= $collapsedPostHeight ?>"
<?php endif; ?>
>
<?= RichText::output($post->message) ?>
<?= RichText::output($post->message, ['record' => $post]) ?>
</div>
</div>