Просмотр исходного кода

Ticket #4596 - Hide folders from files search

Alexander 2 лет назад
Родитель
Сommit
4cc85629ca
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      modules/boonex/files/classes/BxFilesModule.php

+ 14 - 0
modules/boonex/files/classes/BxFilesModule.php

@@ -615,6 +615,20 @@ class BxFilesModule extends BxBaseModTextModule
 
 
         return parent::serviceBrowseContext($iProfileId, $aParams);
         return parent::serviceBrowseContext($iProfileId, $aParams);
     }
     }
+
+    public function serviceGetSearchResultExtended($aParams, $iStart = 0, $iPerPage = 0, $bFilterMode = false)
+    {
+        if((empty($aParams) || !is_array($aParams)) && !$bFilterMode)
+            return array();
+
+        $aParams['type'] = [
+            'type' => 'text',
+            'value' => 'file',
+            'operator' => '=',
+        ];
+
+        return $this->_oDb->getEntriesBy(array('type' => 'search_ids', 'search_params' => $aParams, 'start' => $iStart, 'per_page' => $iPerPage));
+    }
 }
 }
 
 
 /** @} */
 /** @} */