Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75681 - in website/public_html/live: . common/code doc
From: dnljms_at_[hidden]
Date: 2011-11-26 14:33:57


Author: danieljames
Date: 2011-11-26 14:33:56 EST (Sat, 26 Nov 2011)
New Revision: 75681
URL: http://svn.boost.org/trac/boost/changeset/75681

Log:
Website: Merge to live.
Properties modified:
   website/public_html/live/ (props changed)
Text files modified:
   website/public_html/live/common/code/boost_archive.php | 9 ++++---
   website/public_html/live/doc/display_libs.php | 44 ++++++++++++++++++++-------------------
   website/public_html/live/sitemap.xml.php | 1
   3 files changed, 29 insertions(+), 25 deletions(-)

Modified: website/public_html/live/common/code/boost_archive.php
==============================================================================
--- website/public_html/live/common/code/boost_archive.php (original)
+++ website/public_html/live/common/code/boost_archive.php 2011-11-26 14:33:56 EST (Sat, 26 Nov 2011)
@@ -150,9 +150,6 @@
             display_raw_file($params, $type);
     }
     else {
- if (!http_headers('text/html', filemtime($check_file), $expires))
- return;
-
         // Read file from hard drive or zipfile
     
         // Note: this sets $params['content'] with either the content or an error
@@ -166,12 +163,16 @@
     
         if($type == 'text/html') {
             if($redirect = detect_redirect($params['content'])) {
+ http_headers('text/html', null, "+1 day");
                 header("Location: $redirect", TRUE, 301);
                 if($_SERVER['REQUEST_METHOD'] != 'HEAD') echo $params['content'];
                 return;
             }
         }
     
+ if (!http_headers('text/html', filemtime($check_file), $expires))
+ return;
+
         // Finally process the file and display it.
     
         if($_SERVER['REQUEST_METHOD'] != 'HEAD') {
@@ -371,7 +372,7 @@
 HTML;
 
     $content = '<h1>404 Not Found</h1><p>File "' . $params['file'] . '" not found.</p><p>';
- if($params['zipfile']) $content .= "Unzip error: ";
+ if(!empty($params['zipfile'])) $content .= "Unzip error: ";
     $content .= htmlentities($message);
     $content .= '</p>';
 

Modified: website/public_html/live/doc/display_libs.php
==============================================================================
--- website/public_html/live/doc/display_libs.php (original)
+++ website/public_html/live/doc/display_libs.php 2011-11-26 14:33:56 EST (Sat, 26 Nov 2011)
@@ -18,27 +18,25 @@
 
 require_once(dirname(__FILE__) . '/../common/code/boost_archive.php');
 
-function boost_future_version($version)
+function boost_compare_version($version)
 {
- if ($version)
+ if ($version && preg_match('@([0-9]+)_([0-9]+)_([0-9]+)@',$version,$vinfo))
     {
- $vinfo = array();
- preg_match('@([0-9]+)_([0-9]+)_([0-9]+)@',$version,$vinfo);
- if (isset($vinfo[0]))
- {
- global $boost_current_version;
- $v = $boost_current_version[0];
- $r = $boost_current_version[1];
- $p = $boost_current_version[2];
- return
- ($v < $vinfo[1]) ||
- ($v == $vinfo[1] && $r < $vinfo[2]) ||
- ($v == $vinfo[1] && $r == $vinfo[2] && $p < $vinfo[3]);
- }
- else
- {
- return FALSE;
- }
+ array_shift($vinfo);
+
+ global $boost_current_version;
+ $v = $boost_current_version[0];
+ $r = $boost_current_version[1];
+ $p = $boost_current_version[2];
+
+ return
+ $v < $vinfo[0] ? 1 :
+ ($v > $vinfo[0] ? -1 :
+ ($r < $vinfo[1] ? 1 :
+ ($r > $vinfo[1] ? -1 :
+ ($p < $vinfo[2] ? 1 :
+ ($p > $vinfo[2] ? -1
+ : 0)))));
     }
     else
     {
@@ -88,7 +86,9 @@
 $beta_docs = strpos($location['version'], 'beta') !== FALSE ||
     strpos($location['version'], 'snapshot') !== FALSE;
 
-if (!$beta_docs && boost_future_version($location['version'])) {
+$compare_version = boost_compare_version($location['version']);
+
+if (!$beta_docs && $compare_version === 1) {
     file_not_found($location['file'],
         "Documentation for this version has not been uploaded yet. ".
         "Documentation is only uploaded when it's fully released, ".
@@ -128,5 +128,7 @@
   //~ the headers are text files displayed in an embeded page
   array('@.*@','@^boost/.*$@i','cpp','text/plain')
   ),
- null, "+1 year"
+ null,
+ $compare_version === -1 ? "+1 year" :
+ ($compare_version === 0 ? "+1 week" : "+1 day")
 );

Modified: website/public_html/live/sitemap.xml.php
==============================================================================
--- website/public_html/live/sitemap.xml.php (original)
+++ website/public_html/live/sitemap.xml.php 2011-11-26 14:33:56 EST (Sat, 26 Nov 2011)
@@ -26,6 +26,7 @@
 <url>
 <loc>$base_url/$loc_xml</loc>
 <priority>1.0</priority>
+<changefreq>daily</changefreq>
 </url>
 
 EOL;


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