[drupal-devel] release info, introspection and debug

Gabor Hojtsy gabor at hojtsy.hu
Wed Jan 26 14:57:43 UTC 2005

>>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 $';
> And this will be done by CVS I hope? Similar to what CVS does now:
>  // $Id: textile.module,v 2004/09/23 15:45:55 jhriggs Exp $
> ?

Yes, the intention is that CVS will replace it. We could also have some 
wrapper function used right there, so that real version numbers (erm, 
actually strings) are returned:

   return drupal_parse_revision('$Revision: 1.6 $');

And so

function drupal_parse_revision($string) {
   $parts = explode(" ", $string);
   return $parts[1];


More information about the drupal-devel mailing list