Closed (fixed)
Project:
Drupal vB
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2011 at 16:20 UTC
Updated:
24 Dec 2011 at 23:40 UTC
Jump to comment: Most recent file
For #691736: Vbulletin 4 Support and other issues, it would be helpful to automatically determine the installed version of vB.
As we're asking users to provide config.php as copy or link in the module's directory and the version is contained in that, we should be able to simply parse it.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupalvb.requirements.2.patch | 2.14 KB | sun |
| #1 | drupalvb.config-version.1.patch | 1.7 KB | edb |
| drupalvb.config-version.0.patch | 1.7 KB | sun |
Comments
Comment #1
edb commentedGood idea!
+ $file = fopen($file, 'r');This should take $config_file as the parameter (patch attached). Other than that, this works great. We need to keep in mind that new versions of vBulletin could break this quite easily so any code using the version number provided by this should not rely on $config['version'] being set.
Comment #2
sunGood catch! Thanks for reviewing and re-rolling!
Committed to 6.x-2.x.
That's less of an issue IMO, since a range of other issues basically makes config.php and the successful version parsing a hard requirement to use the module.
In other words: Without the version, we're not going to be able to make the integration work at all.
Speaking of requirements, let's enforce this.
Attached follow-up patch adds a hook_requirements() implementation to verify that config.php has been provided in the module directory (which disallows the installation otherwise).
Comment #3
sunManually tested #2 and committed to 6.x-2.x.