[Fusionforge-commits] FusionForge branch master updated. ccb25f010a3259cc0366af07330fd0047e324f39

Alain Peyrat aljeux at fusionforge.org
Fri Dec 7 16:21:28 CET 2012


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  ccb25f010a3259cc0366af07330fd0047e324f39 (commit)
       via  caa137026adfa89073f69b27c28e9eccc6e6019b (commit)
       via  c95d13c6199ca7bd445ade5dd75bd46e784ab6f0 (commit)
      from  f0efc8b7d0660b9a615058d018583543e96ada4a (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 ccb25f010a3259cc0366af07330fd0047e324f39
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Fri Dec 7 16:21:24 2012 +0100

    Clean code

diff --git a/src/www/stats/lastlogins.php b/src/www/stats/lastlogins.php
index 7b6d2a3..40e86da 100644
--- a/src/www/stats/lastlogins.php
+++ b/src/www/stats/lastlogins.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Page to view latest logins to the site
+ * Page to view latest sessions to the site
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2010 (c) Franck Villaume
@@ -28,7 +28,7 @@ require_once $gfcommon.'include/pre.php';
 
 session_require_global_perm ('forge_admin');
 
-$res_logins = db_query_params ('SELECT us.user_id AS user_id,
+$res = db_query_params ('SELECT us.user_id AS user_id,
 	us.ip_addr AS ip_addr,
 	us.time AS time,
 	users.user_name AS user_name FROM user_session us,users
@@ -37,7 +37,7 @@ $res_logins = db_query_params ('SELECT us.user_id AS user_id,
 			       array (),
 			       50);
 
-if (!$res_logins || db_numrows($res_logins) < 1) {
+if (!$res || db_numrows($res) < 1) {
 	exit_error(_('No records found","Database error: "').db_error());
 }
 
@@ -45,22 +45,22 @@ $HTML->header(array('title'=>_('Most Recent Opened Sessions')));
 
 ?>
 
-<table  width="100%">
+<table class="fullwidth">
 <tr class="tableheading">
-<th><?php echo _('Date'); ?></th>
-<th><?php echo _('Username'); ?></th>
-<th><?php echo _('Source IP'); ?></th>
+	<th><?php echo _('Date'); ?></th>
+	<th><?php echo _('Username'); ?></th>
+	<th><?php echo _('Source IP'); ?></th>
 </tr>
 
 <?php
 
 $alt=true;
 $i=0;
-while ($row_logins = db_fetch_array($res_logins)) {
+while ($row = db_fetch_array($res)) {
 	print ' <tr '.$GLOBALS['HTML']->boxGetAltRowStyle($i++).'>';
-	print '<td >'.date(_('Y-m-d H:i'), $row_logins['time']).'</td>';
-	print '<td >'.$row_logins['user_name'].'</td>';
-	print '<td >'.$row_logins['ip_addr'].'</td>';
+	print '<td >'.date(_('Y-m-d H:i'), $row['time']).'</td>';
+	print '<td >'.util_display_user($row['user_name']).'</td>';
+	print '<td >'.$row['ip_addr'].'</td>';
 	print '</tr>';
 }
 ?>

commit caa137026adfa89073f69b27c28e9eccc6e6019b
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Fri Dec 7 16:21:11 2012 +0100

    Disable error_reporting in soap as it breaks XML generated output.

diff --git a/src/www/soap/index.php b/src/www/soap/index.php
index 5c04f67..5aae09a 100644
--- a/src/www/soap/index.php
+++ b/src/www/soap/index.php
@@ -12,6 +12,9 @@ require_once $gfcommon.'include/FusionForge.class.php';
 ini_set('memory_limit','32M');
 sysdebug_off();
 
+// Disable error_reporting as it breaks XML generated output.
+error_reporting(0);
+
 $uri = 'http://'.forge_get_config('web_host');
 // 1. include client and server
 require_once $gfwww.'soap/nusoap.php';

commit c95d13c6199ca7bd445ade5dd75bd46e784ab6f0
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Fri Dec 7 16:20:53 2012 +0100

    Fix PHP 5.4 warnings

diff --git a/src/www/soap/frs/frs.php b/src/www/soap/frs/frs.php
index 504846e..0c3d0e1 100644
--- a/src/www/soap/frs/frs.php
+++ b/src/www/soap/frs/frs.php
@@ -338,14 +338,14 @@ function getReleases($session_ser,$group_id,$package_id) {
 		return new soap_fault ('','getReleases',$grp->getErrorMessage(),$grp->getErrorMessage());
 	}
 
-	$frsp =& frspackage_get_object($package_id);
+	$frsp = frspackage_get_object($package_id);
 	if (!$frsp || !is_object($frsp)) {
 		return new soap_fault ('','getReleases','Could Not Get Package','Could Not Get Package');
 	} elseif ($frsp->isError()) {
 		return new soap_fault ('','getReleases',$frsp->getErrorMessage(),$frsp->getErrorMessage());
 	}
 
-	$release_arr =& $frsp->getReleases();
+	$release_arr = $frsp->getReleases();
 
 	return releases_to_soap($release_arr);
 }
@@ -383,7 +383,7 @@ function addRelease($session_ser,$group_id,$package_id,$name,$notes,$changes,$re
 		return new soap_fault ('','getPackages',$grp->getErrorMessage(),$grp->getErrorMessage());
 	}
 
-	$frsp =& frspackage_get_object($package_id);
+	$frsp = frspackage_get_object($package_id);
 	if (!$frsp || !is_object($frsp)) {
 		return new soap_fault ('','getReleases','Could Not Get Package','Could Not Get Package');
 	} elseif ($frsp->isError()) {

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

Summary of changes:
 src/www/soap/frs/frs.php     |    6 +++---
 src/www/soap/index.php       |    3 +++
 src/www/stats/lastlogins.php |   22 +++++++++++-----------
 3 files changed, 17 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list