PDA

View Full Version : Detecting if a product is installed and enabled?


endquote
08-25-2005, 02:10 AM
You can see if another product is installed by looking at $vbulletin->products['ProductID'], but is there a way to tell if it's enabled or not? Dumping the $vbulletin object isn't really telling me anything.

Andreas
08-25-2005, 02:23 AM
SELECT * FROM product WHERE productid='foobar' AND active=1

Or, to avoid Queries and to be sure that not just the Product is enabled but also the Plugin(s):
Set a Flag with the Plugin(s) and check that.

Marco van Herwaarden
08-25-2005, 06:44 AM
the value of $vbulletin->products['ProductID'] should be 0 for not active, or 1 for active. Enabling/disabling a product however is not updating the datastore. This is a bug that is solved in RC3: Enable/disable product don't update products datastore (http://www.vbulletin.com/forum/bugs35.php?do=view&bugid=1020)

Biker_GA
08-25-2005, 07:26 AM
**groan** Does that mean we have to reinstall all the products/plugins?

Marco van Herwaarden
08-25-2005, 07:28 AM
That i can not answer, but solving the bug itself will not need a new install of the products.