You are here

function token_page_output_tree in Token 7

Page callback to output a token tree as an empty page.

1 string reference to 'token_page_output_tree'
token_menu in ./token.module
Implements hook_menu().

File

./token.pages.inc, line 51
User page callbacks for the token module.

Code

function token_page_output_tree() {
  $options = isset($_GET['options']) ? drupal_json_decode($_GET['options']) : array();

  // Check the token against the serialized options to prevent random access to
  // the token browser page.
  if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], 'token-tree:' . serialize($options))) {
    return MENU_ACCESS_DENIED;
  }

  // Force the dialog option to be false so we're not creating a dialog within
  // a dialog.
  $options['dialog'] = FALSE;
  $output = theme('token_tree', $options);
  print '<html><head>' . drupal_get_css() . drupal_get_js() . '</head>';
  print '<body class="token-tree">' . $output . '</body></html>';
  drupal_exit();
}