gforge/db/20040108-gforge-3.21 -text svneol=unset#application/octet-stream
gforge/db/20040326-gforge-3.3 -text svneol=unset#application/octet-stream
gforge/db/20041025-gforge-4.0 -text svneol=unset#application/octet-stream
-gforge/db/20050822-drops.sql -text
+gforge/db/20050822-1-drops.sql -text
gforge/db/20051103_transiciel_motscle_document.sql -text
-gforge/db/20060216-drops.sql -text
-gforge/db/20060216-nocommit.sql -text
+gforge/db/20060216-1-drops.sql -text
+gforge/db/20060216-2-debian-nocommit.sql -text
gforge/db/20070924-artifact-perm.sql -text
gforge/db/20070924-forum-perm.sql -text
gforge/db/20070924-project-perm.sql -text
if (!session_loggedin()) {
return false;
}
- $sql="SELECT * FROM filemodule_monitor
- WHERE user_id='".user_getid()."'
- AND filemodule_id='".$this->getID()."';";
$result = db_query_params ('SELECT * FROM filemodule_monitor WHERE user_id=$1 AND filemodule_id=$2',
array (user_getid(),
require_once dirname(__FILE__).'/../www/env.inc.php';
require $gfwww.'include/squal_pre.php';
+@ini_set('memory_limit', '128M');
+
// drop and recreate page cache
//
//SELECT * FROM doc_data WHERE filename is null;
DROP INDEX docdata_groupid;
DROP INDEX forumperm_useridgroupforumid;
+ALTER TABLE forum_perm DROP CONSTRAINT forum_perm_id_key;
DROP INDEX forumperm_groupforumiduserid;
DROP INDEX group_cvs_history_id_key;
+ALTER TABLE project_perm DROP CONSTRAINT project_perm_id_key;
DROP INDEX projecttaskartifact_projecttask;
DROP INDEX supported_langu_language_id_key;
-- TODO DROP unnecessary sequence/id
--
ALTER TABLE forum_perm DROP CONSTRAINT forum_perm_id_key;
-DROP INDEX forum_perm_id_key;
CREATE INDEX forumperm_useridgroupforumid ON forum_perm(user_id,group_forum_id);
ALTER TABLE forum_perm ADD CONSTRAINT forum_perm_pkey PRIMARY KEY (group_forum_id, user_id);
-- TODO DROP unnecessary sequence/id
--
ALTER TABLE project_perm DROP CONSTRAINT project_perm_id_key;
-DROP INDEX project_perm_id_key;
DROP INDEX projectperm_groupprojiduserid;
ALTER TABLE project_perm ADD CONSTRAINT project_perm_id_key PRIMARY KEY(group_project_id,user_id);
CREATE INDEX projectperm_useridgroupprojid ON project_perm(user_id,group_project_id);
-DROP VIEW activity_vw;
-DROP RULE groupactivity_userdelete_rule ON users;
-DROP TABLE group_activity_monitor;
-
-
CREATE VIEW activity_vw AS
SELECT
agl.group_id, 'trackeropen'::text AS section, agl.group_artifact_id AS ref_id,
if (strlen($name) >= 8) {
$date_aux = substr($name, 0, 8);
$type_aux = substr($file, $pos + 1);
- if ((int) $date_aux > 20000000 && $type_aux=='sql' || $type_aux=='php') {
+ if ((int) $date_aux > 20000000 && ($type_aux=='sql' || $type_aux=='php') && strpos($file, 'debian') === false) {
$data[] = array('date'=>$date_aux, 'filename'=>$file, 'ext'=>$type_aux);
}
}
}
closedir($dh);
}
- sort($data);
+ usort($data, 'compare_scripts');
reset($data);
}
+
return $data;
}
+function compare_scripts($script1, $script2) {
+ return strcmp($script1['filename'], $script2['filename']);
+}
+
function run_script($script) {
global $db_path;
$return = false;
$version = &get_db_version ;
$target = "2.6-0+checkpoint+14" ;
if (&is_lesser ($version, $target)) {
- &debug ("Upgrading with 20021213.sql") ;
+ &debug ("Upgrading with 20021213-1.sql") ;
- @reqlist = @{ &parse_sql_file ("$sqldir/20021213.sql") } ;
+ @reqlist = @{ &parse_sql_file ("$sqldir/20021213-1.sql") } ;
foreach my $s (@reqlist) {
$query = $s ;
# debug $query ;
$version = &get_db_version ;
$target = "2.6-0+checkpoint+19" ;
if (&is_lesser ($version, $target)) {
- &debug ("Upgrading with 20021223.sql") ;
+ &debug ("Upgrading with 20021223-2.sql") ;
- @reqlist = @{ &parse_sql_file ("$sqldir/20021223.sql") } ;
+ @reqlist = @{ &parse_sql_file ("$sqldir/20021223-2.sql") } ;
foreach my $s (@reqlist) {
$query = $s ;
# debug $query ;
$version = &get_db_version ;
$target = "2.6-0+checkpoint+20" ;
if (&is_lesser ($version, $target)) {
- &debug ("Upgrading with 20030102.sql") ;
+ &debug ("Upgrading with 20030102-2.sql") ;
- @reqlist = @{ &parse_sql_file ("$sqldir/20030102.sql") } ;
+ @reqlist = @{ &parse_sql_file ("$sqldir/20030102-2.sql") } ;
foreach my $s (@reqlist) {
$query = $s ;
# debug $query ;
$version = &get_db_version ;
$target = "2.6-0+checkpoint+25" ;
if (&is_lesser ($version, $target)) {
- &debug ("Upgrading with 20030113.sql") ;
+ &debug ("Upgrading with 20030113-2.sql") ;
- @reqlist = @{ &parse_sql_file ("$sqldir/20030113.sql") } ;
+ @reqlist = @{ &parse_sql_file ("$sqldir/20030113-2.sql") } ;
foreach my $s (@reqlist) {
$query = $s ;
# debug $query ;
$version = &get_db_version ;
$target = "4.1-0" ;
if (&is_lesser ($version, $target)) {
- &debug ("Upgrading with 20050224.sql") ;
+ &debug ("Upgrading with 20050224-2.sql") ;
- @reqlist = @{ &parse_sql_file ("$sqldir/20050224.sql") } ;
+ @reqlist = @{ &parse_sql_file ("$sqldir/20050224-2.sql") } ;
foreach my $s (@reqlist) {
$query = $s ;
# debug $query ;
$version = &get_db_version ;
$target = "4.1-4" ;
if (&is_lesser ($version, $target)) {
- &debug ("Upgrading with 20050325-1.sql") ;
+ &debug ("Upgrading with 20050325-2.sql") ;
- @reqlist = @{ &parse_sql_file ("$sqldir/20050325-1.sql") } ;
+ @reqlist = @{ &parse_sql_file ("$sqldir/20050325-2.sql") } ;
foreach my $s (@reqlist) {
$query = $s ;
# debug $query ;
$version = &get_db_version ;
$target = "4.1-6" ;
if (&is_lesser ($version, $target)) {
- &debug ("Upgrading with 20050325-3.sql") ;
+ &debug ("Upgrading with 20050325-5.sql") ;
- @reqlist = @{ &parse_sql_file ("$sqldir/20050325-3.sql") } ;
+ @reqlist = @{ &parse_sql_file ("$sqldir/20050325-5.sql") } ;
foreach my $s (@reqlist) {
$query = $s ;
# debug $query ;
# If the view doesn't exists apply
if (! &view_exists ($dbh, 'activity_vw')) {
&update_with_sql("20050812","4.5.15-10merge");
- &update_with_sql("20050822","4.5.15-11merge");
+ &update_with_sql("20050822-2","4.5.15-11merge");
&update_with_sql("20050823","4.5.15-12merge");
&update_with_sql("20050824","4.5.15-13merge");
&update_with_sql("20050831","4.5.15-14merge");
&update_with_sql("20060113","4.5.15-15");
&update_with_sql("20060214","4.5.15-16");
- &update_with_sql("20060216-nocommit","4.5.15-17");
+ &update_with_sql("20060216-2-debian-nocommit","4.5.15-17");
}
$version = &get_db_version ;
<td>
<strong><?php echo _('File')?></strong><?php echo utils_requiredField(); ?><br />
<?php if ($d->isURL()) {
- echo '<a href="'.addslashes($d->getFileName()).'">[View File URL]</a>';
+ echo '<a href="'.inputSpecialchars($d->getFileName()).'">[View File URL]</a>';
} else { ?>
<a target="_blank" href="../view.php/<?php echo $group_id.'/'.$d->getID().'/'.urlencode($d->getFileName()) ?>"><?php echo $d->getName(); ?></a>
<?php } ?>
require_once('../env.inc.php');
require_once $gfwww.'include/pre.php';
require_once $gfwww.'frs/include/frs_utils.php';
+require_once $gfcommon.'frs/FRSPackage.class.php';
$group_id = getIntFromRequest('group_id');
$release_id = getIntFromRequest('release_id');
// Iterate and show the packages
for ( $p = 0; $p < $num_packages; $p++ ) {
$cur_style = $GLOBALS['HTML']->boxGetAltRowStyle($p);
-
- print '<tr '.$cur_style.'><td colspan="3"><h3>'.db_result($res_package,$p,'name').'
- <a href="'.util_make_url ('/frs/monitor.php?filemodule_id='. db_result($res_package,$p,'package_id') .'&group_id='.db_result($res_package,$p,'group_id').'&start=1').'">'.
- html_image('ic/mail16w.png','20','20',array('alt'=>_('Monitor this package'))) .
- '</a></h3></td><td colspan="4"> </td></tr>';
+
+ $frsPackage = new FRSPackage($cur_group, db_result($res_package,$p,'package_id'));
+
+ print '<tr '.$cur_style.'><td colspan="3"><h3>'.db_result($res_package,$p,'name');
+
+ if($frsPackage->isMonitoring()) {
+ print ' <a href="'.util_make_url ('/frs/monitor.php?filemodule_id='. db_result($res_package,$p,'package_id') .'&group_id='.db_result($res_package,$p,'group_id').'&stop=1').'">'.
+ html_image('ic/xmail16w.png','20','20',array('alt'=>_('Stop monitoring this package')));
+ } else {
+ print ' <a href="'.util_make_url ('/frs/monitor.php?filemodule_id='. db_result($res_package,$p,'package_id') .'&group_id='.db_result($res_package,$p,'group_id').'&start=1').'">'.
+ html_image('ic/mail16w.png','20','20',array('alt'=>_('Monitor this package')));
+ }
+
+ print '</a></h3></td><td colspan="4"> </td></tr>';
// get the releases of the package
$sql = "SELECT * FROM frs_release
exit_error(_('Error'),$f->getErrorMessage());
} else {
frs_header(array('title'=>_('Monitoring stopped'),'group'=>$group_id));
- echo _('Monitoring Has Been Stopped');
+ echo $HTML->feedback(_('Monitoring Has Been Stopped'));
frs_footer();
}
} elseif($start) {
exit_error('Error',$f->getErrorMessage());
} else {
frs_header(array('title'=>_('Monitoring started'),'group'=>$group_id));
- echo _('Monitoring Has Been Started');
+ echo $HTML->feedback(_('Monitoring Has Been Started'));
frs_footer();
}
}
if ($project->usesTracker()) {
print '<hr size="1" /><a href="'.util_make_url ('/tracker/?group_id='.$group_id).'">';
print html_image('ic/tracker20g.png','20','20',array('alt'=>_('Tracker')));
- print _('Tracker').'</a>';
+ print ' '._('Tracker').'</a>';
$result=db_query("SELECT agl.*,aca.count,aca.open_count
FROM artifact_group_list agl
for ($j = 0; $j < $rows; $j++) {
echo '<li>' ;
print util_make_link ('/tracker/?atid='. db_result($result, $j, 'group_artifact_id') . '&group_id='.$group_id.'&func=browse',db_result($result, $j, 'name')) . ' ' ;
- sprintf(ngettext('(<strong>%1$s</strong> open / <strong>%2$s</strong> total)', '(<strong>%1$s</strong> open / <strong>%2$s</strong> total)', (int) db_result($result, $j, 'open_count')), (int) db_result($result, $j, 'open_count'), (int) db_result($result, $j, 'count')) .'<br />'.
+ printf(ngettext('(<strong>%1$s</strong> open / <strong>%2$s</strong> total)', '(<strong>%1$s</strong> open / <strong>%2$s</strong> total)', (int) db_result($result, $j, 'open_count')), (int) db_result($result, $j, 'open_count'), (int) db_result($result, $j, 'count')) .'<br />'.
db_result($result, $j, 'description');
echo '</li>' ;
}
if ($project->usesSurvey()) {
print '<hr size="1" /><a href="'.util_make_url ('/survey/?group_id='.$group_id).'">';
print html_image('ic/survey16b.png','20','20',array('alt'=>_('Surveys')));
- print " "._('Surveys')."</a>";
+ print ' '._('Surveys')."</a>";
echo ' ( <strong>'. project_get_survey_count($group_id) .'</strong> '._('surveys').' )';
}
if ($project->usesSCM()) {
print '<hr size="1" /><a href="'.util_make_url ('/scm/?group_id='.$group_id).'">';
print html_image('ic/cvs16b.png','20','20',array('alt'=>_('SCM')));
- print " "._('SCM Repository')."</a>";
+ print ' '._('SCM Repository')."</a>";
/*
$result = db_query("
print '<hr size="1" />';
print '<a href="ftp://' . $project->getUnixName() . '.' . $GLOBALS['sys_default_domain'] . '/pub/'. $project->getUnixName() .'/">';
print html_image('ic/ftp16b.png','20','20',array('alt'=>_('Anonymous FTP Space')));
- print _('Anonymous FTP Space')."</a>";
+ print ' '._('Anonymous FTP Space')."</a>";
}
}