'drupalforfirebug_get_exec_php_callback', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $items; } /** * Implementation of hook_nodeapi() */ function drupalforfirebug_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { global $dfp_runtime; if (!user_access('Access Firebug Debug')) { return; } $nid = (isset($node->nid)) ? $node->nid : '*'. t('NEW') . '*'; $data = drupalforfirebug_array_compare((array) $dfp_runtime['drupalforfirebug_nodes']['original'][$node->type][$nid], (array) $node); $output = drupalforfirebug_field_object('node', $nid, $op, $data); drupalforfirebug_log($output, 'hook_nodeapi'); } /** * Implementation of hook_views_pre_view(); */ function drupalforfirebug_views_pre_view(&$view, &$display_id) { global $dfp_runtime; if (!user_access('Access Firebug Debug')) { return; } $data = drupalforfirebug_array_compare((array) $dfp_runtime['drupalforfirebug_views']['original'][$view->name], (array) $view); $output = drupalforfirebug_field_object('view', $view->name, NULL, $data); drupalforfirebug_log($output, 'hook_views'); } /** * Implementation of hook_form_alter() */ function drupalforfirebug_form_alter(&$form, $form_state, $form_id) { global $dfp_runtime; if (!user_access('Access Firebug Debug')) { return; } if ($form_id != 'drupalforfirebug_execute_form') { $form_modified = (array) $form; $data = drupalforfirebug_array_compare($dfp_runtime['drupalforfirebug_forms']['original'][$form_id], $form_modified); $output = drupalforfirebug_field_object('form', $form_id, NULL, $data); drupalforfirebug_log($output, 'hook_form_alter'); } } /** * Implementation of hook_user() */ function drupalforfirebug_user($op, &$edit, &$account, $category = NULL) { global $dfp_runtime; if (!user_access('Access Firebug Debug')) { return; } if (isset($account->uid)) { $uid = $account->uid; $name = $account->name; } else { $uid = '*' . t('NEW') . '*'; $name = '*' . t('NEW') . '*'; } if (is_object($account)) { $account_clone = drupal_clone($account); $account_clone->pass = '**' . t('Not shown for security reasons') . '**'; $data = drupalforfirebug_array_compare((array) $account_clone, (array) $account_clone); $output = drupalforfirebug_field_object('user', $uid, $op, $data); drupalforfirebug_log($output, 'hook_user'); } } /** * API Function to Record a Message to the Drupal Firebug Log */ function drupalforfirebug_log($message, $type = 'general') { global $dfp_runtime; $dfp_runtime['firebug_messages'][$type][] = $message; } /** * Command Function to Record a Data Element to the Drupal Firebug Log */ function firep($element, $title = NULL) { if ($title) { drupalforfirebug_log(''.$title.':'); } drupalforfirebug_log('
'. print_r($element, true) . '', 'general'); } /** * Output Function to Return the Results of the Log */ function drupalforfirebug_get($panetype) { global $dfp_runtime; $output = ''; if (isset($dfp_runtime['firebug_messages'][$panetype])) { foreach($dfp_runtime['firebug_messages'][$panetype] as $message) { $output .= '
<?php ?>
tags.')
);
$form['token'] = array(
'#type' => 'hidden',
'#value' => drupal_get_token(),
);
$form['op'] = array('#type' => 'submit', '#value' => t('Execute'));
$form['#redirect'] = FALSE;
$form['#action'] = url('admin/firebug/exec', array('absolute' => TRUE));
$form['#skip_duplicate_check'] = TRUE;
return $form;
}
function drupalforfirebug_get_php_exec_area() {
#$output = '';
$output = '';
return $output;
}
function drupalforfirebug_get_php_exec($code = NULL, $token = NULL) {
$output = '';
$output .= '