Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79639 - website/public_html/beta/common/code
From: dnljms_at_[hidden]
Date: 2012-07-21 03:20:04


Author: danieljames
Date: 2012-07-21 03:20:04 EDT (Sat, 21 Jul 2012)
New Revision: 79639
URL: http://svn.boost.org/trac/boost/changeset/79639

Log:
Website: Update 'latest_link'.
Text files modified:
   website/public_html/beta/common/code/boost_filters.php | 30 +++++++++++++++++++++---------
   1 files changed, 21 insertions(+), 9 deletions(-)

Modified: website/public_html/beta/common/code/boost_filters.php
==============================================================================
--- website/public_html/beta/common/code/boost_filters.php (original)
+++ website/public_html/beta/common/code/boost_filters.php 2012-07-21 03:20:04 EDT (Sat, 21 Jul 2012)
@@ -122,16 +122,28 @@
 
 function latest_link($params)
 {
- if (strpos($params['version'], 'beta') !== FALSE)
- return;
+ $version = BoostVersion::from($params['version']);
+ if ($version->is_beta()) return;
 
- global $boost_current_version;
- $latest = 'boost_'.implode('_', $boost_current_version);
-
- if ($latest != $params['version'] && is_file(ARCHIVE_DIR."/$latest/$params[key]"))
+ $current = BoostVersion::current();
+ switch ($current->compare($version))
     {
- echo 'This is the documentation for an old version of boost, click '.
- '<a href="/doc/libs/release/'.$params['key'].'">'.
- 'here for the latest version</a>';
+ case 0:
+ break;
+ case 1:
+ if (is_file(ARCHIVE_DIR."/{$current->dir()}/$params[key]"))
+ {
+ echo 'This is the documentation for an old version of boost, click '.
+ '<a href="/doc/libs/release/'.$params['key'].'">'.
+ 'here for the latest version</a>';
+ }
+ else
+ {
+ echo 'This is the documentation for an old version of boost.';
+ }
+ break;
+ case -1:
+ echo 'This is the documentation for an unreleased version of boost';
+ break;
     }
 }


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