mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
Оптимизация сохранения текста топика при отсутствии ката (поле text_short не заполняется)
This commit is contained in:
parent
2d0e1685e1
commit
366106771a
|
@ -321,7 +321,11 @@ class ActionContent extends Action
|
|||
$oTopic->setCutText($sTextCut);
|
||||
// TODO: передача параметров в Topic_Parser пока не используется - нужно заменить на этот вызов все места с парсингом топика
|
||||
$oTopic->setText($this->Topic_Parser($sTextNew, $oTopic));
|
||||
$oTopic->setTextShort($this->Topic_Parser($sTextShort, $oTopic));
|
||||
if ($sTextShort!=$sTextNew) {
|
||||
$oTopic->setTextShort($this->Topic_Parser($sTextShort, $oTopic));
|
||||
} else {
|
||||
$oTopic->setTextShort('');
|
||||
}
|
||||
} else {
|
||||
$oTopic->setCutText('');
|
||||
$oTopic->setText('');
|
||||
|
@ -450,7 +454,11 @@ class ActionContent extends Action
|
|||
list($sTextShort, $sTextNew, $sTextCut) = $this->Text_Cut($oTopic->getTextSource());
|
||||
$oTopic->setCutText($sTextCut);
|
||||
$oTopic->setText($this->Topic_Parser($sTextNew, $oTopic));
|
||||
$oTopic->setTextShort($this->Topic_Parser($sTextShort, $oTopic));
|
||||
if ($sTextShort!=$sTextNew) {
|
||||
$oTopic->setTextShort($this->Topic_Parser($sTextShort, $oTopic));
|
||||
} else {
|
||||
$oTopic->setTextShort('');
|
||||
}
|
||||
} else {
|
||||
$oTopic->setCutText('');
|
||||
$oTopic->setText('');
|
||||
|
|
|
@ -77,16 +77,16 @@
|
|||
<div class="{$component}-content">
|
||||
<div class="{$component}-text text">
|
||||
{block 'article_content_text'}
|
||||
{if $isList}
|
||||
{$article->getTextShort()}
|
||||
{else}
|
||||
{$article->getText()}
|
||||
{/if}
|
||||
{if $isList and $article->getTextShort()}
|
||||
{$article->getTextShort()}
|
||||
{else}
|
||||
{$article->getText()}
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
{* Кат *}
|
||||
{if $isList && $article->getTextShort() != $article->getText()}
|
||||
{if $isList && $article->getTextShort()}
|
||||
{include 'components/button/button.tpl'
|
||||
classes = "{$component}-cut"
|
||||
url = "{$article->getUrl()}#cut"
|
||||
|
|
Loading…
Reference in a new issue