pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/p5-Apache-Gallery Add reverse sorting of entries.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/378df06d2591
branches:  trunk
changeset: 477882:378df06d2591
user:      kim <kim%pkgsrc.org@localhost>
date:      Sat Jul 10 22:21:40 2004 +0000

description:
Add reverse sorting of entries.

diffstat:

 www/p5-Apache-Gallery/Makefile         |   4 +-
 www/p5-Apache-Gallery/distinfo         |   4 +-
 www/p5-Apache-Gallery/patches/patch-aa |  49 +++++++++++++++++++++++++++------
 3 files changed, 43 insertions(+), 14 deletions(-)

diffs (104 lines):

diff -r 300a0ca45d47 -r 378df06d2591 www/p5-Apache-Gallery/Makefile
--- a/www/p5-Apache-Gallery/Makefile    Sat Jul 10 22:18:23 2004 +0000
+++ b/www/p5-Apache-Gallery/Makefile    Sat Jul 10 22:21:40 2004 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.16 2004/04/12 18:29:04 kim Exp $
+# $NetBSD: Makefile,v 1.17 2004/07/10 22:21:40 kim Exp $
 #
 
 DISTNAME=      Apache-Gallery-0.7
 PKGNAME=       p5-${DISTNAME}
-PKGREVISION=   5
+PKGREVISION=   6
 SVR4_PKGNAME=  p5aga
 CATEGORIES=    www graphics
 MASTER_SITES=  ${MASTER_SITE_PERL_CPAN:=Apache/}
diff -r 300a0ca45d47 -r 378df06d2591 www/p5-Apache-Gallery/distinfo
--- a/www/p5-Apache-Gallery/distinfo    Sat Jul 10 22:18:23 2004 +0000
+++ b/www/p5-Apache-Gallery/distinfo    Sat Jul 10 22:21:40 2004 +0000
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.4 2004/04/01 16:13:17 kim Exp $
+$NetBSD: distinfo,v 1.5 2004/07/10 22:21:40 kim Exp $
 
 SHA1 (Apache-Gallery-0.7.tar.gz) = bb73d611da624d23273cebfd269156040857b6c4
 Size (Apache-Gallery-0.7.tar.gz) = 73532 bytes
-SHA1 (patch-aa) = 7b6f5e774b1bf40850b6d7e3dc19ec675625ff1f
+SHA1 (patch-aa) = 2e9c471751812eab55e47c1a75bf9139df1f516d
diff -r 300a0ca45d47 -r 378df06d2591 www/p5-Apache-Gallery/patches/patch-aa
--- a/www/p5-Apache-Gallery/patches/patch-aa    Sat Jul 10 22:18:23 2004 +0000
+++ b/www/p5-Apache-Gallery/patches/patch-aa    Sat Jul 10 22:21:40 2004 +0000
@@ -1,11 +1,40 @@
-$NetBSD: patch-aa,v 1.4 2004/04/01 19:21:50 kim Exp $
+$NetBSD: patch-aa,v 1.5 2004/07/10 22:21:40 kim Exp $
 
-Convert newlines to <BR> tags in visible folder names on the directory
-page, but not in the menu bar.
-
---- lib/Apache/Gallery.pm.orig 2004-03-13 13:02:03.000000000 -0500
-+++ lib/Apache/Gallery.pm      2004-03-13 13:02:49.000000000 -0500
-@@ -272,7 +272,7 @@
+--- lib/Apache/Gallery.pm.orig 2003-09-07 13:28:42.000000000 -0400
++++ lib/Apache/Gallery.pm      2004-07-10 18:10:49.000000000 -0400
+@@ -206,9 +206,28 @@
+ 
+               # Combine directories and files to one listing
+               my @listing;
+-              push (@listing, @directories);
+-              push (@listing, @files);
+-              push (@listing, @downloadable_files);
++              if (!defined($r->dir_config('GallerySortReverse'))
++                  || $r->dir_config('GallerySortReverse') eq '0') {
++                  push (@listing, @directories);
++                  push (@listing, @files);
++                  push (@listing, @downloadable_files);
++              } else {
++                  if ($r->dir_config('GallerySortReverse') & 1) {
++                      push (@listing, reverse @directories);
++                  } else {
++                      push (@listing, @directories);
++                  }
++                  if ($r->dir_config('GallerySortReverse') & 2) {
++                      push (@listing, reverse @files);
++                  } else {
++                      push (@listing, @files);
++                  }
++                  if ($r->dir_config('GallerySortReverse') & 4) {
++                      push (@listing, reverse @downloadable_files);
++                  } else {
++                      push (@listing, @downloadable_files);
++                  }
++              }
+               
+               if (@listing) {
+ 
+@@ -272,7 +291,7 @@
                                if (-d $thumbfilename) {
                                        my $dirtitle = '';
                                        if (-e $thumbfilename . ".folder") {
@@ -14,7 +43,7 @@
                                        }
  
                                        $tpl->assign(FILEURL => uri_escape($fileurl, $escape_rule), FILE => ($dirtitle ? $dirtitle : $file));
-@@ -1041,6 +1041,7 @@
+@@ -1041,6 +1060,7 @@
  
  sub get_filecontent {
        my $file = shift;
@@ -22,7 +51,7 @@
        open(FH, $file) or return undef;
        my $content = '';
        {
-@@ -1048,6 +1049,7 @@
+@@ -1048,6 +1068,7 @@
        $content = <FH>;
        }
        close(FH);
@@ -30,7 +59,7 @@
        return $content;
  }
  
-@@ -1145,7 +1147,7 @@
+@@ -1145,7 +1166,7 @@
                        $dirname = File::Spec->catdir($dirname, $link);
  
                        if (-e $dirname . ".folder") {



Home | Main Index | Thread Index | Old Index