I have enabled my products visibility for both list page and search. But when I use
Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($products);
the products does not displayed.
What does addVisibleInSiteFilterToCollection do?
Thanks
EDIT
I have installed a module. I think that module checks the products visibility with function addVisibleInSiteFilterToCollection. But no products are displayed. I have checked my all products are visible in both catalog and search. I am curious what exactly this function does? Because when I comment this function I can see my products.