AntonLV 8 سال پیش
والد
کامیت
96460fedd9

+ 12 - 6
inc/classes/BxDolCmts.php

@@ -1192,6 +1192,10 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
             return array();
 
         $aSrchNamesExcept = array();
+        $aSrchCaptionsSystem = array(
+            'cmt_author_id' => '_sys_form_comment_input_caption_system_cmt_author_id',
+            'cmt_text' => '_sys_form_comment_input_caption_system_cmt_text'
+        );
         $aSrchCaptions = array(
             'cmt_author_id' => '_sys_form_comment_input_caption_cmt_author_id',
             'cmt_text' => '_sys_form_comment_input_caption_cmt_text'
@@ -1199,12 +1203,13 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
 
         $aResult = array(
             'cmt_author_id' => array(
-            	'type' => 'text_auto', 
-            	'caption' => $aSrchCaptions['cmt_author_id'],
-        		'info' => '',
-        		'value' => '',
-            	'values' => '',
-        		'pass' => ''
+                'type' => 'text_auto', 
+                'caption_system' => $aSrchCaptionsSystem['cmt_author_id'],
+                'caption' => $aSrchCaptions['cmt_author_id'],
+                'info' => '',
+                'value' => '',
+                'values' => '',
+                'pass' => ''
             )
         );
 
@@ -1212,6 +1217,7 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
             if (in_array($aInput['type'], BxDolSearchExtended::$SEARCHABLE_TYPES) && !in_array($aInput['name'], $aSrchNamesExcept))
                 $aResult[$aInput['name']] = array(
                 	'type' => $aInput['type'], 
+                        'caption_system' => !empty($aInput['caption_system_src']) ? $aInput['caption_system_src'] : '',
                 	'caption' => !empty($aInput['caption_src']) ? $aInput['caption_src'] : (!empty($aSrchCaptions[$aInput['name']]) ? $aSrchCaptions[$aInput['name']] : ''),
                 	'info' => !empty($aInput['info_src']) ? $aInput['info_src'] : '',
                 	'value' => !empty($aInput['value']) ? $aInput['value'] : '',

+ 1 - 0
inc/classes/BxDolFormQuery.php

@@ -101,6 +101,7 @@ class BxDolFormQuery extends BxDolDb
             $aInput = array (
                 'type' => $a['type'],
                 'name' => $a['name'],
+                'caption_system_src' => $a['caption_system'],
             	'caption_src' => $a['caption'],
                 'caption' => _t($a['caption']),
             	'info_src' => $a['info'] ? $a['info'] : '',

+ 3 - 0
inc/classes/BxDolSearchExtendedQuery.php

@@ -71,12 +71,15 @@ class BxDolSearchExtendedQuery extends BxDolDb
 
                 if($bResult) {
                     $aCaptionValues = !empty($aField['caption']) ? $oLanguage->getLanguageString($aField['caption']) : array();
+                    $aCaptionSystemValues = !empty($aField['caption_system']) ? $oLanguage->getLanguageString($aField['caption_system']) : array();
                     $aInfoValues = !empty($aField['info']) ? $oLanguage->getLanguageString($aField['info']) : array();
 
                     foreach($aLangIds as $iLangId) {
                         $sCaptionValue = '';
                         if(isset($aCaptionValues[$iLangId]) && !empty($aCaptionValues[$iLangId]['string']))
                             $sCaptionValue = $aCaptionValues[$iLangId]['string'];
+                        if(empty($sCaptionValue) && isset($aCaptionSystemValues[$iLangId]) && !empty($aCaptionSystemValues[$iLangId]['string']))
+                            $sCaptionValue = $aCaptionSystemValues[$iLangId]['string'];
                         $oLanguage->addLanguageString($sCaptionKey, $sCaptionValue, $iLangId, 0, false);
 
                         $sInfoValue = '';

+ 3 - 2
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -209,9 +209,10 @@ class BxBaseModGeneralModule extends BxDolModule
             if(in_array($aInput['type'], BxDolSearchExtended::$SEARCHABLE_TYPES) && !in_array($aInput['name'], $this->_aSearchableNamesExcept))
                 $aResult[$aInput['name']] = array(
                     'type' => $aInput['type'], 
+                    'caption_system' => $aInput['caption_system_src'],
                     'caption' => $aInput['caption_src'],
-                	'info' => $aInput['info_src'],
-                	'value' => !empty($aInput['value']) ? $aInput['value'] : '',
+                    'info' => $aInput['info_src'],
+                    'value' => !empty($aInput['value']) ? $aInput['value'] : '',
                     'values' => !empty($aInput['values_src']) ? $aInput['values_src'] : '',
                     'pass' => !empty($aInput['db']['pass']) ? $aInput['db']['pass'] : '',
                 );

+ 1 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -1918,6 +1918,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_form_comment_input_caption_cmt_author_id"><![CDATA[Author]]></string>
 	<string name="_sys_form_comment_input_caption_cmt_text"><![CDATA[Text]]></string>
 	<string name="_sys_form_comment_input_caption_system_action"><![CDATA[Action]]></string>
+        <string name="_sys_form_comment_input_caption_system_cmt_author_id"><![CDATA[Author]]></string>
 	<string name="_sys_form_comment_input_caption_system_cmt_id"><![CDATA[Comment ID]]></string>
 	<string name="_sys_form_comment_input_caption_system_cmt_image"><![CDATA[Image]]></string>
 	<string name="_sys_form_comment_input_caption_system_cmt_parent_id"><![CDATA[Parent ID]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -1918,6 +1918,7 @@
 	<string name="_sys_form_comment_input_caption_cmt_author_id"><![CDATA[Автор]]></string>
 	<string name="_sys_form_comment_input_caption_cmt_text"><![CDATA[Текст]]></string>
 	<string name="_sys_form_comment_input_caption_system_action"><![CDATA[Действие]]></string>
+        <string name="_sys_form_comment_input_caption_system_cmt_author_id"><![CDATA[Автор]]></string>
 	<string name="_sys_form_comment_input_caption_system_cmt_id"><![CDATA[Комментировать ID]]></string>
 	<string name="_sys_form_comment_input_caption_system_cmt_image"><![CDATA[Изображение]]></string>
 	<string name="_sys_form_comment_input_caption_system_cmt_parent_id"><![CDATA[Родительский ID]]></string>

+ 1 - 1
studio/template/scripts/BxBaseStudioFormsField.php

@@ -297,7 +297,7 @@ class BxBaseStudioFormsField extends BxDolStudioFormsField
                     
                     case 'checker_params_required':
                         $aParams = unserialize($this->aField['checker_params']);
-                        $aForm['inputs'][$sKey]['checked'] = (int)$aParams['required'];
+                        $aForm['inputs'][$sKey]['checked'] = isset($aParams['required']) ? (int)$aParams['required'] : 0;
                         break;
 
                     case 'checker_params_preg':