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  37d609d0ecd3594241562d36da6040c2d0669de5 (commit)
      from  1d3ec6971a6978b67569addad13c623cee21b3a1 (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=37d609d0ecd3594241562d36da6040c2d0669de5

commit 37d609d0ecd3594241562d36da6040c2d0669de5
Author: Franck Villaume <[email protected]>
Date:   Sat Apr 1 18:42:21 2017 +0200

    clean-up, less code

diff --git a/src/common/frs/views/listpackages.php 
b/src/common/frs/views/listpackages.php
index ca0690f..158fd87 100644
--- a/src/common/frs/views/listpackages.php
+++ b/src/common/frs/views/listpackages.php
@@ -5,7 +5,7 @@
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2002-2004 (c) GForge Team
  * Copyright 2010 (c) FusionForge Team
- * Copyright 2013-2014,2016, Franck Villaume - TrivialDev
+ * Copyright 2013-2014,2016-2017, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -82,10 +82,6 @@ EOS;
                echo html_e('p', array(), 
util_make_link('/frs/?view=qrs&group_id='.$group_id, _('To create a new release 
click here.')));
        }
 
-       $proj_stats['packages'] = count($FRSPackages);
-       $proj_stats['releases'] = 0;
-       $proj_stats['size']     = 0;
-
        // Iterate and show the packages
        $current_groupid = $group_id;
        foreach ($FRSPackages as $FRSPackage) {
@@ -117,8 +113,6 @@ EOS;
                $FRSPackageReleases = $FRSPackage->getReleases(false);
                $num_releases = count($FRSPackageReleases);
 
-               $proj_stats['releases'] += $num_releases;
-
                $package_name_protected = $HTML->toSlug($package_name);
                $package_ziplink = '';
                if ($FRSPackageReleases && $num_releases >= 1 && 
class_exists('ZipArchive') && 
file_exists($FRSPackage->getReleaseZipPath($FRSPackage->getNewestReleaseID()))) 
{
@@ -185,26 +179,21 @@ EOS;
                                $res_files = $FRSPackageRelease->getFiles();
                                $num_files = count($FRSPackageRelease);
 
-                               @$proj_stats['files'] += $num_files;
-
                                // Switch whether release_id exists and/or 
release_id == package_release['release_id']
                                if (!$release_id || $release_id == 
$package_release_id) {
-                                       // no release_id
-                                       $cell_data = array();
-                                       $cell_data[] = _('File Name');
-                                       $cell_data[] = _('Date');
-                                       $cell_data[] = _('Size');
-                                       $cell_data[] = _('D/L');
-                                       $cell_data[] = _('Arch');
-                                       $cell_data[] = _('Type');
-                                       $cell_data[] = _('Latest');
-                                       echo $HTML->listTableTop($cell_data);
                                        // no release_id OR no release_id OR 
release_id is current one
                                        if ( !$res_files || $num_files < 1 ) {
-                                               $cells = array();
-                                               $cells[] = 
array('&nbsp;&nbsp;'.html_e('em', array(), _('No files')), 'colspan' => 7);
-                                               echo 
$HTML->multiTableRow(array(), $cells);
+                                               echo $HTML->information(_('No 
files'));
                                        } else {
+                                               $cell_data = array();
+                                               $cell_data[] = _('File Name');
+                                               $cell_data[] = _('Date');
+                                               $cell_data[] = _('Size');
+                                               $cell_data[] = _('D/L');
+                                               $cell_data[] = _('Arch');
+                                               $cell_data[] = _('Type');
+                                               $cell_data[] = _('Latest');
+                                               echo 
$HTML->listTableTop($cell_data);
                                                // now iterate and show the 
files in this release....
                                                foreach ($res_files as 
$res_file) {
                                                        $cells = array();
@@ -215,14 +204,10 @@ EOS;
                                                        $cells[][] = 
$res_file->getProcessor();
                                                        $cells[][] = 
$res_file->getFileType();
                                                        $cells[][] = 
util_make_link('/frs/download.php/latestfile/'.$FRSPackage->getID().'/'.$res_file->getName(),
 _('Latest version'));
-
-                                                       $proj_stats['size'] += 
$res_file->getSize();
-                                                       
@$proj_stats['downloads'] += $res_file->getDownloads();
-
                                                        echo 
$HTML->multiTableRow(array(), $cells);
                                                }
+                                               echo $HTML->listTableBottom();
                                        }
-                                       echo $HTML->listTableBottom();
                                        echo $HTML->boxBottom();
                                }
                        } //for: release(s)

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

Summary of changes:
 src/common/frs/views/listpackages.php | 39 +++++++++++------------------------
 1 file changed, 12 insertions(+), 27 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