function hacked_reports_exports_export_form in Hacked! 6
1 string reference to 'hacked_reports_exports_export_form'
- hacked_menu in ./
hacked.module - Implementation of hook_menu().
File
- ./
hacked.export.inc, line 61
Code
function hacked_reports_exports_export_form($form_state, $cid) {
$form = array();
// Get the data from the cache:
$cache = cache_get($cid, HACKED_CACHE_TABLE);
if (!$cache->data) {
return drupal_not_found();
}
$export = var_export($cache->data, TRUE);
// Let's make it useful, valid PHP:
$export = '$hashes = ' . $export;
$export .= ';';
$form['export'] = array(
'#type' => 'textarea',
'#default_value' => $export,
'#rows' => count(explode("\n", $export)),
);
return $form;
}