summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/coder_6x.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/includes/coder_6x.inc b/includes/coder_6x.inc
index 0767191..3b76471 100644
--- a/includes/coder_6x.inc
+++ b/includes/coder_6x.inc
@@ -386,6 +386,13 @@ function coder_6x_reviews() {
'#warning' => 'When labelling buttons, make it clear what the button does, "Submit" is too generic.',
'#severity' => 'minor',
),
+ array(
+ '#type' => 'regex',
+ '#function' => '_nodeapi$',
+ '#source' => 'all',
+ '#value' => '(case\s+[\'"]submit[\'"]\s*:)|(==\s*[\'"]submit[\'"])',
+ '#warning_callback' => '_coder_6x_nodeapi_submit_warning',
+ ),
);
$review = array(
'#title' => t('Converting 5.x modules to 6.x'),
@@ -1036,3 +1043,14 @@ function _coder_6x_book_next_warning() {
'#link' => 'http://drupal.org/node/114774#book_module',
);
}
+
+function _coder_6x_nodeapi_submit_warning() {
+ return array(
+ '#warning' => t('!hook_nodeapi(\'submit\') has been replaced by op=\'presave\'',
+ array(
+ '!hook_nodeapi' => theme('drupalapi', 'hook_nodeapi', '6')
+ )
+ ),
+ '#link' => 'http://drupal.org/node/114774#nodeapi_presave',
+ );
+}