X-Git-Url: https://scm.fusionforge.org/anonscm/gitweb?p=fusionforge%2Ffusionforge.git;a=blobdiff_plain;f=src%2Fwww%2Fsoftwaremap%2Ftrove_list.php;h=4e45d286e3621be7f20244c4fcaa87afce015459;hp=637a67425468d50c3849a9fab27de6c9aa187a2a;hb=9b2bdea3a0d69bdf55e05b3a329e2108c64cd82b;hpb=bde6e4eaae8fbb53e270c9a568914b7687f17204 diff --git a/src/www/softwaremap/trove_list.php b/src/www/softwaremap/trove_list.php index 637a674254..4e45d286e3 100644 --- a/src/www/softwaremap/trove_list.php +++ b/src/www/softwaremap/trove_list.php @@ -30,6 +30,29 @@ if (!forge_get_config('use_trove')) { exit_disabled('home'); } +// Allow alternate content-type rendering by hook +$default_content_type = 'text/html'; + +$script = 'trove_list'; +$content_type = util_negociate_alternate_content_types($script, $default_content_type); + +if($content_type != $default_content_type) { + $hook_params = array(); + $hook_params['accept'] = $content_type; + $hook_params['return'] = ''; + $hook_params['content_type'] = ''; + plugin_hook_by_reference('content_negociated_trove_list', $hook_params); + if($hook_params['content_type'] != ''){ + header('Content-type: '. $hook_params['content_type']); + echo $hook_params['content']; + } + else { + header('HTTP/1.1 406 Not Acceptable',true,406); + } + exit(0); +} + + $HTML->header(array('title'=>_('Software Map'),'pagename'=>'softwaremap')); $HTML->printSoftwareMapLinks();