/usr/share/gforge/plugins/projectlabels/common/ProjectLabelsPlugin.class.php is in fusionforge-plugin-projectlabels 5.1.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | <?php
class ProjectLabelsPlugin extends Plugin {
function ProjectLabelsPlugin () {
$this->Plugin() ;
$this->name = "projectlabels" ;
$this->text = "Project labels";
$this->hooks[] = "project_before_widgets" ;
$this->hooks[] = "site_admin_option_hook" ;
}
function CallHook ($hookname, &$params) {
global $HTML;
if ($hookname == "site_admin_option_hook") {
echo '<li>' . util_make_link ('/plugins/projectlabels/index.php',
_('Project labels')) . '</li>';
} elseif ($hookname == "project_before_widgets") {
$group_id=$params['group_id'];
$project = &group_get_object($group_id);
if (!$project || !is_object($project))
return;
if ($project->isError())
return;
if (!$project->isProject())
return;
$res_tabs = db_query_params ('SELECT plugin_projectlabels_labels.label_text FROM plugin_projectlabels_labels, plugin_projectlabels_group_labels
WHERE plugin_projectlabels_group_labels.group_id=$1 AND plugin_projectlabels_group_labels.label_id = plugin_projectlabels_labels.label_id',
array ($group_id));
while ($row_tab = db_fetch_array($res_tabs)) {
print ($row_tab['label_text']);
}
}
}
}
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
?>
|