[evolvis-commits] r18521: SCM: Catch ViewVC errors for non-CVS/SVN groups early
mirabilos at evolvis.org
mirabilos at evolvis.org
Tue Aug 21 17:37:04 CEST 2012
Author: mirabilos
Date: 2012-08-21 17:37:04 +0200 (Tue, 21 Aug 2012)
New Revision: 18521
Modified:
trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
trunk/gforge_base/evolvisforge-5.1/src/www/scm/viewvc.php
Log:
SCM: Catch ViewVC errors for non-CVS/SVN groups early
Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog 2012-08-20 15:44:30 UTC (rev 18520)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog 2012-08-21 15:37:04 UTC (rev 18521)
@@ -2,8 +2,9 @@
* Fix $PHP for plugin-mediawiki cronjobs
* [#3259] Extend Tasks JSON exports and add same to Tracker
+ * SCM: Catch ViewVC errors for non-CVS/SVN groups early
- -- Thorsten Glaser <t.glaser at tarent.de> Mon, 20 Aug 2012 17:38:59 +0200
+ -- Thorsten Glaser <t.glaser at tarent.de> Tue, 21 Aug 2012 15:19:28 +0200
fusionforge (1:5.1.1+evolvis67) unstable; urgency=low
Modified: trunk/gforge_base/evolvisforge-5.1/src/www/scm/viewvc.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/scm/viewvc.php 2012-08-20 15:44:30 UTC (rev 18520)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/scm/viewvc.php 2012-08-21 15:37:04 UTC (rev 18521)
@@ -54,6 +54,7 @@
} else if ( $Group->isError()) {
exit_error($Group->getErrorMessage(),'summary');
}
+$group_id = $Group->getID();
if (!$Group->usesSCM()) {
exit_disabled();
}
@@ -67,6 +68,15 @@
exit_permission_denied('scm');
}
+// see what type of plugin this project if using
+if ($Group->usesPlugin('scmcvs')) {
+ $repos_type = 'cvs';
+} else if ($Group->usesPlugin('scmsvn')) {
+ $repos_type = 'svn';
+} else {
+ exit_error(_('This Project does not use CVS or Subversion as its SCM'), 'scm');
+}
+
if ($external_scm) {
//$server_script = "/cgi-bin/viewcvs.cgi";
$server_script = $GLOBALS["sys_path_to_scmweb"]."/viewcvs.cgi";
@@ -98,13 +108,6 @@
// Call to ViewCVS CGI locally (see viewcvs_utils.php)
- // see what type of plugin this project if using
- if ($Group->usesPlugin('scmcvs')) {
- $repos_type = 'cvs';
- } else if ($Group->usesPlugin('scmsvn')) {
- $repos_type = 'svn';
- }
-
// HACK : getSiteMenu in Navigation.class.php use GLOBAL['group_id']
// to fix missing projet name tab
$group_id = $Group->getID();
More information about the evolvis-commits
mailing list