You are here

function example_absolute_includes in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/tests/old/samples/example.module \example_absolute_includes()

File

coder_upgrade/tests/old/samples/example.module, line 37

Code

function example_absolute_includes() {

  // Change require, require_once, include, and include_once.
  // require './' . $path
  // include() -- Change the next line but leave this alone
  // include -- Change the next line but leave this alone
  define('EVENT_PATH', drupal_get_path('module', 'event'));
  include EVENT_PATH . '/event.theme';
  require EVENT_PATH . '/ical.inc';
  include EVENT_PATH . '/event.theme';
  require EVENT_PATH . '/ical.inc';
  include './' . $path;
  require './' . $path;
  include $path;
  require $path;
  if (variable_get('event_nodeapi_' . $form['type']['#value'], 'never') != 'never') {
    include_once EVENT_PATH . '/event_timezones.inc';
    require_once EVENT_PATH . '/event_timezones.inc';
  }

  // A different format to the include.
  include_once './' . drupal_get_path('module', 'og_panels') . '/includes/groupcontext.inc';
  include_once drupal_get_path('module', 'og_panels') . '/includes/groupcontext.inc';
  echo './' . drupal_get_path('module', 'og_panels') . '/includes/groupcontext.inc';

  // Ensure we are not serving a cached page.
  if (function_exists('drupal_set_content')) {
    if (module_exists('content')) {
      include_once drupal_get_path('module', 'fivestar') . '/fivestar_field.inc';
    }
  }
  if (module_exists('comment')) {
    include_once drupal_get_path('module', 'fivestar') . '/fivestar_comment.inc';
  }
  include_once drupal_get_path('module', 'fivestar') . '/fivestar_color.inc';
  require_once drupal_get_path('module', 'transactions') . '/transactions.inc';
}