|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79659 - in website/public_html/beta: common/code doc
From: dnljms_at_[hidden]
Date: 2012-07-22 03:21:37
Author: danieljames
Date: 2012-07-22 03:21:36 EDT (Sun, 22 Jul 2012)
New Revision: 79659
URL: http://svn.boost.org/trac/boost/changeset/79659
Log:
Website: Move the expiry date logic into boost_archive.php
Text files modified:
website/public_html/beta/common/code/boost_archive.php | 14 +++++++++++++-
website/public_html/beta/doc/display_libs.php | 8 ++------
2 files changed, 15 insertions(+), 7 deletions(-)
Modified: website/public_html/beta/common/code/boost_archive.php
==============================================================================
--- website/public_html/beta/common/code/boost_archive.php (original)
+++ website/public_html/beta/common/code/boost_archive.php 2012-07-22 03:21:36 EDT (Sun, 22 Jul 2012)
@@ -48,13 +48,25 @@
$params,
$content_map = array(),
$override_extractor = null,
- $expires = null)
+ $extra_settings = array())
{
$params['template'] = dirname(__FILE__)."/template.php";
$params['title'] = NULL;
$params['charset'] = NULL;
$params['content'] = NULL;
+ // Calculate expiry date if requested.
+
+ $expires = null;
+ if (isset($extra_settings['use_http_expire_date']) &&
+ $extra_settings['use_http_expire_date'])
+ {
+ $compare_version = BoostVersion::from($params['version'])->
+ compare(BoostVersion::current());
+ $expires = $compare_version === -1 ? "+1 year" :
+ ($compare_version === 0 ? "+1 week" : "+1 day");
+ }
+
// Check file exists.
if ($params['zipfile'])
Modified: website/public_html/beta/doc/display_libs.php
==============================================================================
--- website/public_html/beta/doc/display_libs.php (original)
+++ website/public_html/beta/doc/display_libs.php 2012-07-22 03:21:36 EDT (Sun, 22 Jul 2012)
@@ -54,11 +54,8 @@
return str_ireplace('</head>', $analytics.'</head>', $content);
}
-$location = get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"],true,false);
-$compare_version = BoostVersion::from($location['version'])->compare(BoostVersion::current());
-
display_from_archive(
- $location,
+ get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"],true,false),
array(
//~ special cases that can't be processed at all (some redirects)
array('@.*@','@^libs/gil/doc/.*(html|htm)$@i','raw','text/html'),
@@ -90,6 +87,5 @@
array('@.*@','@^boost/.*$@i','cpp','text/plain')
),
null,
- $compare_version === -1 ? "+1 year" :
- ($compare_version === 0 ? "+1 week" : "+1 day")
+ array('use_http_expire_date' => true)
);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk