You are here

function _outline_designer_ajax in Outline Designer 7.2

Same name and namespace in other branches
  1. 5 outline_designer.module \_outline_designer_ajax()
  2. 6.2 outline_designer.module \_outline_designer_ajax()
  3. 6 outline_designer.module \_outline_designer_ajax()
  4. 7 outline_designer.module \_outline_designer_ajax()

Implementation of the ajax menu hook

@args $token = user token to block CSF attack $type = type of outline action $action = action that's being performed $var1 = typically nid being acted on $var2 = additional data like title, ect. $var3 = even more data like type

2 string references to '_outline_designer_ajax'
outline_child_pages_menu in modules/outline_child_pages/outline_child_pages.module
Implements hook_menu().
outline_designer_menu in ./outline_designer.module
Implements hook_menu().

File

./outline_designer.module, line 220
API for implementation of the Outline Designer usability improvements.

Code

function _outline_designer_ajax($token, $type, $action, $var1, $var2, $var3) {
  global $user;
  $token = check_plain($token);
  $type = check_plain($type);
  $action = check_plain($action);
  $var1 = check_plain($var1);
  $var2 = check_plain($var2);
  $var3 = check_plain($var3);
  if (drupal_valid_token($token)) {
    $ops = _outline_designer_get_operations($type, TRUE);
    foreach ($ops as $key => $op) {
      if ($action == $key && isset($op['callback'])) {
        print call_user_func_array($op['callback'], array(
          $var1,
          $var2,
          $var3,
        ));
      }
    }
  }
  exit;
}