devel_themer_exit

Versions
mediamosa-21
devel_themer_exit()

Code

sites/all/modules/devel/devel_themer.module, line 482

<?php
function devel_themer_exit() {
  if (!empty($GLOBALS['devel_theme_calls']) && $_SERVER['REQUEST_METHOD'] != 'POST') {
    // A random string that is sent to the browser. It enables the popup to retrieve params/variables from this request.
    $request_id = uniqid(rand());
    // Write the variables information to the a file. It will be retrieved on demand via AJAX.
    // We used to write this to DB but was getting 'Warning: Got a packet bigger than 'max_allowed_packet' bytes'
    // Writing to temp dir means we don't worry about folder existence/perms and cleanup is free.
    file_put_contents(file_directory_temp(). "/devel_themer_$request_id", serialize($GLOBALS['devel_themer_server']));

    $GLOBALS['devel_theme_calls']['request_id'] = $request_id;
    $GLOBALS['devel_theme_calls']['devel_themer_uri'] = url("devel_themer/variables/$request_id");
    print '<script type="text/javascript">jQuery.extend(Drupal.settings, '.  drupal_to_js($GLOBALS['devel_theme_calls']) .");</script>\n";
  }
}
?>