function akamai_page_cache_control_form in Akamai 7
Same name and namespace in other branches
- 6.2 akamai.module \akamai_page_cache_control_form()
- 6 akamai.module \akamai_page_cache_control_form()
- 7.3 akamai.module \akamai_page_cache_control_form()
- 7.2 akamai.module \akamai_page_cache_control_form()
Form for purging the current URL from the Akamai cache.
1 string reference to 'akamai_page_cache_control_form'
- akamai_block_view in ./
akamai.module - Implementation of hook_block_view().
File
- ./
akamai.module, line 123 - akamai.module Integration with the Akamai CDN Cache Control Web Service.
Code
function akamai_page_cache_control_form() {
$form = array();
$nid = arg(1);
if (arg(0) == 'node' && is_numeric($nid) && arg(2) == NULL) {
$path = arg(0) . '/' . $nid;
$form['#node'] = node_load($nid);
}
else {
$path = check_plain($_GET['q']);
$form['#node'] = NULL;
}
$path_label = $path;
if ($path == variable_get('site_frontpage', 'node')) {
$path_label = t("[frontpage]");
}
$form['path'] = array(
'#type' => 'hidden',
'#value' => $path,
);
$form['message'] = array(
'#type' => 'item',
'#title' => t('Refresh URL'),
'#markup' => $path_label,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Refresh Akamai Cache'),
);
return $form;
}