| 1 |
<?php |
<?php |
| 2 |
// $Id: coder_security.inc,v 1.11.4.1.4.12 2008/07/20 14:36:23 snpower Exp $ |
// $Id: coder_tough_love.module,v 1.1.2.1 2008/11/19 16:26:31 morbus Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 132 |
), |
), |
| 133 |
array( |
array( |
| 134 |
'#type' => 'regex', |
'#type' => 'regex', |
| 135 |
'#value' => '[^format_date]date\(', |
'#value' => '[^\w+|_]date\(', |
| 136 |
'#warning' => t('Use Drupal\'s format_date(), not PHP\'s default date().'), |
'#warning' => t('Use Drupal\'s format_date(), not PHP\'s default date().'), |
| 137 |
), |
), |
| 138 |
array( |
array( |
| 184 |
|
|
| 185 |
// if we've found any sort of ");", we assume the menu's array is done. |
// if we've found any sort of ");", we assume the menu's array is done. |
| 186 |
if ($potentially_inside_a_hook_menu && $potentially_found_an_admin_path && preg_match("/\);/", $line)) { |
if ($potentially_inside_a_hook_menu && $potentially_found_an_admin_path && preg_match("/\);/", $line)) { |
| 187 |
if (!$saw_a_description) { |
if (!$saw_a_description) { // if there's no description for an admin path, yell. loudly. HORSE HEAD! |
| 188 |
_coder_error($results, $rule, _coder_severity_name($coder_args, $review, $rule), $potentially_found_an_admin_path); |
_coder_error($results, $rule, _coder_severity_name($coder_args, $review, $rule), $potentially_found_an_admin_path); |
| 189 |
} |
} |
| 190 |
|
|
| 440 |
*/ |
*/ |
| 441 |
function _coder_tough_love_settings_pspell_personal_default() { |
function _coder_tough_love_settings_pspell_personal_default() { |
| 442 |
return |
return |
| 443 |
'api, asc, baseURL, bio, cck, checkbox, checkboxes, CiviCRM, colspan, desc, ' . |
'api, asc, autocomplete, baseURL, bio, cck, checkbox, checkboxes, CiviCRM, colspan, '. |
| 444 |
'devel, Doxygen, Drupal, enctype, Facebook, fieldgroup, fieldset, geocode, ' . |
'desc, devel, Doxygen, Drupal, enctype, Facebook, fieldgroup, fieldset, geocode, ' . |
| 445 |
'geocoding, Google, href, HTML, imagefield, irc, javascript, json, metadata, Morbus, ' . |
'geocoding, Google, href, HTML, imagefield, irc, javascript, json, metadata, Morbus, ' . |
| 446 |
'mysql, mysqli, ncount, nid, null, pathauto, pgsql, pid, PO, presave, regex, signup, ' . |
'mysql, mysqli, ncount, nid, null, pathauto, pgsql, pid, PO, presave, regex, signup, ' . |
| 447 |
'simplenews, tablename, textarea, textfield, tid, timestamp, trellon, uid, Unix, ' . |
'simplenews, tablename, textarea, textfield, tid, timestamp, trellon, uid, Unix, ' . |
| 448 |
'URL, URLs, varchar, vid, wiki, Wikipedia, XHTML'; |
'URL, URLs, username, varchar, vid, wiki, Wikipedia, XHTML'; |
| 449 |
} |
} |
| 450 |
|
|