From 18289effeef9672580d0897294575d711b444869 Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Sat, 11 Apr 2009 07:02:48 +0000 Subject: [PATCH] =?UTF-8?q?fix=20=D0=B2=D1=81=D1=82=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8=20cut=20=D0=BC=D0=B5=D0=B6=D0=B4=D1=83=20=D0=BF=D0=B0?= =?UTF-8?q?=D1=80=D0=BD=D1=8B=D0=BC=D0=B8=20=D1=82=D0=B5=D0=B3=D0=B0=D0=BC?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/actions/ActionTopic.class.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/classes/actions/ActionTopic.class.php b/classes/actions/ActionTopic.class.php index f54bb0ce..5bf6bfe8 100644 --- a/classes/actions/ActionTopic.class.php +++ b/classes/actions/ActionTopic.class.php @@ -379,20 +379,21 @@ class ActionTopic extends Action { $sText=$this->Text_Parser(getRequest('topic_text')); /** * Создаёт анонс топика(обрезаем по тег ) - */ + */ $sTestShort=$sText; $sTestNew=$sText; $sTextTemp=str_replace("\r\n",'[]',$sText); $sTextTemp=str_replace("\n",'[]',$sTextTemp); if (preg_match("/^(.*)(.*)$/Ui",$sTextTemp,$aMatch)) { - $sTestShort=$aMatch[1]; - $sTestNew=$aMatch[1].' '.$aMatch[3]; + $sTestShort=$aMatch[1]; + $sTestShort=str_replace('[]',"\r\n",$sTestShort); + $sTestShort=str_replace('[]',"\r\n",$sTestShort); + $sTestShort=$this->Text_Parser($sTestShort); + $sTestNew=$aMatch[1].' '.$aMatch[3]; if (preg_match('/^\s*name\s*=\s*"(.+)"\s*$/Ui',$aMatch[2],$aMatchCut)) { $oTopic->setCutText(trim($aMatchCut[1])); } - } - $sTestShort=str_replace('[]',"\r\n",$sTestShort); - $sTestShort=str_replace('[]',"\r\n",$sTestShort); + } $sTestNew=str_replace('[]',"\r\n",$sTestNew); $sTestNew=str_replace('[]',"\r\n",$sTestNew); @@ -531,14 +532,15 @@ class ActionTopic extends Action { $sTextTemp=str_replace("\r\n",'[]',$sText); $sTextTemp=str_replace("\n",'[]',$sTextTemp); if (preg_match("/^(.*)(.*)$/Ui",$sTextTemp,$aMatch)) { - $sTestShort=$aMatch[1]; + $sTestShort=$aMatch[1]; + $sTestShort=str_replace('[]',"\r\n",$sTestShort); + $sTestShort=str_replace('[]',"\r\n",$sTestShort); + $sTestShort=$this->Text_Parser($sTestShort); $sTestNew=$aMatch[1].' '.$aMatch[3]; if (preg_match('/^\s*name\s*=\s*"(.+)"\s*$/Ui',$aMatch[2],$aMatchCut)) { $oTopic->setCutText(trim($aMatchCut[1])); } - } - $sTestShort=str_replace('[]',"\r\n",$sTestShort); - $sTestShort=str_replace('[]',"\r\n",$sTestShort); + } $sTestNew=str_replace('[]',"\r\n",$sTestNew); $sTestNew=str_replace('[]',"\r\n",$sTestNew);