[Fusionforge-commits] r14822 - in trunk/src/plugins/quota_management: common www

Alain Peyrat aljeux at fusionforge.org
Thu Nov 17 18:33:41 CET 2011


Author: aljeux
Date: 2011-11-17 18:33:40 +0100 (Thu, 17 Nov 2011)
New Revision: 14822

Removed:
   trunk/src/plugins/quota_management/common/quota_management-init.php
Modified:
   trunk/src/plugins/quota_management/www/index.php
   trunk/src/plugins/quota_management/www/quota.php
   trunk/src/plugins/quota_management/www/quota_admin.php
   trunk/src/plugins/quota_management/www/quota_project.php
Log:
Fix path for quota_management plugin

Deleted: trunk/src/plugins/quota_management/common/quota_management-init.php
===================================================================
--- trunk/src/plugins/quota_management/common/quota_management-init.php	2011-11-17 17:29:25 UTC (rev 14821)
+++ trunk/src/plugins/quota_management/common/quota_management-init.php	2011-11-17 17:33:40 UTC (rev 14822)
@@ -1,34 +0,0 @@
-<?php
-
-/**
- *
- * 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.
- */
-
-global $gfplugins;
-require_once $gfplugins.'quota_management/common/quota_managementPlugin.class.php' ;
-
-$quota_managementPluginObject = new quota_managementPlugin ;
-
-register_plugin ($quota_managementPluginObject) ;
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>

Modified: trunk/src/plugins/quota_management/www/index.php
===================================================================
--- trunk/src/plugins/quota_management/www/index.php	2011-11-17 17:29:25 UTC (rev 14821)
+++ trunk/src/plugins/quota_management/www/index.php	2011-11-17 17:33:40 UTC (rev 14822)
@@ -21,7 +21,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require_once('../../env.inc.php');
+require_once dirname(__FILE__)."/../../env.inc.php";
 require_once $gfcommon.'include/pre.php';
 
 // the header that displays for the project portion of the plugin
@@ -42,9 +42,9 @@
 $quota_management = plugin_get_object($pluginname);
 
 if (!$type) {
-	exit_missing_params($_SERVER['HTTP_REFERER'],array(_('No TYPE specified')), 'home');
+	exit_missing_param($_SERVER['HTTP_REFERER'],array(_('No TYPE specified')),'home');
 } elseif (!$id) {
-	exit_missing_params($_SERVER['HTTP_REFERER'],array(_('No ID specified')), 'home');
+	exit_missing_param($_SERVER['HTTP_REFERER'],array(_('No ID specified')),'home');
 } else {
 	if ($type == 'group') {
 		$group = group_get_object($id);

Modified: trunk/src/plugins/quota_management/www/quota.php
===================================================================
--- trunk/src/plugins/quota_management/www/quota.php	2011-11-17 17:29:25 UTC (rev 14821)
+++ trunk/src/plugins/quota_management/www/quota.php	2011-11-17 17:33:40 UTC (rev 14822)
@@ -23,7 +23,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require_once('../../env.inc.php');
+require_once dirname(__FILE__)."/../../env.inc.php";
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'admin/admin_utils.php';
 
@@ -163,7 +163,7 @@
 				<?php echo _('Ftp, Home'); ?>
 				      
 				<?php echo _('scm'); ?>* :
-				<?php echo _('Cvs, Svn'); ?>
+				<?php echo _('CVS, SVN'); ?>
 				      
 				<?php echo _('others'); ?>* :
 				<?php echo _('Download - without quota control'); ?>

Modified: trunk/src/plugins/quota_management/www/quota_admin.php
===================================================================
--- trunk/src/plugins/quota_management/www/quota_admin.php	2011-11-17 17:29:25 UTC (rev 14821)
+++ trunk/src/plugins/quota_management/www/quota_admin.php	2011-11-17 17:33:40 UTC (rev 14822)
@@ -23,10 +23,12 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require_once('../../env.inc.php');
+require_once dirname(__FILE__)."/../../env.inc.php";
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'admin/admin_utils.php';
 
+$cmd = getStringFromRequest('cmd');
+
 $quota_management = plugin_get_object('quota_management');
 
 $_quota_block_size = 1024;
@@ -44,7 +46,7 @@
 <?php
 
 // quota update
-if ($_POST["cmd"] == "maj")
+if ($cmd == "maj")
 {
 	$qs = $_POST["qs"] * $_quota_block_size;
 	$qh = $_POST["qh"] * $_quota_block_size;

Modified: trunk/src/plugins/quota_management/www/quota_project.php
===================================================================
--- trunk/src/plugins/quota_management/www/quota_project.php	2011-11-17 17:29:25 UTC (rev 14821)
+++ trunk/src/plugins/quota_management/www/quota_project.php	2011-11-17 17:33:40 UTC (rev 14822)
@@ -26,13 +26,13 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-global $id;
-global $quota_management;
-
-require_once('../../env.inc.php');
+require_once dirname(__FILE__)."/../../env.inc.php";
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'project/admin/project_admin_utils.php';
 
+$id = getIntFromRequest('group_id');
+$quota_management = plugin_get_object('quota_management');
+
 session_require_perm('project_admin', $id);
 
 $group = &group_get_object($id);
@@ -302,7 +302,7 @@
 	</tr>
 	<tr style="background:<?php echo $color2; ?>">
 		<td style="border-top:thin solid #808080">
-			<?php echo _('Cvs, Svn'); ?>
+			<?php echo _('CVS, SVN'); ?>
 		</td>
 		<td style="border-top:thin solid #808080;font-weight:bold;color:red" align="right">
 			<?php echo $msg2; ?>




More information about the Fusionforge-commits mailing list