I wrote a script that searches for products with no active categories and disables the products. This was in regards to our customer turning off some old categories, but the products still being searchable. We figured it was best to set their status to disabled in bulk.
So in order to do this we call this line:
Mage::getModel('catalog/product_status')->updateProductStatus($prod->getId(), $store_id, Mage_Catalog_Model_Product_Status::STATUS_DISABLED);
So a week later, we need to re-enable a product. I log into the admin panel, and the status is still showing as "enabled". It took me running my script again hard coding the id to get it to show up in the store again:
Mage::getModel('catalog/product_status')->updateProductStatus(370, $store_id, Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
Obvioulsy my intention was that the status in the admin panel would be disabled, and then any user with admin access would be able to turn these products back on. So I'm asking the community, what do the above lines actually do? And how can I do what I intended.