ace_editor.devel.inc in Ace Code Editor 7
Ace Editor module: Devel PHP console support.
File
ace_editor.devel.incView source
<?php
/**
* @file
* Ace Editor module: Devel PHP console support.
*/
/**
* Devel console submission handler.
*/
function ace_editor_execute_form_submit($form, &$form_state) {
// Remove php tags before submission to Devel module.
if (strpos($form_state['values']['code'], '<?php') !== FALSE) {
$value = $form_state['values']['code'];
$value = preg_replace('/<\\?php/', '', $value);
$form_state['values']['code'] = $value;
}
if (strpos($form_state['values']['code'], '<?') !== FALSE) {
$value = $form_state['values']['code'];
$value = preg_replace('/<\\?/', '', $value);
$form_state['values']['code'] = $value;
}
print eval($form_state['values']['code']);
// Restore the textarea content.
$_SESSION['devel_execute_code'] = $form_state['values']['code'];
}
Functions
Name | Description |
---|---|
ace_editor_execute_form_submit | Devel console submission handler. |