trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject svn commit: r1030758 - in /trafficserver/site/branches/ats-cms/lib: path.pm view.pm
Date Wed, 03 Nov 2010 23:28:15 GMT
Author: igalic
Date: Wed Nov  3 23:28:14 2010
New Revision: 1030758

URL: http://svn.apache.org/viewvc?rev=1030758&view=rev
Log:
This Perl looks awfull. I don't know if it'll work.

Modified:
    trafficserver/site/branches/ats-cms/lib/path.pm
    trafficserver/site/branches/ats-cms/lib/view.pm

Modified: trafficserver/site/branches/ats-cms/lib/path.pm
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/lib/path.pm?rev=1030758&r1=1030757&r2=1030758&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/lib/path.pm (original)
+++ trafficserver/site/branches/ats-cms/lib/path.pm Wed Nov  3 23:28:14 2010
@@ -7,31 +7,18 @@ our @patterns = (
 
     [qr!^/index\.html$!, news_page =>
       {
-        svn      => ASF::Value::SVN->new(limit => 5),
-        jira     => ASF::Value::Jira->new(limit => 5,
-                                          url => "http://s.apache.org/q4"),
-        announce => ASF::Value::Mail->new(list => 'announce@apache.org',
-                                          limit => 5),
-        planet   => ASF::Value::Blogs->new(blog => "planet", limit=> 5),
-        blog     => ASF::Value::Blogs->new(blog => "foundation", limit=> 5),
-        twitter  => ASF::Value::Twitter->new(name => 'TheASF', limit => 5),
+        blog     => ASF::Value::Blogs->new(blog => "trafficserver", limit=> 5),
       },
     ],
 
     [qr!^/dev/index\.html$!, news_page =>
       {
-        svn      => ASF::Value::SVN->new(limit => 5),
-        twitter  => ASF::Value::Twitter->new(name=>"infrabot", limit => 5),
-        blog     => ASF::Value::Blogs->new(blog => "infra", limit=> 5),
+        blog     => ASF::Value::Blogs->new(blog => "trafficserver", limit=> 5),
         jira     => ASF::Value::Jira->new(limit => 5,
                                           url => "http://s.apache.org/lg"),
       },
     ],
 
-    [qr!^/dev/sitemap\.html$!, sitemap => { headers => { title => "Developer Sitemap"
}} ],
-
-    [qr!^/licenses/exports/index\.html$!, exports => {} ],
-
     [qr!\.mdtext$!, single_narrative => { template => "single_narrative.html" }],
 );
 
@@ -39,7 +26,6 @@ our @patterns = (
 # for specifying interdependencies between files
 
 our %dependencies = (
-    "/dev/sitemap.html" => [ grep s!^content!!, glob "content/dev/*.mdtext" ],
 );
 
 1;

Modified: trafficserver/site/branches/ats-cms/lib/view.pm
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/lib/view.pm?rev=1030758&r1=1030757&r2=1030758&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/lib/view.pm (original)
+++ trafficserver/site/branches/ats-cms/lib/view.pm Wed Nov  3 23:28:14 2010
@@ -24,7 +24,6 @@ push @Dotiac::DTL::TEMPLATE_DIRS, "templ
 # passed to the template in the "bar" (hash)
 # variable.
 
-# foo.en.mdtext and foo.ch.mdtext -> foo.html.en, 
 sub single_narrative {
     my %args = @_;
     my $file = "content$args{path}";
@@ -34,8 +33,6 @@ sub single_narrative {
 
     read_text_file $file, \%args;
 
-    # pre process $args{content} to include language links.
-
     my $page_path = $file;
     $page_path =~ s/\.[^.]+$/.page/;
     if (-d $page_path) {
@@ -43,6 +40,12 @@ sub single_narrative {
             $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
             $args{$1} = {};
             read_text_file $f, $args{$1};
+	    # pre process $args{content} to include language links.
+	    $f =~ s/.+?\.([^.]+)\.mdtext/$1/;
+	    $fl = glob "$f*";
+	    $fl =~ s/.+?\.([^.]+)\.mdtext/ [$1]($1) |/g;
+	    chop $fl;
+	    $args{content} =~ s/\[LANG\]/$fl/;
         }
     }
 



Mime
View raw message