This file is indexed.

/usr/share/gforge/cronjobs/stats_site.inc is in gforge-db-postgresql 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
 * Copyright 1999-2001 (c) VA Linux Systems
 *
 * 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 Licence, 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 FusionForge; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

function site_stats_day($year,$month,$day) {

	db_begin();

	$day_begin=mktime(0,0,0,$month,$day,$year);
	$day_end=($day_begin + 86400);

#	echo "Stats_site: $datetime::$day_begin::$day_end::".date('Ymd',$day_begin)."::".date('Ymd',$day_end)."--> $i\n";

	//
	//  build row for stats_site
	//
	$rel = db_query_params ('DELETE FROM stats_site WHERE month=$1 AND day=$2',
				array("$year$month",
				      $day));



	$rel = db_query_params ('INSERT INTO stats_site (month,day,uniq_users,sessions,total_users,new_users,new_projects) 
	VALUES ($1,
	$2,
	(SELECT COUNT(DISTINCT(user_id)) FROM user_session WHERE (time < $3 AND time > $4)),
	(SELECT COUNT(session_hash) FROM user_session WHERE (time < $3 AND time > $4)),
	(SELECT COUNT(user_id) FROM users WHERE ( add_date < $3 AND status=$5 )),
	(SELECT COUNT(user_id) FROM users WHERE ( add_date < $3 AND add_date > $4 )),
	(SELECT COUNT(group_id) FROM groups WHERE ( register_time < $3 AND register_time > $4 )))',
				array("$year$month",
				      $day,
				      $day_end,
				      $day_begin,
				      'A'));
	echo db_error();

	db_commit();

}

?>