From 366106771a852a733cac92ed48c30039b1154b16 Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Fri, 19 Dec 2014 14:15:39 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=BF=D1=82=D0=B8=D0=BC=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=82=D0=B5=D0=BA=D1=81=D1=82=D0=B0?= =?UTF-8?q?=20=D1=82=D0=BE=D0=BF=D0=B8=D0=BA=D0=B0=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=BE=D1=82=D1=81=D1=83=D1=82=D1=81=D1=82=D0=B2=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=BA=D0=B0=D1=82=D0=B0=20(=D0=BF=D0=BE=D0=BB=D0=B5=20text=5Fs?= =?UTF-8?q?hort=20=D0=BD=D0=B5=20=D0=B7=D0=B0=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=D1=81=D1=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/classes/actions/ActionContent.class.php | 12 ++++++++++-- .../skin/developer/components/article/article.tpl | 12 ++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/application/classes/actions/ActionContent.class.php b/application/classes/actions/ActionContent.class.php index 34cb7289..5ef60347 100644 --- a/application/classes/actions/ActionContent.class.php +++ b/application/classes/actions/ActionContent.class.php @@ -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(''); diff --git a/application/frontend/skin/developer/components/article/article.tpl b/application/frontend/skin/developer/components/article/article.tpl index 6d853380..60fe02cf 100644 --- a/application/frontend/skin/developer/components/article/article.tpl +++ b/application/frontend/skin/developer/components/article/article.tpl @@ -77,16 +77,16 @@
{block 'article_content_text'} - {if $isList} - {$article->getTextShort()} - {else} - {$article->getText()} - {/if} + {if $isList and $article->getTextShort()} + {$article->getTextShort()} + {else} + {$article->getText()} + {/if} {/block}
{* Кат *} - {if $isList && $article->getTextShort() != $article->getText()} + {if $isList && $article->getTextShort()} {include 'components/button/button.tpl' classes = "{$component}-cut" url = "{$article->getUrl()}#cut"