summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/coder_6x.inc12
-rw-r--r--tests/coder_6x.inc3
2 files changed, 15 insertions, 0 deletions
diff --git a/includes/coder_6x.inc b/includes/coder_6x.inc
index 695ccf7..3cec47e 100644
--- a/includes/coder_6x.inc
+++ b/includes/coder_6x.inc
@@ -130,6 +130,11 @@ function coder_6x_reviews() {
),
array(
'#type' => 'regex',
+ '#value' => '_(prerender)\s*\(\s*\$form_id',
+ '#warning_callback' => '_coder_6x_form_prerender_warning',
+ ),
+ array(
+ '#type' => 'regex',
'#value' => '\$form\[[\'"]#submit[\'"]\]\[[\'"]',
'#source' => 'allphp',
'#warning' => '$form[\'#submit\'] and $form[\'#validate\'] no longer support custom parameters',
@@ -641,6 +646,13 @@ function _coder_6x_form_validate_and_submit_warning() {
);
}
+function _coder_6x_form_prerender_warning() {
+ return array(
+ '#warning' => t('The parameters for form prerender functions have changed to $form.'),
+ '#link' => 'http://drupal.org/node/144132#pre-render',
+ );
+}
+
function _coder_6x_form_set_value_warning() {
return array(
'#warning' => t('!form_set_value() parameters have changed',
diff --git a/tests/coder_6x.inc b/tests/coder_6x.inc
index 64978ff..94bfb4f 100644
--- a/tests/coder_6x.inc
+++ b/tests/coder_6x.inc
@@ -162,6 +162,9 @@ function coder_node_get_name() {
function myform_validate($form_id, $form) { // This will fail.
}
+function myform_prerender($form_id, $form) { // This will fail.
+}
+
function myform_submit($form_id, $form) { // This will fail.
$form['#submit']['newsubmit'] = array();
$form['#submit'][] = "newsubmit";