* http://gforge.org/
*
* @version
*
* This file is part of GForge.
*
* GForge 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.
*
* GForge 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 GForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include "../env.inc.php";
include "pre.php";
include "rss_utils.inc";
// ## default limit
if (!$limit) $limit = 10;
if ($limit > 100) $limit = 100;
$group_id = getIntFromRequest('group_id');
if ($group_id) {
$where = "group_id=$group_id and is_public=1";
$query = "SELECT group_name FROM groups WHERE $where";
$res = db_query($query,1);
$row = db_fetch_array($res);
$title = "".$row[group_name]." - ";
$link = "?group_id=$group_id";
$description = " of ".$row[group_name];
$querywm = "SELECT users.user_name,users.realname FROM user_group,users WHERE group_id=$group_id AND admin_flags='A' AND users.user_id=user_group.user_id ORDER BY users.add_date";
$reswm = db_query($querywm,1);
if ($rowwm = db_fetch_array($reswm)) {
$webmaster = $rowwm[user_name]."@".$GLOBALS[sys_users_host]." (".$rowwm[realname].")";
} else {
$webmaster = "admin@".$GLOBALS[sys_default_domain];
}
$sql="SELECT * FROM activity_vw WHERE activity_date BETWEEN '".(time()-(30*86400))."' AND '".time()."'
AND activity_vw.group_id = groups.group_id AND groups.is_public=1 AND activity_vw.group_id='$group_id' ORDER BY activity_date DESC";
// ## one time output
header("Content-Type: text/xml");
print '
';
print " \n";
print " ".$GLOBALS[sys_default_name]." $title Activity\n";
print " http://".$GLOBALS[sys_default_domain]."/activity/$link\n";
print " ".$GLOBALS[sys_name]." Project Activity$description\n";
print " en-us\n";
print " Copyright 2000-".date("Y")." ".$GLOBALS[sys_name]." OSI\n";
print " $webmaster\n";
print " ".gmdate('D, d M Y G:i:s',time())." GMT\n";
print " http://blogs.law.harvard.edu/tech/rss\n";
print " ".$GLOBALS[sys_name]." RSS generator\n";
print " \n";
print " http://".$GLOBALS[sys_default_domain]."/images/bflogo-88.png\n";
print " ".$GLOBALS[sys_name]." Developer\n";
print " http://".$GLOBALS[sys_default_domain]."/\n";
print " 124\n";
print " 32\n";
print " \n";
$res = db_query($sql, $limit);
// ## item outputs
while ($arr = db_fetch_array($res)) {
print " \n";
switch ($arr['section']) {
case 'commit': {
print " ".htmlspecialchars('Commit for Tracker Item [#'.$arr['subref_id'].'] '.$arr['description'])."\n";
print " http://".$GLOBALS[sys_default_domain].'/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
print " http://".$GLOBALS[sys_default_domain].'/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
break;
}
case 'trackeropen': {
print " ".htmlspecialchars('Tracker Item [#'.$arr['subref_id'].' '.$arr['description'].'] Opened')."\n";
print " http://".$GLOBALS[sys_default_domain].'/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
print " http://".$GLOBALS[sys_default_domain].'/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
break;
}
case 'trackerclose': {
print " ".htmlspecialchars('Tracker Item [#'.$arr['subref_id'].' '.$arr['description'].'] Closed')."\n";
print " http://".$GLOBALS[sys_default_domain].'/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
print " http://".$GLOBALS[sys_default_domain].'/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
break;
}
case 'frsrelease': {
print " ".htmlspecialchars('FRS Release [#'.$arr['description'].']')."\n";
print " http://".$GLOBALS[sys_default_domain].'/frs/?release_id='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
print " http://".$GLOBALS[sys_default_domain].'/frs/?release_id='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
break;
}
case 'forumpost': {
print " ".htmlspecialchars('Forum Post [#'.$arr['subref_id'].'] '.$arr['description'])."\n";
print " http://".$GLOBALS[sys_default_domain].'/forum/message.php?forum_id='.$arr['ref_id'].'&msg_id='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
print " http://".$GLOBALS[sys_default_domain].'/forum/message.php?forum_id='.$arr['ref_id'].'&msg_id='.$arr['subref_id'].'&group_id='.$arr['group_id']."\n";
break;
}
}
print " ".rss_description($arr[description])."\n";
print " ".$row[user_name]."@".$GLOBALS[sys_users_host]." (".$row[realname].")\n";
print " ".gmdate('D, d M Y G:i:s',$row[activity_date])." GMT\n";
print " \n";
}
// ## end output
print " \n";
print "\n";
} else {
// Print error showing no group was selected
echo " Error: No group selected";
}
?>