Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64641 - in website/public_html/live: . common common/code development doc doc/libs/common doc/libs/common/doc doc/libs/common/doc/src feed/history
From: daniel_james_at_[hidden]
Date: 2010-08-06 10:46:12


Author: danieljames
Date: 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
New Revision: 64641
URL: http://svn.boost.org/trac/boost/changeset/64641

Log:
Revert links to sourceforge, and merge from beta.

Merging new documentation display developments, including unzipped files and improved http headers.

Added:
   website/public_html/live/doc/libs/common/
      - copied from r63455, /website/public_html/beta/doc/libs/common/
   website/public_html/live/doc/libs/common/doc/
      - copied from r63455, /website/public_html/beta/doc/libs/common/doc/
   website/public_html/live/doc/libs/common/doc/src/
      - copied from r63455, /website/public_html/beta/doc/libs/common/doc/src/
   website/public_html/live/doc/libs/common/doc/src/boostbook.css
      - copied unchanged from r63455, /website/public_html/beta/doc/libs/common/doc/src/boostbook.css
   website/public_html/live/doc/libs/common/doc/src/docutils.css
      - copied unchanged from r63455, /website/public_html/beta/doc/libs/common/doc/src/docutils.css
   website/public_html/live/doc/libs/common/doc/src/minimal.css
      - copied unchanged from r63455, /website/public_html/beta/doc/libs/common/doc/src/minimal.css
   website/public_html/live/doc/libs/common/doc/src/reference.css
      - copied unchanged from r63455, /website/public_html/beta/doc/libs/common/doc/src/reference.css
   website/public_html/live/feed/history/boost_1_44_0.qbk
      - copied unchanged from r61891, /website/public_html/beta/feed/history/boost_1_44_0.qbk
Properties modified:
   website/public_html/live/ (props changed)
   website/public_html/live/doc/.htaccess (contents, props changed)
Binary files modified:
   website/public_html/live/favicon.ico
Text files modified:
   website/public_html/live/.htaccess | 14
   website/public_html/live/common/code/boost_archive.php | 426 +++++++++++++++++++++++++++++++--------
   website/public_html/live/common/menu-development.html | 2
   website/public_html/live/common/menu-doc.html | 68 +++++
   website/public_html/live/common/menu-welcome.html | 2
   website/public_html/live/development/testing_results.php | 1
   website/public_html/live/doc/.htaccess | 8
   website/public_html/live/doc/display_build.php | 2
   website/public_html/live/doc/display_jam.php | 2
   website/public_html/live/doc/display_libs.php | 3
   website/public_html/live/doc/libraries.php | 2
   website/public_html/live/index.php | 2
   12 files changed, 411 insertions(+), 121 deletions(-)

Modified: website/public_html/live/.htaccess
==============================================================================
--- website/public_html/live/.htaccess (original)
+++ website/public_html/live/.htaccess 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -39,8 +39,8 @@
 
 ########## Shorter names for URL that must be printed during build process
 
-RewriteRule ^getting_started_unix.html http://boost-sandbox.sourceforge.net/boost_1_43_0/more/getting_started/unix-variants.html
-RewriteRule ^getting_starged_windows.html http://boost-sandbox.sourceforge.net/boost_1_43_0/more/getting_started/windows.html
+RewriteRule ^getting_started_unix.html doc/libs/release/more/getting_started/unix-variants.html
+RewriteRule ^getting_starged_windows.html doc/libs/release/more/getting_started/windows.html
 
 ########## Rewrite old site links to new locations.
 
@@ -50,7 +50,7 @@
 # before *any* rewrite rules are checked. Which is just nasty!!
 RewriteRule ^boost([.]png)?/(.*) doc/libs/release/boost/$2 [R=permanent,L]
 # The libs subdirs
-RewriteRule ^libs(/.*)?$ http://boost-sandbox.sourceforge.net/boost_1_43_0/libs$1 [R=permanent,L]
+RewriteRule ^libs(/.*)?$ doc/libs/release/libs$1 [R=permanent,L]
 # The people pages
 RewriteRule ^people/people.htm users/people.html [R=permanent,L]
 RewriteRule ^people/?$ users/people.html [R=permanent,L]
@@ -58,7 +58,7 @@
 # The status pages, all go to the testing intro
 RewriteRule ^status(.*) development/testing.html [R=permanent,L]
 # The tools pages (todo)
