You are here

function coder_50_reviews in Coder 5

Same name and namespace in other branches
  1. 5.2 includes/coder_50.inc \coder_50_reviews()
  2. 6.2 includes/coder_50.inc \coder_50_reviews()
  3. 6 includes/coder_50.inc \coder_50_reviews()

@file This include file implements coder functionality for 4.7 -> 5.0 upgrades

File

includes/coder_50.inc, line 7
This include file implements coder functionality for 4.7 -> 5.0 upgrades

Code

function coder_50_reviews() {
  $rules = array(
    array(
      '#type' => 'regex',
      '#value' => '[\\s\\(]user_mail\\s*\\(',
      '#warning_callback' => '_coder_50_user_mail_warning',
    ),
    array(
      '#type' => 'regex',
      '#value' => '[\\s\\(]user_mail_wrapper\\s*\\(',
      '#warning_callback' => '_coder_50_user_mail_wrapper_warning',
    ),
    array(
      '#type' => 'regex',
      '#value' => '[\\s\\(]message_na\\s*\\(',
      '#warning_callback' => '_coder_50_message_na_warning',
    ),
    array(
      '#type' => 'regex',
      '#value' => '[\\s\\(]module_exist\\s*\\(',
      '#warning_callback' => '_coder_50_module_exist_warning',
    ),
    array(
      '#type' => 'regex',
      '#value' => '[\\s\\(]drupal_call_js\\s*\\(',
      '#warning_callback' => '_coder_50_drupal_call_js_warning',
    ),
    array(
      '#type' => 'regex',
      '#value' => '[\\s\\(]system_listing\\s*\\(',
      '#warning_callback' => '_coder_50_system_listing_warning',
    ),
    array(
      '#type' => 'regex',
      '#value' => '[\\s\\(]node_get_name\\s*\\(',
      '#warning_callback' => '_coder_50_node_get_name_warning',
    ),
    array(
      '#type' => 'regex',
      '#source' => 'all',
      '#value' => '\\$_POST\\s*\\[\\s*[\'"]?op[\'"]?\\s*\\]',
      '#warning' => '$_POST[\'op\'] deprecated in favor of $form_values[\'op\']',
      '#severity' => 'normal',
    ),
    array(
      '#type' => 'callback',
      '#value' => '_coder_50_callback',
    ),
    array(
      '#type' => 'regex',
      '#source' => 'all',
      '#value' => '[\\s\\(]theme_add_style\\s*\\(',
      '#warning_callback' => '_coder_50_theme_add_style_warning',
    ),
    array(
      '#type' => 'regex',
      '#source' => 'all',
      '#value' => '[\\s\\(]form_render\\s*\\(',
      '#warning_callback' => '_coder_50_form_render_warning',
    ),
  );
  $review = array(
    '#title' => t('Converting 4.7.x modules to 5.x'),
    '#link' => 'http://drupal.org/node/64279',
    '#rules' => $rules,
    '#severity' => 'critical',
  );
  return array(
    'upgrade50' => $review,
  );
}