Drupal CVS reviews

Posts made in this category are based on real reviews made of modules offered as Drupal Contrib modules during the CVS application review process.

Drupal Contrib CVS applications

The Drupal< site runs a repository and project issue system to allow the distribution are various third party contributed modules.

To gain access< potential new users are required to submit applications that include links to examples of their intended contributions. If the applicant fails to provide a link then it can not be progressed and usually (9 times out of 10) results in an automatic decline.



Give us something to review!

A recent number of CVS applications have been supported with a link to a module that provides additional functionality to existing modules.

Although this in itself isn't a problem, a lot of these module are very small (usually less than 250 lines of code). In this case, these modules should realistically seek to add this new feature to the existing module it's extending by way of a feature patch.



Module/theme namespacing issues

Here's a lovely function defined in a module offered for contribution...

  1. function myTruncate($string, $limit, $break=".", $pad="...") {
  2.   // return with no change if string is shorter than $limit  
  3.   if(strlen<($string) <= $limit) return $string;
  4.   // is $break present between $limit and the end of the string?  
  5.   if(false !== ($breakpoint = strpos<($string, $break, $limit))) {
  6.     if($breakpoint < strlen<($string) - 1) {
  7.       $string = substr<($string, 0, $breakpoint) . $pad;
  8.     }
  9.   }
  10.   return $string;
  11. }



Syndicate content