-RewriteRule ^tools(/.*)?$ http://boost-sandbox.sourceforge.net/boost_1_43_0/tools$1 [R=permanent,L]
+RewriteRule ^tools(/.*)?$ doc/tools$1 [R=permanent,L]
 # The wiki
 RewriteRule ^wiki/?$ http://svn.boost.org/trac/boost [R,L]
 # The various extra docs, in more subdir.
@@ -76,8 +76,8 @@
 RewriteRule ^more/formal_review_schedule.html community/review_schedule.html [R=permanent,L]
 RewriteRule ^more/generic_exception_safety.html community/exception_safety.html [R=permanent,L]
 RewriteRule ^more/generic_programming.html community/generic_programming.html [R=permanent,L]
-RewriteRule ^more/getting_started/(.*) http://boost-sandbox.sourceforge.net/boost_1_43_0/more/getting_started/$1 [R=permanent,L]
-RewriteRule ^more/getting_started(\.html)? http://boost-sandbox.sourceforge.net/boost_1_43_0/more/getting_started/index.html [R=permanent,L]
+RewriteRule ^more/getting_started/(.*) doc/libs/release/more/getting_started/$1 [R=permanent,L]
+RewriteRule ^more/getting_started(\.html)? doc/libs/release/more/getting_started/index.html [R=permanent,L]
 RewriteRule ^more/headers?.htm development/header.html [R=permanent,L]
 RewriteRule ^more/imp_vars.htm community/implementation_variations.html [R=permanent,L]
 RewriteRule ^more/int_const_guidelines.htm development/int_const_guidelines.html [R=permanent,L]
@@ -99,7 +99,7 @@
 RewriteRule ^more/test_policy.htm development/test.html [R=permanent,L]
 RewriteRule ^more/updating_the_website.html development/website_updating.html [R=permanent,L]
 RewriteRule ^more/version_history.html users/history/ [R=permanent,L]
-RewriteRule ^more/writingdoc/(.*) http://boost-sandbox.sourceforge.net/boost_1_43_0/more/writingdoc/$1 [R=permanent,L]
+RewriteRule ^more/writingdoc/(.*) doc/libs/release/more/writingdoc/$1 [R=permanent,L]
 RewriteRule ^more(/.*)?$ users/index.html [R=permanent,L]
 # The license file. (This link was never correct, but it's common enough to require a redirect).
 RewriteRule ^LICENSE-1.0$ LICENSE_1_0.txt [R=permanent,L]

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 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -10,6 +10,7 @@
     $pattern,
     $vpath,
     $archive_subdir = true,
