Răsfoiți Sursa

#3651 - Add context parameters for mentions request

RomanL 4 ani în urmă
părinte
comite
35cb16837d

+ 12 - 0
modules/base/general/classes/BxBaseModGeneralFormEntry.php

@@ -561,6 +561,18 @@ class BxBaseModGeneralFormEntry extends BxTemplFormView
 
         return $mixedResult;
     }
+    
+    function getHtmlEditorQueryParams($aInput)
+    {
+        $aQueryParams = parent::getHtmlEditorQueryParams($aInput);
+        if (isset($this->MODULE)){
+            $aQueryParams['m'] = $this->MODULE;
+        }
+        if (isset($this->_iContentId) && $this->_iContentId){
+            $aQueryParams['cid'] = $this->_iContentId;
+        }
+        return $aQueryParams;
+    }
 
     protected function _associalFileWithContent($oStorage, $iFileId, $iProfileId, $iContentId, $sPictureField = '')
     {

+ 1 - 10
template/scripts/BxBaseFormView.php

@@ -1350,16 +1350,7 @@ BLAH;
     
     function getHtmlEditorQueryParams($aInput)
     {
-        $aQueryParams = ['i' => $aInput['name'], 'f' => $this->aFormAttrs['id']];
-        if (isset($this->MODULE)){
-            $aQueryParams['m'] = $this->MODULE;
-        }
-
-        if (isset($this->_iContentId) && $this->_iContentId){
-            $aQueryParams['cid'] = $this->_iContentId;
-        }
-        
-        return $aQueryParams;
+        return ['i' => $aInput['name'], 'f' => $this->aFormAttrs['id']];
     }
 
     /**