This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  4c9c8742ecb91530b8f711e8fb64d3ff7ae0148e (commit)
      from  a911534af580200c9b81e615aae797b4fdfbea12 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=4c9c8742ecb91530b8f711e8fb64d3ff7ae0148e

commit 4c9c8742ecb91530b8f711e8fb64d3ff7ae0148e
Author: Franck Villaume <[email protected]>
Date:   Sun Jul 7 18:54:23 2019 +0200

    fix PHP syntax, wrong function, add quota database update support

diff --git a/src/plugins/quota_management/action/update.php 
b/src/plugins/quota_management/action/update.php
index 35a3374..0963e54 100644
--- a/src/plugins/quota_management/action/update.php
+++ b/src/plugins/quota_management/action/update.php
@@ -29,7 +29,7 @@ global $group_id;
 
 if ( !forge_check_global_perm('forge_admin')) {
        $warning_msg = _('Quota Management Action Denied.');
-       redirect_url = 
'/plugins/'.$quota_management->name.'/?group_id='.$group_id;
+       
session_redirect('/plugins/'.$quota_management->name.'/?group_id='.$group_id, 
false);
 }
 
 require_once $gfcommon.'include/SysTasksQ.class.php';
@@ -48,7 +48,7 @@ if ($qs > $qh || $qds > $qdh) {
        $error_msg = _('Input error: Hard quota must be greater than soft 
quota');
 } else {
        db_query_params('UPDATE plugin_quota_management SET quota_soft = $1, 
quota_hard = $2, quota_db_soft = $3, quota_db_hard = $4 WHERE group_id = $5',
-                       array($qs, $qh, $qds, $qdh, $group_id);
+                       array($qs, $qh, $qds, $qdh, $group_id));
        $systasksq = new SystasksQ();
        $systasksq->add($quota_management->getID(), 
'QUOTAMANAGEMENT_SET_QUOTA', $group_id);
        $feedback = _('Quota updated successfully');
diff --git a/src/plugins/quota_management/view/quota.php 
b/src/plugins/quota_management/view/quota.php
index 4c6c115..810112a 100644
--- a/src/plugins/quota_management/view/quota.php
+++ b/src/plugins/quota_management/view/quota.php
@@ -174,7 +174,7 @@ foreach ($users as $u) {
 }
 
 ?>
-<table width="800" cellpadding="2" cellspacing="0" border="0">
+<table width="900" cellpadding="2" cellspacing="0" border="0">
        <tr style="">
                <td style="border-top:thick solid #808080;font-weight:bold" 
colspan="3">
                        <?php echo _('Projects ressources use'); ?>
diff --git a/src/plugins/quota_management/view/quota_admin.php 
b/src/plugins/quota_management/view/quota_admin.php
index abca812..793ab08 100644
--- a/src/plugins/quota_management/view/quota_admin.php
+++ b/src/plugins/quota_management/view/quota_admin.php
@@ -64,19 +64,23 @@ if (db_numrows($res_db) > 0) {
                $quotas["$e[group_id]"]["disk_size"] = 0;
                $quotas["$e[group_id]"]["quota_hard"] = $qh;
                $quotas["$e[group_id]"]["quota_soft"] = $qs;
+               $quotas["$e[group_id]"]["quota_db_hard"] = $e["quota_db_hard"];
+               $quotas["$e[group_id]"]["quota_db_soft"] = $e["quota_db_soft"];
        }
 }
 ?>
-<table width="700px" cellpadding="2" cellspacing="0" border="0">
+<table width="900" cellpadding="2" cellspacing="0" border="0">
        <tr style="font-weight:bold">
-               <td style="border-top:thick solid #808080" colspan="6"><?php 
echo _('Projects disk quota'); ?></td>
+               <td style="border-top:thick solid #808080" colspan="8"><?php 
echo _('Projects quota'); ?></td>
        </tr>
        <tr>
                <td style="border-top:thin solid #808080"><?php echo _('id'); 
?></td>
                <td style="border-top:thin solid #808080"><?php echo _('name'); 
?></td>
                <td style="border-top:thin solid #808080"><br /></td>
-               <td style="border-top:thin solid #808080" align="right"><?php 
echo _('disk quota soft'); ?></td>
-               <td style="border-top:thin solid #808080" align="right"><?php 
echo _('disk quota hard'); ?></td>
+               <td style="border-top:thin solid #808080; 
text-align:right"><?php echo _('database quota soft'); ?></td>
+               <td style="border-top:thin solid #808080; 
text-align:right"><?php echo _('database quota hard'); ?></td>
+               <td style="border-top:thin solid #808080; 
text-align:right"><?php echo _('disk quota soft'); ?></td>
+               <td style="border-top:thin solid #808080; 
text-align:right"><?php echo _('disk quota hard'); ?></td>
                <td style="border-top:thin solid #808080"><br /></td>
        </tr>
        <?php
@@ -95,21 +99,35 @@ if (db_numrows($res_db) > 0) {
                        <?php echo 
util_make_link('/plugins/quota_management/?group_id='.$q['group_id'].'&type=projectadmin',
 $q['unix_name']) ?>
                        </td>
                        <td style="border-top:thin solid #808080"><?php echo 
$q["name"]; ?></td>
-                       <td style="border-top:thin solid #808080" align="right">
+                       <td style="border-top:thin solid #808080; 
text-align:right">
+                               <input type="text" name="qds"
+                                       size="12"
+                                       value="<?php echo $q["quota_db_soft"]; 
?>"
+                                       
style="background:#ffffd0;text-align:right" />
+                                       <?php echo _('MB'); ?>
+                       </td>
+                       <td style="border-top:thin solid #808080; 
text-align:right">
+                               <input type="text" name="qdh"
+                                       size="12"
+                                       value="<?php echo $q["quota_db_hard"]; 
?>"
+                                       
style="background:#ffffd0;text-align:right" />
+                               <?php echo _('MB'); ?>
+                       </td>
+                       <td style="border-top:thin solid #808080; 
text-align:right">
                                <input type="text" name="qs"
                                        size="12"
                                        value="<?php echo $q["quota_soft"]; ?>"
                                        
style="background:#ffffd0;text-align:right" />
                                        <?php echo _('MB'); ?>
                        </td>
-                       <td style="border-top:thin solid #808080" align="right">
+                       <td style="border-top:thin solid #808080; 
text-align:right">
                                <input type="text" name="qh"
                                        size="12"
                                        value="<?php echo $q["quota_hard"]; ?>"
                                        
style="background:#ffffd0;text-align:right" />
                                <?php echo _('MB'); ?>
                        </td>
-                       <td style="border-top:thin solid #808080" align="right">
+                       <td style="border-top:thin solid #808080; 
text-align:right">
                                <input type="submit" value="<?php echo 
_('Modify'); ?>" />
                        </td>
                </tr>
@@ -118,12 +136,7 @@ if (db_numrows($res_db) > 0) {
        }
 ?>
        <tr style="font-weight:bold">
-               <td style="border-top:thick solid #808080;border-bottom:thick 
solid #808080"><br /></td>
-               <td style="border-top:thick solid #808080;border-bottom:thick 
solid #808080"><br /></td>
-               <td style="border-top:thick solid #808080;border-bottom:thick 
solid #808080"><br /></td>
-               <td style="border-top:thick solid #808080;border-bottom:thick 
solid #808080"><br /></td>
-               <td style="border-top:thick solid #808080;border-bottom:thick 
solid #808080"><br /></td>
-               <td style="border-top:thick solid #808080;border-bottom:thick 
solid #808080"><br /></td>
+               <td style="border-top:thick solid #808080;border-bottom:thick 
solid #808080" colspan="8"><br /></td>
        </tr>
 </table>
 <?php

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/quota_management/action/update.php    |  4 +--
 src/plugins/quota_management/view/quota.php       |  2 +-
 src/plugins/quota_management/view/quota_admin.php | 39 +++++++++++++++--------
 3 files changed, 29 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to