AntonLV 8 سال پیش
والد
کامیت
152cb11754
2فایلهای تغییر یافته به همراه0 افزوده شده و 19 حذف شده
  1. 0 14
      inc/classes/BxDolCmts.php
  2. 0 5
      template/scripts/BxBaseCmts.php

+ 0 - 14
inc/classes/BxDolCmts.php

@@ -1327,20 +1327,6 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
             
     }
 
-    protected function _prepareTextForEdit ($s)
-    {
-        if (!$this->isHtml())
-            return htmlspecialchars_decode(str_replace('<br />', "", $s));
-
-        return $s;
-    }
-
-    protected function _prepareTextForSave ($s)
-    {
-        $iDataAction = !$this->isHtml() ? BX_DATA_TEXT_MULTILINE : BX_DATA_HTML;
-        return bx_process_input($s, $iDataAction);
-    }
-
     protected function _prepareTextForOutput ($s, $iCmtId = 0)
     {
     	$iDataAction = !$this->isHtml() ? BX_DATA_TEXT_MULTILINE : BX_DATA_HTML;

+ 0 - 5
template/scripts/BxBaseCmts.php

@@ -525,8 +525,6 @@ class BxBaseCmts extends BxDolCmts
             $iCmtAuthorId = $this->_getAuthorId();
             $iCmtParentId = $oForm->getCleanValue('cmt_parent_id');
             $sCmtText = $oForm->getCleanValue('cmt_text');
-            $sCmtText = $this->_prepareTextForSave ($sCmtText);
-            $oForm->setSubmittedValue('cmt_text', $sCmtText, $oForm->aFormAttrs['method']);
 
             $iLevel = 0;
             $iCmtVisualParentId = 0;
@@ -590,13 +588,10 @@ class BxBaseCmts extends BxDolCmts
             return array('msg' => $aCmt['cmt_author_id'] == $iCmtAuthorId ? strip_tags($this->msgErrEditAllowed()) : _t('_Access denied'));
 
         $oForm = $this->_getForm(BX_CMT_ACTION_EDIT, $aCmt['cmt_id']);
-        $aCmt['cmt_text'] = $this->_prepareTextForEdit($aCmt['cmt_text']);
 
         $oForm->initChecker($aCmt);
         if($oForm->isSubmittedAndValid()) {
             $sCmtText = $oForm->getCleanValue('cmt_text');
-            $sCmtText = $this->_prepareTextForSave ($sCmtText);
-            $oForm->setSubmittedValue('cmt_text', $sCmtText, $oForm->aFormAttrs['method']);
 
             if($oForm->update($iCmtId) !== false) {