You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jo...@apache.org on 2014/03/22 21:25:51 UTC

svn commit: r1580310 - in /thrift/cms-site/trunk/lib: path.pm view.pm

Author: joes
Date: Sat Mar 22 20:25:51 2014
New Revision: 1580310

URL: http://svn.apache.org/r1580310
Log:
offline

Modified:
    thrift/cms-site/trunk/lib/path.pm
    thrift/cms-site/trunk/lib/view.pm

Modified: thrift/cms-site/trunk/lib/path.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/path.pm?rev=1580310&r1=1580309&r2=1580310&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Sat Mar 22 20:25:51 2014
@@ -6,12 +6,14 @@ use warnings;
 my $conf = Load join "", <DATA>;
 
 our @patterns = (
-    [qr!^/sitemap\.html$!, my_sitemap => {
+    [qr!^/sitemap\.html$!, offline => {
+        view       => 'sitemap',
         conf       => $conf,
         headers    => { title => "Sitemap" },
         nest       => 1,
     }],
-    [qr!/index\.html$!,    my_sitemap => {
+    [qr!/index\.html$!,    offline => {
+        view       => 'sitemap',
         conf       => $conf,
         headers    => { title => "Index" }, # "Index" is magical here
     }],

Modified: thrift/cms-site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/view.pm?rev=1580310&r1=1580309&r2=1580310&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/view.pm (original)
+++ thrift/cms-site/trunk/lib/view.pm Sat Mar 22 20:25:51 2014
@@ -2,22 +2,4 @@ package view;
 # see https://svn.apache.org/repos/infra/websites/cms/build/lib/ASF/View.pm
 use base 'ASF::View';
 
-# included for testing purposes
-sub my_memoize {
-    if ($ASF::Value::Offline) {
-        # disable cache
-        my %args = @_;
-        $args{view} = [@{$args{view}}] if ref $args{view};
-        my $view = ref $args{view} ? shift @{$args{view}} : delete $args{view};
-        return view->can($view)->(%args);
-    }
-    &ASF::View::memoize;
-}
-
-# doesn't require snippets
-sub my_sitemap {
-    local $ASF::Value::Offline = 1;
-    &ASF::View::sitemap;
-}
-
 1;