[Fusionforge-commits] FusionForge branch Branch_5_1 updated. 772c2c838dde4a5849dd311c4574c9f2271f30bf

Thorsten Glaser mirabilos at fusionforge.org
Tue May 7 10:23:52 CEST 2013


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, Branch_5_1 has been updated
       via  772c2c838dde4a5849dd311c4574c9f2271f30bf (commit)
       via  aa5f6def91ffd728ffc6d9f23c7ac7d870050989 (commit)
      from  6b479259b861288b4762a40e3e23ffa4dfcfca57 (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 -----------------------------------------------------------------
commit 772c2c838dde4a5849dd311c4574c9f2271f30bf
Author: Thorsten Glaser <tg at mirbsd.org>
Date:   Tue May 7 10:23:49 2013 +0200

    Also fix number of pending projects on MyAdmin widget

diff --git a/src/common/widget/Widget_MyAdmin.class.php b/src/common/widget/Widget_MyAdmin.class.php
index d081ebb..a4e1251 100644
--- a/src/common/widget/Widget_MyAdmin.class.php
+++ b/src/common/widget/Widget_MyAdmin.class.php
@@ -62,7 +62,12 @@ class Widget_MyAdmin extends Widget {
 	}
 
 	if (forge_check_global_perm ('approve_projects')) {
-		$res = db_query_params("SELECT count(*) AS count FROM groups WHERE status='P'",array());
+		$res = db_query_params('SELECT count(*) AS count FROM groups
+			WHERE group_id > 4
+			    AND status = $1
+			    AND register_time > 0
+			    AND is_template = 0',
+		    array('P'));
 		$row = db_fetch_array($res);
 		$pending_projects = $row['count'];
 

commit aa5f6def91ffd728ffc6d9f23c7ac7d870050989
Author: Thorsten Glaser <tg at mirbsd.org>
Date:   Tue May 7 10:23:35 2013 +0200

    Fix number of projects shown (site admin; feature_boxes)

diff --git a/src/www/admin/index.php b/src/www/admin/index.php
index b2ad833..5c215c3 100644
--- a/src/www/admin/index.php
+++ b/src/www/admin/index.php
@@ -97,23 +97,31 @@ $abc_array = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','
 <h2><?php echo _('Project Maintenance'); ?></h2>
 <ul>
 	<li><?php
-		$res=db_query_params ('SELECT count(*) AS count FROM groups',
-			array()) ;
-
+		$res = db_query_params('SELECT count(*) AS count FROM groups
+			WHERE group_id > 4
+			    AND register_time > 0
+			    AND is_template = 0',
+		    array());
 		$row = db_fetch_array($res);
 		printf(_('Registered projects: <strong>%1$s</strong>'), $row['count']);
 	?></li>
 	<li><?php
-		$res=db_query_params ('SELECT count(*) AS count FROM groups WHERE status=$1',
-			array('A')) ;
-
+		$res = db_query_params('SELECT count(*) AS count FROM groups
+			WHERE group_id > 4
+			    AND status = $1
+			    AND register_time > 0
+			    AND is_template = 0',
+		    array('A'));
 		$row = db_fetch_array($res);
 		printf(_('Active projects: <strong>%1$s</strong>'), $row['count']);
 	?></li>
 	<li><?php
-		$res=db_query_params ('SELECT count(*) AS count FROM groups WHERE status=$1',
-			array('P')) ;
-
+		$res = db_query_params('SELECT count(*) AS count FROM groups
+			WHERE group_id > 4
+			    AND status = $1
+			    AND register_time > 0
+			    AND is_template = 0',
+		    array('P'));
 		$row = db_fetch_array($res);
 		printf(_('Pending projects: <strong>%1$s</strong>'), $row['count']);
 	?></li>

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

Summary of changes:
 src/common/widget/Widget_MyAdmin.class.php |    7 ++++++-
 src/www/admin/index.php                    |   26 +++++++++++++++++---------
 2 files changed, 23 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list