I was recently working on an older Drupal site that hadn't been updated in a while. It used lots of contributed modules and we were unsure whether these had any custom hacks in them. So, I needed a way to find what version of the module was in use, and then pulling down to relevant version of that module in a format suitable to use in a "diff" tool.
So, I did a couple fancy little things and wanted to share them for others to enjoy:
Finding the Id string
Many Drupal modules have an "Id" string in the top of the file. The CVS system replaces these with some information about the file when they are checked out of CVS. This gives you an automatically updated set of information about the file you are using. So, if we can find files named .module, grab the first 3 lines of those files, search for the string Id, and output the results into a file then we've tackled the question "What version of this module do I have?
•••
Recent comments
9 hours 9 min ago
1 week 6 days ago
2 weeks 1 hour ago
2 weeks 3 hours ago
2 weeks 9 hours ago
2 weeks 1 day ago
2 weeks 1 day ago
3 weeks 4 days ago
4 weeks 17 hours ago
4 weeks 2 days ago