Procházet zdrojové kódy

#4558 - Build-in API support (search & cmts)

romanlesnikov před 1 rokem
rodič
revize
9804139abc

+ 1 - 1
modules/boonex/timeline/classes/BxTimelineMenuItemActions.php

@@ -475,7 +475,7 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
         $aCheckFuncParams = array($this->_aEvent);
         switch ($a['name']) {
             case 'item-comment':
-                if($this->_sView == BX_TIMELINE_VIEW_ITEM)
+                if($this->_sView == BX_TIMELINE_VIEW_ITEM && !$this->_bIsApi)
                     return false;
 
                 $sCheckFuncName = $this->_aItem2CheckFunc[$a['name']];

+ 2 - 2
template/scripts/BxBaseSearchExtended.php

@@ -174,8 +174,8 @@ class BxBaseSearchExtended extends BxDolSearchExtended
     	if($aResults === false)
     	    $aResults = $oContentInfo->getSearchResultExtended($aParamsSearch, $iStart, $iPerPage + 1, $this->_bFilterMode);
 
-    	if(empty($aResults) || !is_array($aResults))
-    	    return $this->_bIsApi ? [bx_api_get_msg(_t('Nothing found'), ['ext' => ['msg_type' => 'result']])] : _t('Nothing found');
+    	if((empty($aResults) || !is_array($aResults)) && !$this->_bIsApi)
+            return _t('Nothing found');
 
         if(!empty($aParams['cond']) && is_array($aParams['cond']))
             $aParams['cond'] = self::encodeConditions($aParams['cond']);