Index: coder_tough_love.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/coder_tough_love/Attic/coder_tough_love.module,v retrieving revision 1.1.2.6 diff -u -r1.1.2.6 coder_tough_love.module --- coder_tough_love.module 16 Jul 2009 12:08:55 -0000 1.1.2.6 +++ coder_tough_love.module 7 Dec 2009 20:35:03 -0000 @@ -159,6 +159,10 @@ * Administrative menu items should have a #description. */ function _coder_tough_love_admin_menu_descriptions(&$coder_args, $review, $rule, $lines, &$results) { + $potentially_inside_a_hook_menu = FALSE; + $saw_a_description = FALSE; + $potentially_found_an_admin_path = FALSE; + foreach ((array)$lines as $line_number => $line) { $line = implode(' ', $line); // concat'd parts. @@ -175,7 +179,7 @@ // now, keep looking for a 'description' element for this admin path. if ($potentially_inside_a_hook_menu && $potentially_found_an_admin_path) { if (preg_match('/[\'"]description[\'"]\s*=>/', $line)) { - $saw_a_description = 1; + $saw_a_description = TRUE; } } @@ -186,12 +190,12 @@ } // reset for the next iteration, bub. - $saw_a_description = $potentially_found_an_admin_path = 0; + $saw_a_description = $potentially_found_an_admin_path = FALSE; } // are we inside a function that ends in _menu? if (preg_match('/^(function .*?[^_menu]\(\)|\/\*\*)/', $line)) { - $potentially_inside_a_hook_menu = 0; + $potentially_inside_a_hook_menu = FALSE; } } }