+ $zipfile = true,
     $archive_dir = ARCHIVE_DIR,
     $archive_file_prefix = ARCHIVE_FILE_PREFIX)
 {
@@ -19,30 +20,38 @@
     $version = $path_parts[1];
     $key = $path_parts[2];
 
+ $file = ($zipfile ? '' : $archive_dir . '/');
+
     if ($archive_subdir)
     {
- $file = $archive_file_prefix . $version . '/' . $key;
+ $file = $file . $archive_file_prefix . $version . '/' . $key;
     }
     else
     {
- $file = $archive_file_prefix . $key;
+ $file = $file . $archive_file_prefix . $key;
     }
 
- $archive = str_replace('\\','/', $archive_dir . '/' . $version . '.zip');
+ $archive = $zipfile ? str_replace('\\','/', $archive_dir . '/' . $version . '.zip') : Null;
     
     return array(
         'version' => $version,
         'key' => $key,
         'file' => $file,
- 'archive' => $archive
+ 'archive' => $archive,
+ 'zipfile' => $zipfile
     );
 }
 
 function display_from_archive(
- $archive_location_details,
+ $params,
     $content_map = array(),
     $override_extractor = null)
 {
+ $params['template'] = dirname(__FILE__)."/template.php";
+ $params['title'] = NULL;
+ $params['charset'] = NULL;
+ $params['content'] = NULL;
+
     $info_map = array_merge($content_map, array(
         array('@.*@','@[.](txt|py|rst|jam|v2|bat|sh|xml|qbk)$@i','text','text/plain'),
         array('@.*@','@[.](c|h|cpp|hpp)$@i','cpp','text/plain'),
@@ -63,7 +72,7 @@
 
     foreach ($info_map as $i)
     {
- if (preg_match($i[1],$archive_location_details['key']))
+ if (preg_match($i[1],$params['key']))
         {
             $extractor = $i[2];
             $type = $i[3];
@@ -75,69 +84,127 @@
     if ($override_extractor) $extractor = $override_extractor;
 
     if (!$extractor) {
- file_not_found($archive_location_details['file']);
+ file_not_found($params);
         return;
     }
 
- $unzip =
- UNZIP
- .' -p '.escapeshellarg($archive_location_details['archive'])
- .' '.escapeshellarg($archive_location_details['file']);
+ // Check zipfile.
 
- if($extractor == 'raw') {
- display_raw_file($unzip, $type);
- return;
+ $check_file = $params['zipfile'] ? $params['archive'] : $params['file'];
+
+ if (!is_file($check_file)) {
+ file_not_found($params,
+ $params['zipfile'] ?
+ 'Unable to find zipfile.' :
+ 'Unable to find file.');
+ return;
     }
 
- $archive = new boost_archive();
- $archive->key_ = $archive_location_details['key'];
+ $last_modified = max(
+ strtotime("Sun, 11 Jul 2010 18:55:24 +0100"),
+ filemtime($check_file));
 
- // Note: this sets $archive->content_ with either the content or an error
- // message:
- if(!extract_file($unzip, $archive->content_)) {
- file_not_found($archive_location_details['file'], $archive->content_);
+ if (!conditional_get($last_modified))
         return;
+
+ // Extract the file from the zipfile
+
+ if ($params['zipfile'])
+ {
+ $unzip =
+ UNZIP
+ .' -p '.escapeshellarg($params['archive'])
+ .' '.escapeshellarg($params['file']);
+
+ if($extractor == 'raw') {
+ display_raw_file($unzip, $type);
+ return;
+ }
+
+ // Note: this sets $params['content'] with either the content or an error
+ // message:
+ if(!extract_file($unzip, $params['content'])) {
+ file_not_found($params, $params['content']);
+ return;
+ }
     }
+ else
+ {
+ if($extractor == 'raw') {
+ display_unzipped_file($params['file'], $type);
+ return;
+ }
 
+ // Note: this sets $params['content'] with either the content or an error
+ // message:
+ if(!extract_unzipped_file($params['file'], $params['content'])) {
+ file_not_found($params, $params['content']);
+ return;
+ }
+ }
+
     if($type == 'text/html') {
- if(html_headers($archive->content_)) {
- echo $archive->content_;
- exit(0);
+ if(html_headers($params['content'])) {
+ if($_SERVER['REQUEST_METHOD'] != 'HEAD') echo $params['content'];
+ return;
         }
     }
 
+ if($_SERVER['REQUEST_METHOD'] == 'HEAD') return;
+
     if ($preprocess) {
- $archive->content_ = call_user_func($preprocess, $archive->content_);
+ $params['content'] = call_user_func($preprocess, $params['content']);
     }
     
- $extractor_name = $extractor.'_filter';
- call_user_func($extractor_name, $archive);
+ echo_filtered($extractor, $params);
 }
 
-class boost_archive
-{
- var $key_ = NULL;
- var $title_ = NULL;
- var $charset_ = NULL;
- var $content_ = NULL;
+function conditional_get($last_modified) {
+ if(!$last_modified) return true;
+
+ $last_modified_text = date(DATE_RFC2822, $last_modified);
+ $etag = '"'.md5($last_modified).'"';
+
+ header("Last-Modified: $last_modified_text");
+ header("ETag: $etag");
+
+ $checked = false;
+
+ if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
+ $checked = true;
+ $if_modified_since = strtotime(stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']));
+ if(!$if_modified_since || $if_modified_since < $last_modified)
+ return true;
+ }
+
+ if(isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
+ $checked = true;
+ if(stripslashes($_SERVER['HTTP_IF_NONE_MATCH'] != $etag))
+ return true;
+ }
+
+ if(!$checked) return true;
+
+ header($_SERVER["SERVER_PROTOCOL"].' 304 Not Modified');
+ return false;
 }
 
 class boost_archive_render_callbacks {
- var $content_callback, $archive;
+ var $content_callback, $params;
     
- function boost_archive_render_callbacks($content, $archive) {
+ function boost_archive_render_callbacks($content, $params) {
         $this->content_callback = $content;
- $this->archive = $archive;
+ $this->archive = $params;
     }
 
     function content_head()
     {
- $charset = $this->archive->charset_ ? $this->archive->charset_ : 'us-ascii';
- $title = $this->archive->title_ ? 'Boost C++ Libraries - '.$this->archive->title_ : 'Boost C++ Libraries';
+ $charset = $this->archive['charset'] ? $this->archive['charset'] : 'us-ascii';
+ $title = $this->archive['title'] ? 'Boost C++ Libraries - '.$this->archive['title'] : 'Boost C++ Libraries';
 
         print <<<HTML
- <meta http-equiv="Content-Type" content="text/html; charset=${charset}" />
- <title>${title}</title>
+<meta http-equiv="Content-Type" content="text/html; charset=${charset}" />
+<title>${title}</title>
 HTML;
     }
     
@@ -152,6 +219,22 @@
 
 function display_raw_file($unzip, $type) {
     header('Content-type: '.$type);
+ switch($type) {
+ case 'image/png':
+ case 'image/gif':
+ case 'image/jpeg':
+ case 'text/css':
+ case 'application/x-javascript':
+ case 'application/pdf':
+ case 'application/xml-dtd':
+ header('Expires: '.date(DATE_RFC2822, strtotime("+1 year")));
+ header('Cache-Control: max-age=31556926'); // A year, give or take a day.
+ }
+
+ // Since we're not returning a HTTP error for non-existant files,
+ // might as well not bother checking for the file
+ if($_SERVER['REQUEST_METHOD'] == 'HEAD') return;
+
     ## header('Content-Disposition: attachment; filename="downloaded.pdf"');
     $file_handle = popen($unzip,'rb');
     fpassthru($file_handle);
@@ -164,6 +247,34 @@
         echo 'Error extracting file: '.unzip_error($exit_status);
 };
 
+function display_unzipped_file($file, $type) {
+ header('Content-type: '.$type);
+ switch($type) {
+ case 'image/png':
+ case 'image/gif':
+ case 'image/jpeg':
+ case 'text/css':
+ case 'application/x-javascript':
+ case 'application/pdf':
+ case 'application/xml-dtd':
+ header('Expires: '.date(DATE_RFC2822, strtotime("+1 year")));
+ header('Cache-Control: max-age=31556926'); // A year, give or take a day.
+ }
+
+ // Since we're not returning a HTTP error for non-existant files,
+ // might as well not bother checking for the file
+ if($_SERVER['REQUEST_METHOD'] == 'HEAD') return;
+
+ ## header('Content-Disposition: attachment; filename="downloaded.pdf"');
+ $file_handle = fopen($file,'rb');
+ // TODO: Check $file_handle (should be okay, because already checked for file).
+ fpassthru($file_handle);
+ $exit_status = fclose($file_handle);
+
+ // TODO: What if !$exit_status?
+};
+
+
 function extract_file($unzip, &$content) {
     $file_handle = popen($unzip,'r');
     $text = '';
@@ -182,58 +293,80 @@
     }
 }
 
+function extract_unzipped_file($file, &$content) {
+ $file_handle = fopen($file,'r');
+
+ if($file_handle === FALSE) {
+ $content = null;
+ return false;
+ }
+
+ $text = '';
+ while ($file_handle && !feof($file_handle)) {
+ $text .= fread($file_handle,8*1024);
+ }
+ $exit_status = fclose($file_handle);
+
+ if($exit_status) {
+ $content = $text;
+ return true;
+ }
+ else {
+ $content = null;
+ return false;
+ }
+}
+
+
 //
 // Filters
 //
 
-function text_filter($archive)
+function echo_filtered($extractor, $params) {
+ $extractor_name = $extractor.'_filter';
+ call_user_func($extractor_name, $params);
+}
+
+function text_filter($params)
 {
- $archive->title_ = htmlentities($archive->key_);
+ $params['title'] = htmlentities($params['key']);
 
- display_template(new boost_archive_render_callbacks('text_filter_content', $archive));
+ display_template($params['template'],
+ new boost_archive_render_callbacks('text_filter_content', $params));
 }
 
-function text_filter_content($archive)
+function text_filter_content($params)
 {
- print "<h3>".htmlentities($archive->key_)."</h3>\n";
+ print "<h3>".htmlentities($params['key'])."</h3>\n";
     print "<pre>\n";
- print htmlentities($archive->content_);
+ print_encoded_text($params, 'text');
     print "</pre>\n";
 }
 
-function cpp_filter($archive) {
- $archive->title_ = htmlentities($archive->key_);
+function cpp_filter($params) {
+ $params['title'] = htmlentities($params['key']);
 
- display_template(new boost_archive_render_callbacks('cpp_filter_content', $archive));
+ display_template($params['template'],
+ new boost_archive_render_callbacks('cpp_filter_content', $params));
 }
 
-function cpp_filter_content($archive)
+function cpp_filter_content($params)
 {
- $text = htmlentities($archive->content_);
-
- print "<h3>".htmlentities($archive->key_)."</h3>\n";
+ print "<h3>".htmlentities($params['key'])."</h3>\n";
     print "<pre>\n";
- $root = dirname(preg_replace('@([^/]+/)@','../',$archive->key_));
- $text = preg_replace(
- '@(#[ ]*include[ ]+&lt;)(boost[^&]+)@Ssm',
- '${1}${2}',
- $text );
- $text = preg_replace(
- '@(#[ ]*include[ ]+&quot;)(boost[^&]+)@Ssm',
- '${1}${2}',
- $text );
- print $text;
+ print_encoded_text($params, 'cpp');
     print "</pre>\n";
 }
 
-function boost_book_html_filter($archive) {
- html_init($archive);
- display_template(new boost_archive_render_callbacks('boost_book_html_filter_content', $archive));
+function boost_book_html_filter($params) {
+ html_init($params);
+ display_template($params['template'],
+ new boost_archive_render_callbacks('boost_book_html_filter_content', $params));
 }
 
-function boost_book_html_filter_content($archive)
+function boost_book_html_filter_content($params)
 {
- $text = prepare_html($archive->content_);
+ $text = prepare_html($params['content']);
     
     $text = substr($text,strpos($text,'<div class="spirit-nav">'));
     $text = substr($text,0,strpos($text,'</body>'));
@@ -256,36 +389,38 @@
     print $text;
 }
 
-function boost_libs_filter($archive)
+function boost_libs_filter($params)
 {
- html_init($archive);
- $text = extract_html_body($archive->content_);
+ html_init($params);
+ $text = extract_html_body($params['content']);
     if($text) {
         $text = prepare_html($text);
         $text = remove_html_banner($text);
         $text = prepare_themed_html($text);
- $archive->content_ = $text;
+ $params['content'] = $text;
         
- display_template(new boost_archive_render_callbacks('boost_libs_filter_content', $archive));
+ display_template($params['template'],
+ new boost_archive_render_callbacks('boost_libs_filter_content', $params));
     }
     else {
- print $archive->content_;
+ print $params['content'];
     }
 }
 
-function boost_libs_filter_content($archive)
+function boost_libs_filter_content($params)
 {
- return $archive->content_;
+ return $params['content'];
 }
 
-function boost_frame1_filter($archive) {
- html_init($archive);
- display_template(new boost_archive_render_callbacks(new boost_frame1_filter_content, $archive));
+function boost_frame1_filter($params) {
+ html_init($params);
+ display_template($params['template'],
+ new boost_archive_render_callbacks(new boost_frame1_filter_content, $params));
 }
 
-function boost_frame1_filter_content($archive)
+function boost_frame1_filter_content($params)
 {
- $text = prepare_html($archive->content_);
+ $text = prepare_html($params['content']);
     
     $text = substr($text,strpos($text,'<div class="spirit-nav">'));
     $text = substr($text,0,strpos($text,'</body>'));
@@ -305,14 +440,14 @@
     print $text;
 }
 
-function simple_filter($archive)
+function simple_filter($params)
 {
- print prepare_html($archive->content_);
+ print prepare_html($params['content']);
 }
 
-function basic_filter($archive)
+function basic_filter($params)
 {
- $text = prepare_html($archive->content_);
+ $text = prepare_html($params['content']);
     $text = remove_html_banner($text);
 
     $is_xhtml = preg_match('@<!DOCTYPE[^>]*xhtml_at_i', $text);
@@ -351,10 +486,19 @@
 
 /* File Not Found */
 
-function file_not_found($file, $message = null)
+function file_not_found($params, $message = null)
 {
- header("HTTP/1.0 404 Not Found");
- display_template(new file_not_found_render_callbacks($file, $message));
+ if(is_string($params)) {
+ $params = Array(
+ 'file' => $params,
+ 'template' => dirname(__FILE__)."/template.php"
+ );
+ }
+
+ header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
+ display_template($params['template'],
+ new file_not_found_render_callbacks($params['file'],
+ $params['zipfile'] ? "Unzip error: $message" : $message));
 }
 
 class file_not_found_render_callbacks
@@ -378,7 +522,7 @@
     {
         print '<h1>404 Not Found</h1><p>File "' . $this->file . '" not found.</p>';
         if($this->message) {
- print '<p>Unzip error: '.htmlentities($this->message).'</p>';
+ print '<p>'.htmlentities($this->message).'</p>';
         }
     }
 }
@@ -425,18 +569,18 @@
     return $url['scheme'].'://'.$url['host'] . $url['path'];
 }
 
-function html_init($archive)
+function html_init($params)
 {
- preg_match('@text/html; charset=([^\s"\']+)@i',$archive->content_,$charset);
+ preg_match('@text/html; charset=([^\s"\']+)@i',$params['content'],$charset);
     if (isset($charset[1]))
     {
- $archive->charset_ = $charset[1];
+ $params['charset'] = $charset[1];
     }
     
- preg_match('@<title>([^<]+)</title>@i',$archive->content_,$title);
+ preg_match('@<title>([^<]+)</title>@i',$params['content'],$title);
     if (isset($title[1]))
     {
- $archive->title_ = $title[1];
+ $params['title'] = $title[1];
     }
 }
 
@@ -649,11 +793,103 @@
     return $text;
 }
 
+// This takes a plain text file and outputs encoded html with marked
+// up links.
+
+function print_encoded_text($params, $type) {
+ $root = dirname(preg_replace('@([^/]+/)@','../',$params['key']));
+
+ // John Gruber's regular expression for finding urls
+ // http://daringfireball.net/2009/11/liberal_regex_for_matching_urls
+
+ foreach(preg_split(
+ '@\b((?:[\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|[^[:punct:]\s]|/))@',
+ $params['content'], -1, PREG_SPLIT_DELIM_CAPTURE)
+ as $index => $part)
+ {
+ if($index % 2 == 0) {
+ $html = htmlentities($part);
+
+ if($type == 'cpp') {
+ $html = preg_replace(
+ '@(#[ ]*include[ ]+&lt;)(boost[^&]+)@Ssm',
+ '${1}${2}',
+ $html );
+ $html = preg_replace(
+ '@(#[ ]*include[ ]+&quot;)(boost[^&]+)@Ssm',
+ '${1}${2}',
+ $html );
+ }
+
+ print $html;
+ }
+ else {
+ $url = process_absolute_url($part, $root);
+ if($url) {
+ print ''.htmlentities($part).'';
+ }
+ else {
+ print htmlentities($part);
+ }
+ }
+ }
+}
+
+function process_absolute_url($url, $root = null) {
+ // Simplified version of the 'loose' regular expression from
+ // http://blog.stevenlevithan.com/archives/parseuri
+ //
+ // (c) Steven Levithan <stevenlevithan.com>
+ // MIT License
+
+ if(!preg_match(
+ '~^'.
+ // Protocol(1): (Could also remove the userinfo detection stuff?)
+ '(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?'.
+ '(?:\/\/)?'.
+ // Authority(2)
+ '('.
+ // User info
+ '(?:[^:@]*:?[^:@]*@)?'.
+ // Host(3)
+ '([^:\/?#]*)'.
+ // Port
+ '(?::\d*)?'.
+ ')'.
+ // Relative(4)
+ '(\/.*)'.
+ '~',
+ $url, $matches))
+ {
+ return;
+ }
+
+ $protocol = $matches[1];
+ $authority = $matches[2];
+ $host = $matches[3];
+ $relative = $matches[4];
+
+ if(!$authority) return;
+
+ if($root &&
+ ($host == 'boost.org' || $host == 'www.boost.org') &&
+ (strpos($relative, '/lib') === 0))
+ {
+ $url = $root.$relative;
+ }
+ else
+ {
+ $url = ($protocol ? $protocol : 'http').'://'.$authority.$relative;
+ }
+
+ return $url;
+}
+
 // Display the content in the standard boost template
 
-function display_template($callbacks) {
+function display_template($template, $callbacks) {
     $_file = $callbacks;
- include(dirname(__FILE__)."/template.php");
+ include($template);
 }
 
 // Return a readable error message for unzip exit state.

Modified: website/public_html/live/common/menu-development.html
==============================================================================
--- website/public_html/live/common/menu-development.html (original)
+++ website/public_html/live/common/menu-development.html 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -64,7 +64,7 @@
         <li><a href="/development/design_faq.html">Design FAQ <span class=
         "link">&gt;</span></a></li>
 
- <li><a href="/development/webcheck">Self Check <span class=
+ <li><a href="/development/webcheck/index.html">Self Check <span class=
         "link">&gt;</span></a></li>
       </ul>
     </li>

Modified: website/public_html/live/common/menu-doc.html
==============================================================================
--- website/public_html/live/common/menu-doc.html (original)
+++ website/public_html/live/common/menu-doc.html 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -1,33 +1,81 @@
- <h4><a href="http://boost-sandbox.sourceforge.net/boost_1_43_0/libs/libraries.htm" class="internal">Documentation <span class=
+ <h4><a href="/doc/" class="internal">Documentation <span class=
   "link">&gt;</span></a></h4>
 
   <ul>
- <li><a href="http://boost-sandbox.sourceforge.net/boost_1_43_0/more/getting_started/">Getting Started
+ <li><a href="/doc/libs/release/more/getting_started/">Getting Started
     <span class="link">&gt;</span></a></li>
 
     <li>
- Tools >
+ Libraries >
 
       <ul>
- <li><a href="http://boost-sandbox.sourceforge.net/boost_1_43_0/tools/build/index.html">Boost Build <span class=
+ <li><a href="/doc/libs/1_43_0/">1.43.0 - Current Release <span class=
         "link">&gt;</span></a></li>
 
- <li><a href="http://boost-sandbox.sourceforge.net/boost_1_43_0/tools/jam/index.html">Boost Jam <span class=
+ <li><a href="/doc/libs/1_42_0/">1.42.0 <span class=
         "link">&gt;</span></a></li>
 
- <li><a href="http://boost-sandbox.sourceforge.net/boost_1_43_0/tools/regression/index.html">Regression <span class=
+ <li><a href="/doc/libs/1_41_0/">1.41.0 <span class=
         "link">&gt;</span></a></li>
 
- <li><a href="http://boost-sandbox.sourceforge.net/boost_1_43_0/tools/inspect/index.html">Inspect <span class=
+ <li><a href="/doc/libs/1_40_0/">1.40.0 <span class=
         "link">&gt;</span></a></li>
 
- <li><a href="http://boost-sandbox.sourceforge.net/boost_1_43_0/doc/html/boostbook.html">BoostBook <span class=
+ <li><a href="/doc/libs/1_39_0/">1.39.0 <span class=
         "link">&gt;</span></a></li>
 
- <li><a href="http://boost-sandbox.sourceforge.net/boost_1_43_0/tools/quickbook/index.html">QuickBook <span class=
+ <li><a href="/doc/libs/1_38_0/">1.38.0 <span class=
         "link">&gt;</span></a></li>
 
- <li><a href="http://boost-sandbox.sourceforge.net/boost_1_43_0/tools/bcp/index.html">bcp <span class=
+ <li><a href="/doc/libs/1_37_0/">1.37.0 <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/doc/libs/1_36_0/">1.36.0 <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/doc/libs/1_35_0/">1.35.0 <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/doc/libs/1_34_1/">1.34.1 <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/doc/libs/1_34_0/">1.34.0 <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/doc/libs/1_33_1/">1.33.1 <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/doc/libs/1_32_0/">1.32.0 <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/doc/libs/1_31_0/">1.31.0 <span class=
+ "link">&gt;</span></a></li>
+ </ul>
+ </li>
+
+ <li>
+ Tools >
+
+ <ul>
+ <li><a href="/doc/tools/build/index.html">Boost Build <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/doc/tools/jam/index.html">Boost Jam <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/tools/regression/index.html">Regression <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/tools/inspect/index.html">Inspect <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/doc/html/boostbook.html">BoostBook <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/tools/quickbook/index.html">QuickBook <span class=
+ "link">&gt;</span></a></li>
+
+ <li><a href="/tools/bcp/index.html">bcp <span class=
         "link">&gt;</span></a></li>
 
         <li><a href="/libs/wave/doc/wave_driver.html">Wave <span class=

Modified: website/public_html/live/common/menu-welcome.html
==============================================================================
--- website/public_html/live/common/menu-welcome.html (original)
+++ website/public_html/live/common/menu-welcome.html 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -8,7 +8,7 @@
     <li><a href="/users/download/" class="internal">Download <span class=
     "link">&gt;</span></a></li>
 
- <li>Libraries ></li>
+ <li>Libraries ></li>
 
     <li><a href="/community/groups.html">Mailing Lists <span class=
     "link">&gt;</span></a></li>

Modified: website/public_html/live/development/testing_results.php
==============================================================================
--- website/public_html/live/development/testing_results.php (original)
+++ website/public_html/live/development/testing_results.php 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -5,6 +5,7 @@
   get_archive_location(
     '/^[\/]([^\/]+)[\/](.*)$/',$_SERVER["PATH_INFO"],
     false, // the result zips don't have the tag subdir
+ true, // stored as a zipfile
     RESULTS_DIR
   ),
   array(

Modified: website/public_html/live/doc/.htaccess
==============================================================================
--- website/public_html/live/doc/.htaccess (original)
+++ website/public_html/live/doc/.htaccess 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -2,12 +2,16 @@
 RewriteBase /doc
 
 # Redirect to the canonical URL.
+# TODO: I think this is wrong.
 
-RewriteCond %{HTTP_HOST} ^boost\.org [NC]
-RewriteRule ^.*$ http://www\.boost\.org%{REQUEST_URI} [R=301]
+# RewriteCond %{HTTP_HOST} ^boost\.org [NC]
+# RewriteRule ^.*$ http://www\.boost\.org%{REQUEST_URI} [R=301]
 
 RewriteRule ^html(/.*)?$ libs/release/doc/html$1 [R]
 
+# Always serve up the latest css files.
+RewriteRule ^libs/[^/]*/doc/(?:html|src)/(.*\.css)$ libs/common/doc/src/$1 [L]
+
 # Redirect from symbolic names to current versions.
 RewriteRule ^libs/release(/.*)?$ libs/1_43_0$1 [R]
 RewriteRule ^libs/development(/.*)?$ libs/1_43_0$1 [R]

Modified: website/public_html/live/doc/display_build.php
==============================================================================
--- website/public_html/live/doc/display_build.php (original)
+++ website/public_html/live/doc/display_build.php 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -25,7 +25,7 @@
   get_archive_location(
     '@^[/]([^/]+)[/](.*)$@',
     $_SERVER["PATH_INFO"],
- false
+ false, false
   ),
   array(
   //~ array(version-regex,path-regex,raw|simple|text|cpp|boost_book_html|boost_libs_html,mime-type[,preprocess hook]),

Modified: website/public_html/live/doc/display_jam.php
==============================================================================
--- website/public_html/live/doc/display_jam.php (original)
+++ website/public_html/live/doc/display_jam.php 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -2,7 +2,7 @@
 require_once(dirname(__FILE__) . '/../common/code/boost_archive.php');
 
 display_from_archive(
- get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"]),
+ get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"],true,false),
   array(
   //~ array(version-regex,path-regex,raw|simple|text|cpp|boost_book_html|boost_libs_html,mime-type[,preprocess hook]),
   array('@.*@','@[.](html|htm)$@i','boost_book_html','text/html'),

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 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -33,7 +33,7 @@
     return str_ireplace('</head>', $analytics.'</head>', $content);
 }
 
-$location = get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"]);
+$location = get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"],true,false);
 
 if (boost_future_version($location['version'])) {
     file_not_found($location['file'],
@@ -61,6 +61,7 @@
   array('@.*@','@^libs/system/doc/.*(html|htm)$@i','simple','text/html'),
   array('@.*@','@^libs/numeric/conversion/doc/.*(html|htm)$@i','simple','text/html'),
   array('@.*@','@^libs/optional/doc/.*(html|htm)$@i','simple','text/html'),
+ array('@.*@','@^libs/polygon/doc/.*(html|htm)$@i','simple','text/html'),
   //~ default to processed output for libs and tools
   array('@.*@','@^libs/[^/]+/doc/html/.*(html|htm)$@i','basic','text/html'),
   array('@.*@','@^libs/[^/]+/doc/[^/]+/html/.*(html|htm)$@i','basic','text/html'),

Modified: website/public_html/live/doc/libraries.php
==============================================================================
--- website/public_html/live/doc/libraries.php (original)
+++ website/public_html/live/doc/libraries.php 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -97,7 +97,7 @@
     else
     {
       global $boost_current_version;
- $docref = '/doc/libs/'.implode('_', $boost_current_version).'/'.$lib['documentation'];
+ $docref = '/doc/libs/release/'.$lib['documentation'];
     }
     print ''.($lib['name'] ? $lib['name'] : $lib['key']).'';
   }

Modified: website/public_html/live/favicon.ico
==============================================================================
Binary files. No diff available.

Modified: website/public_html/live/index.php
==============================================================================
--- website/public_html/live/index.php (original)
+++ website/public_html/live/index.php 2010-08-06 10:46:09 EDT (Fri, 06 Aug 2010)
@@ -69,7 +69,7 @@
                   <p class="note"><span class="note-body">Boost works on
                   almost any modern operating system, including UNIX and
                   Windows variants. Follow the <a href=
- "http://boost-sandbox.sourceforge.net/boost_1_43_0/more/getting_started/index.html">Getting
+ "/doc/libs/release/more/getting_started/index.html">Getting
                   Started Guide</a> to download and install Boost. Popular
                   Linux and Unix distributions such as <a href=
                   "http://fedoraproject.org/" class="external">Fedora</a>,


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