This file is indexed.

/usr/share/fusionforge/plugins/contribtracker/www/index.php is in fusionforge-plugin-contribtracker 6.0.3+20151023-1ubuntu1.

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
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<?php

/**
 * ContribTracker plugin
 *
 * Copyright 2009, Roland Mas
 * Copyright 2010 (c) Franck Villaume
 * http://fusionforge.org/
 *
 * This file is part of FusionForge.
 *
 * FusionForge is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * FusionForge is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

require_once '../../env.inc.php';
require_once $gfcommon.'include/pre.php';
$plugin = plugin_get_object ('contribtracker');

function display_contribution ($c, $show_groups = false) {
	global $plugin;
	print '<h2>'.$c->getName().'</h2>';
	if ($show_groups) {
		print '<strong>'._('Project')._(':').'</strong> ';
		print util_make_link_g ($c->getGroup()->getUnixName(),
					$c->getGroup()->getId(),
					htmlspecialchars ($c->getGroup()->getPublicName()));
		print '<br />';
	}

	print '<strong>'._('Date')._(':').'</strong> ';
	print strftime (_('%Y-%m-%d'), $c->getDate ());
	print '<br />';

	print '<strong>'._('Description')._(':').'</strong> ';
	print htmlspecialchars ($c->getDescription ());
	print '<br />';

	$parts = $c->getParticipations ();
	print '<strong>'.ngettext('Participant:',
				  'Participants:',
				  count ($parts)).'</strong> ';
	print '<br />';
	print '<ul>';
	foreach ($parts as $p) {
		print '<li>';
		printf (_('%s: %s (%s)'),
			htmlspecialchars ($p->getRole()->getName()),
			util_make_link ('/plugins/'.$plugin->name.'/?actor_id='.$p->getActor()->getId (),
					htmlspecialchars ($p->getActor()->getName())),
			htmlspecialchars ($p->getActor()->getLegalStructure()->getName()));
		if ($p->getActor()->getLogo() != '') {
			print ' ';
			print util_make_link ('/plugins/'.$plugin->name.'/?actor_id='.$p->getActor()->getId (),
					      '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$p->getActor()->getId ()).'" />');
		}
		print '</li>';
	}
	print '</ul>';
}

$group_id = getIntFromRequest('group_id');
$actor_id = getIntFromRequest('actor_id');
if ($group_id) {
	$group = group_get_object($group_id);
	if(!$group || !is_object ($group)) {
		exit_no_group ();
	}
	session_require_perm ('project_read', $group_id);

	$contrib_id = getIntFromRequest ('contrib_id');
	if ($contrib_id) {    // List only one particular contribution
		$contrib = new ContribTrackerContribution ($contrib_id);
		if (!$contrib || !is_object ($contrib)
		    || $contrib->getGroup()->getId() != $group_id) {
			exit_permission_denied ('','home');
		}

		$params = array ();
		$params['toptab'] = 'contribtracker';
		$params['group'] = $group_id;
		$params['title'] = _('Contribution details');
		$params['pagename'] = 'contribtracker';
		$params['sectionvals'] = array($group->getPublicName());

		site_project_header ($params);

		display_contribution ($contrib);
	} else {	// List all contributions relevant to a group
		$params = array ();
		$params['toptab'] = 'contribtracker';
		$params['group'] = $group_id;
		$params['title'] = sprintf (_('Contributions for project %s'),
					    htmlspecialchars ($group->getPublicName()));
		$params['pagename'] = 'contribtracker';
		$params['sectionvals'] = array($group->getPublicName());

		site_project_header($params);

		$contribs = $plugin->getContributionsByGroup ($group);

		if (count ($contribs) == 0) {
			print '<h1>'._('No contributions').'</h1>';
			print _('No contributions have been recorded for this project yet.');
		} else {
			foreach ($contribs as $c) {
				display_contribution ($c);
				print '<hr />';
			}
		}
	}
} elseif ($actor_id) {
	$actor = new ContribTrackerActor ($actor_id);
	if (!is_object ($actor) || $actor->isError()) {
		exit_error (_('Invalid actor'),'contribtracker');
	}

	$HTML->header(array('title'=>_('Actor details'),'pagename'=>'contribtracker'));

	print '<h1>'.sprintf(_('Actor details for %s'),
			     htmlspecialchars($actor->getName())).'</h1>';
	print '<ul>';
	print '<li><strong>'._('Name')._(':').'</strong> '.htmlspecialchars($actor->getName()).'</li>';
	print '<li><strong>'._('URL')._(':').'</strong> ';
	if ($actor->getUrl() != '') {
		print '<a href="'.htmlspecialchars($actor->getUrl()).'">'.htmlspecialchars($actor->getUrl()).'</a>';
	}
	print '</li>';
	print '<li><strong>'._('Email')._(':').'</strong> '.htmlspecialchars($actor->getEmail()).'</li>';
	print '<li><strong>'._('Legal structure')._(':').'</strong> '.htmlspecialchars($actor->getLegalStructure()->getName()).'</li>';
	print '<li><strong>'._('Description')._(':').'</strong> '.htmlspecialchars($actor->getDescription()).'</li>';
	print '</ul>';
	if ($actor->getLogo() != '') {
		if ($actor->getUrl() != '') {
			print '<a href="'.htmlspecialchars($actor->getUrl()).'"><img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$actor->getId ()).'" /></a>';
		} else {
			print '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$actor->getId ()).'" />';
		}
	}

	$participations = $actor->getParticipations ();

	if (count ($participations) == 0) {
		printf (_("%s hasn't been involved in any contributions yet"),
			htmlspecialchars($actor->getName()));
	} else {
		print '<h1>'.sprintf(ngettext('Contribution by %s',
					      'Contributions by %s',
					      count($participations)),
				     htmlspecialchars($actor->getName())).'</h1>';

		foreach ($participations as $p) {
			$c = $p->getContribution ();
			print '<h2>' . util_make_link ('/plugins/'.$plugin->name.'/?group_id='.$c->getGroup()->getId().'&contrib_id='.$c->getId (),
						       htmlspecialchars ($c->getName())) . '</h2>';
			print '<strong>'._('Project')._(':').'</strong> ';
			print util_make_link_g ($c->getGroup()->getUnixName(),
						$c->getGroup()->getId(),
						$c->getGroup()->getPublicName());
			print '<br /><strong>'._('Role')._(':').'</strong> ';
			print htmlspecialchars ($p->getRole()->getName());
			print '<hr />';
		}
	}
} else {			// Latest contributions, globally
	$HTML->header(array('title'=>_('Contributions'),'pagename'=>'contribtracker'));

	$contribs = $plugin->getContributions ();

	if (count ($contribs) == 0) {
		print '<h1>'._('No contributions').'</h1>';
		print _('No contributions have been recorded yet.');
	} else {
		print '<h1>'._('Latest contributions').'</h1>';

		$i = 1;
		foreach ($contribs as $c) {
			display_contribution ($c, true);
			print '<hr />';
			$i++;
			if ($i > 20) {
				break;
			}
		}
	}
}

site_project_footer();

// Local Variables:
// mode: php
// c-file-style: "bsd"
// End: