/projects or /users/ pages rendered through content-negociation
Hook Name : content_negociated_project_home
- Parameters : $params['accept'] provides the content-type to be rendered, $params['groupname'] the project name
+ Parameters : $params['accept'] provides the content-type to be rendered, $params['groupname'] the project name, $params['group_id'] the project ID
Description: returns in $params['content'] an alternate content for /projects/ page and
in $params['content_type'] the actual content-type to return
* @param unknown_type $params
*/
function content_negociated_project_home (&$params) {
- global $group_id;
-
$projectname = $params['groupname'];
$accept = $params['accept'];
+ $group_id = $params['group_id'];
if($accept == 'application/rdf+xml') {
$pm = ProjectManager::instance();
'http://purl.org/dc/terms/' => 'dcterms'
);
$hook_params['xml'] = array();
+ $hook_params['group'] = $group_id;
plugin_hook_by_reference('project_rdf_metadata', $hook_params);
}
function CallHook ($hookname, &$params) {
- global $use_oslcplugin,$G_SESSION,$HTML, $group_id;
+ global $use_oslcplugin,$G_SESSION,$HTML;
if ($hookname == "usermenu") {
$text = $this->text; // this is what shows in the tab
if ($G_SESSION->usesPlugin("oslc")) {
}
elseif($hookname == "project_rdf_metadata") {
+ $group_id=$params['group'];
$serviceprovider = util_make_url ("/plugins/oslc/cm/oslc-cm-services/".$group_id);
if (! $params['prefixes']['http://open-services.net/ns/core#']) {
$hook_params['accept'] = $content_type;
$hook_params['return'] = '';
$hook_params['content_type'] = '';
+ $hook_params['group_id'] = $project->getID();
plugin_hook_by_reference('content_negociated_project_home', $hook_params);
if($hook_params['content_type'] != ''){
header('Content-type: '. $hook_params['content_type']);