[drupal-devel] release info, introspection and debug

Chris Johnson chris at tinpixel.com
Wed Jan 26 16:44:17 UTC 2005


Gabor Hojtsy wrote:

> Wuh, using these kind of variables are evil. I suggested back then to 
> use the _help hook with the '#version' (or something alike) $section to 
> grab the version, so this should work:
> 
> function somemodule_help($section) {
>   switch($section) {
>     case '#version':
>       return '$Revision: 1.6 $';
>   }
> }
> 
> Similarly for $Name if you need it.


This solution works fine for modules.  I did not mean to say we had to have 
variables exactly like that, but rather just wanted some programmatic way to 
retrieve the CVS expanded keyword.

Then I can write a module or an XML RPC that will return a summary of module 
versions installed in a particular site, for example.

I still would like to have a way to find out which version of common.inc or 
cron.php is in use, though.  Any suggestions?

If we agree that such a facility in Drupal is desirable, and agree on a method 
for providing it, I'm willing to do all the work of modifying all existing 
modules and/or files to implement it.

If this is viewed as too much software bloat, then I would request that a 
comment line after the existing // $Id$ line be added to include // $Name$ and 
I will write code to walk the directory tree and examine the files.  That way 
the resource cost is paid only at execution time when requesting that data.

--
Chris Johnson




More information about the drupal-devel mailing list