|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62276 - in website/public_html/live: . common/code doc feed/templates
From: daniel_james_at_[hidden]
Date: 2010-05-27 16:51:57
Author: danieljames
Date: 2010-05-27 16:51:56 EDT (Thu, 27 May 2010)
New Revision: 62276
URL: http://svn.boost.org/trac/boost/changeset/62276
Log:
Merge from beta. Improvements to documentation display, use quickbook 1.5 for history template.
Properties modified:
website/public_html/live/ (props changed)
Text files modified:
website/public_html/live/common/code/boost_archive.php | 614 +++++++++++++++++++--------------------
website/public_html/live/common/code/boost_version.php | 31 +
website/public_html/live/doc/display_libs.php | 52 --
website/public_html/live/doc/libraries.php | 3
website/public_html/live/feed/templates/boost_x_xx_x.qbk | 2
5 files changed, 351 insertions(+), 351 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 2010-05-27 16:51:56 EDT (Thu, 27 May 2010)
@@ -41,86 +41,99 @@
function display_from_archive(
$archive_location_details,
$content_map = array(),
- $extractor = null)
+ $override_extractor = null)
{
- $_file = new boost_archive($archive_location_details, $content_map, $extractor);
+ $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'),
+ array('@.*@','@[.]png$@i','raw','image/png'),
+ array('@.*@','@[.]gif$@i','raw','image/gif'),
+ array('@.*@','@[.](jpg|jpeg|jpe)$@i','raw','image/jpeg'),
+ array('@.*@','@[.]css$@i','raw','text/css'),
+ array('@.*@','@[.]js$@i','raw','application/x-javascript'),
+ array('@.*@','@[.]pdf$@i','raw','application/pdf'),
+ array('@.*@','@[.](html|htm)$@i','raw','text/html'),
+ array('@.*@','@[^.](Jamroot|Jamfile|ChangeLog)$@i','text','text/plain'),
+ array('@.*@','@[.]dtd$@i','raw','application/xml-dtd'),
+ ));
+
+ $preprocess = null;
+ $extractor = null;
+ $type = null;
+
+ foreach ($info_map as $i)
+ {
+ if (preg_match($i[1],$archive_location_details['key']))
+ {
+ $extractor = $i[2];
+ $type = $i[3];
+ $preprocess = isset($i[4]) ? $i[4] : NULL;
+ break;
+ }
+ }
+
+ if ($override_extractor) $extractor = $override_extractor;
+
+ if (!$extractor) {
+ file_not_found($archive_location_details['file']);
+ return;
+ }
+
+ $unzip =
+ UNZIP
+ .' -p '.escapeshellarg($archive_location_details['archive'])
+ .' '.escapeshellarg($archive_location_details['file']);
+
+ if($extractor == 'raw') {
+ display_raw_file($unzip, $type);
+ return;
+ }
+
+ $archive = new boost_archive();
+ $archive->key_ = $archive_location_details['key'];
+
+ // 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_);
+ return;
+ }
+
+ if($type == 'text/html') {
+ if(html_headers($archive->content_)) {
+ echo $archive->content_;
+ exit(0);
+ }
+ }
+
+ if ($preprocess) {
+ $archive->content_ = call_user_func($preprocess, $archive->content_);
+ }
+
+ $extractor_name = $extractor.'_filter';
+ call_user_func($extractor_name, $archive);
}
class boost_archive
{
- var $version_ = NULL;
var $key_ = NULL;
- var $file_ = NULL;
- var $archive_ = NULL;
- var $extractor_ = NULL;
- var $extractor_instance_ = NULL;
- var $type_ = NULL;
- var $preprocess_ = NULL;
var $title_ = NULL;
var $charset_ = NULL;
var $content_ = NULL;
-
- function boost_archive(
- $archive_location_details,
- $content_map = array(),
- $extractor = null)
- {
- $this->version_ = $archive_location_details['version'];
- $this->key_ = $archive_location_details['key'];
- $this->file_ = $archive_location_details['file'];
- $this->archive_ = $archive_location_details['archive'];
-
- $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'),
- array('@.*@','@[.]png$@i','raw','image/png'),
- array('@.*@','@[.]gif$@i','raw','image/gif'),
- array('@.*@','@[.](jpg|jpeg|jpe)$@i','raw','image/jpeg'),
- array('@.*@','@[.]css$@i','raw','text/css'),
- array('@.*@','@[.]js$@i','raw','application/x-javascript'),
- array('@.*@','@[.]pdf$@i','raw','application/pdf'),
- array('@.*@','@[.](html|htm)$@i','raw','text/html'),
- array('@.*@','@[^.](Jamroot|Jamfile|ChangeLog)$@i','text','text/plain'),
- array('@.*@','@[.]dtd$@i','raw','application/xml-dtd'),
- ));
-
- foreach ($info_map as $i)
- {
- if (preg_match($i[1],$this->key_))
- {
- $this->extractor_ = $i[2];
- $this->type_ = $i[3];
- $this->preprocess_ = isset($i[4]) ? $i[4] : NULL;
- break;
- }
- }
-
- if ($extractor) $this->extractor_ = $extractor;
- if (!$this->extractor_) $this->extractor_ = 'h404';
-
- $extractor_name = $this->extractor_.'_filter';
- $this->extractor_instance_ = new $extractor_name;
-
- $unzip =
- UNZIP
- .' -p '.escapeshellarg($this->archive_)
- .' '.escapeshellarg($this->file_);
-
- // Note: this can change $this->extractor_instance_:
- $this->content_ = $this->extractor_instance_->extract($this, $unzip);
- $this->extractor_instance_->init($this);
+}
- if ($this->extractor_ != 'h404' && $this->extractor_ != 'raw' && $this->preprocess_) {
- $this->content_ = call_user_func($this->preprocess_, $this->content_);
- }
-
- $this->extractor_instance_->render($this);
- }
+class boost_archive_render_callbacks {
+ var $content_callback, $archive;
+ function boost_archive_render_callbacks($content, $archive) {
+ $this->content_callback = $content;
+ $this->archive = $archive;
+ }
+
function content_head()
{
- $charset = $this->charset_ ? $this->charset_ : 'us-ascii';
- $title = $this->title_ ? 'Boost C++ Libraries - '.$this->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}" />
@@ -130,323 +143,300 @@
function content()
{
- if ($this->extractor_instance_)
+ if ($this->content_callback)
{
- $this->extractor_instance_->content($this);
+ call_user_func($this->content_callback, $this->archive);
}
}
-
- function display_template() {
- $_file = $this;
- include(dirname(__FILE__)."/template.php");
- }
}
-class filter_base
-{
- function extract($archive, $unzip) {}
- function init($archive) {}
- function content($archive) {}
- function render($archive) {}
+function display_raw_file($unzip, $type) {
+ header('Content-type: '.$type);
+ ## header('Content-Disposition: attachment; filename="downloaded.pdf"');
+ $file_handle = popen($unzip,'rb');
+ fpassthru($file_handle);
+ $exit_status = pclose($file_handle);
+
+ // Don't display errors for a corrupt zip file, as we seemd to
+ // be getting them for legitimate files.
+
+ if($exit_status > 3)
+ echo 'Error extracting file: '.unzip_error($exit_status);
};
-class raw_filter extends filter_base
-{
- function extract($archive, $unzip) {
- header('Content-type: '.$archive->type_);
- ## header('Content-Disposition: attachment; filename="downloaded.pdf"');
- $file_handle = popen($unzip,'rb');
- fpassthru($file_handle);
- $exit_status = pclose($file_handle);
-
- // Don't display errors for a corrupt zip file, as we seemd to
- // be getting them for legitimate files.
+function extract_file($unzip, &$content) {
+ $file_handle = popen($unzip,'r');
+ $text = '';
+ while ($file_handle && !feof($file_handle)) {
+ $text .= fread($file_handle,8*1024);
+ }
+ $exit_status = pclose($file_handle);
- if($exit_status > 3)
- echo 'Error extracting file: '.unzip_error($exit_status);
+ if($exit_status == 0) {
+ $content = $text;
+ return true;
}
-};
+ else {
+ $content = strstr($_SERVER['HTTP_HOST'], 'beta') ? unzip_error($exit_status) : null;
+ return false;
+ }
+}
+
+//
+// Filters
+//
-class extract_filter_base extends filter_base
+function text_filter($archive)
{
- function extract($archive, $unzip) {
- $file_handle = popen($unzip,'r');
- $text = '';
- while ($file_handle && !feof($file_handle)) {
- $text .= fread($file_handle,8*1024);
- }
- $exit_status = pclose($file_handle);
+ $archive->title_ = htmlentities($archive->key_);
- if($exit_status == 0) {
- return $text;
- }
- else {
- $archive->extractor_ = 'h404';
- $archive->extractor_instance_ = new h404_filter;
- return strstr($_SERVER['HTTP_HOST'], 'beta')
- ? unzip_error($exit_status) : '';
- }
- }
-};
+ display_template(new boost_archive_render_callbacks('text_filter_content', $archive));
+}
-class text_filter extends extract_filter_base
+function text_filter_content($archive)
{
- function init($archive)
- {
- $archive->title_ = htmlentities($archive->key_);
- }
-
- function content($archive)
- {
- print "<h3>".htmlentities($archive->key_)."</h3>\n";
- print "<pre>\n";
- print htmlentities($archive->content_);
- print "</pre>\n";
- }
+ print "<h3>".htmlentities($archive->key_)."</h3>\n";
+ print "<pre>\n";
+ print htmlentities($archive->content_);
+ print "</pre>\n";
+}
- function render($archive) {
- $archive->display_template();
- }
+function cpp_filter($archive) {
+ $archive->title_ = htmlentities($archive->key_);
+
+ display_template(new boost_archive_render_callbacks('cpp_filter_content', $archive));
}
-class cpp_filter extends extract_filter_base
+function cpp_filter_content($archive)
{
- function init($archive)
- {
- $archive->title_ = htmlentities($archive->key_);
- }
+ $text = htmlentities($archive->content_);
+
+ print "<h3>".htmlentities($archive->key_)."</h3>\n";
+ print "<pre>\n";
+ $root = dirname(preg_replace('@([^/]+/)@','../',$archive->key_));
+ $text = preg_replace(
+ '@(#[ ]*include[ ]+<)(boost[^&]+)@Ssm',
+ '${1}${2}',
+ $text );
+ $text = preg_replace(
+ '@(#[ ]*include[ ]+")(boost[^&]+)@Ssm',
+ '${1}${2}',
+ $text );
+ print $text;
+ print "</pre>\n";
+}
- function content($archive)
- {
- $text = htmlentities($archive->content_);
-
- print "<h3>".htmlentities($archive->key_)."</h3>\n";
- print "<pre>\n";
- $root = dirname(preg_replace('@([^/]+/)@','../',$archive->key_));
- $text = preg_replace(
- '@(#[ ]*include[ ]+<)(boost[^&]+)@Ssm',
- '${1}${2}',
- $text );
+function boost_book_html_filter($archive) {
+ html_init($archive);
+ display_template(new boost_archive_render_callbacks(new boost_book_html_filter_content, $archive));
+}
+
+function boost_book_html_filter_content($archive)
+{
+ $text = prepare_html($archive->content_);
+
+ $text = substr($text,strpos($text,'<div class="spirit-nav">'));
+ $text = substr($text,0,strpos($text,'</body>'));
+ $text = str_replace('<hr>','',$text);
+ $text = str_replace('<table width="100%">','<table class="footer-table">',$text);
+ $text = str_replace('<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%">','<table class="footer-table">',$text);
+ $text = preg_replace(
+ '@[\s]+(border|cellpadding|cellspacing|width|height|valign|frame|rules|naturalsizeflag|background)=[^\s>]+@i',
+ '',
+ $text );
+ ##
+ for ($i = 0; $i < 8; $i++) {
$text = preg_replace(
- '@(#[ ]*include[ ]+")(boost[^&]+)@Ssm',
- '${1}${2}',
+ '@<img src="[\./a-z]*images/(prev|up|home|next|tip|note|warning|important|caution|sidebar|hint|alert)\.png" alt="([^"]+)"([ /]*)>@Ssm',
+ '<img src="/gfx/space.png" alt="${2}" class="${1}_image" />',
$text );
- print $text;
- print "</pre>\n";
- }
-
- function render($archive) {
- $archive->display_template();
}
+ ##
+
+ print $text;
}
-class html_base_filter extends extract_filter_base
+function boost_libs_filter($archive)
{
- function init($archive)
- {
- preg_match('@text/html; charset=([^\s"\']+)@i',$archive->content_,$charset);
- if (isset($charset[1]))
- {
- $archive->charset_ = $charset[1];
- }
+ html_init($archive);
+ $text = extract_html_body($archive->content_);
+ if($text) {
+ $text = prepare_html($text);
+ $text = remove_html_banner($text);
+ $text = prepare_themed_html($text);
+ $archive->content_ = $text;
- preg_match('@<title>([^<]+)</title>@i',$archive->content_,$title);
- if (isset($title[1]))
- {
- $archive->title_ = $title[1];
- }
+ display_template(new boost_archive_render_callbacks('boost_libs_filter_content', $archive));
+ }
+ else {
+ print $archive->content_;
}
}
-class boost_book_html_filter extends html_base_filter
+function boost_libs_filter_content($archive)
{
- function init($archive)
- {
- parent::init($archive);
- }
+ return $archive->content_;
+}
- function content($archive)
- {
- $text = prepare_html($archive->content_);
-
- $text = substr($text,strpos($text,'<div class="spirit-nav">'));
- $text = substr($text,0,strpos($text,'</body>'));
- $text = str_replace('<hr>','',$text);
- $text = str_replace('<table width="100%">','<table class="footer-table">',$text);
- $text = str_replace('<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%">','<table class="footer-table">',$text);
+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_content($archive)
+{
+ $text = prepare_html($archive->content_);
+
+ $text = substr($text,strpos($text,'<div class="spirit-nav">'));
+ $text = substr($text,0,strpos($text,'</body>'));
+ for ($i = 0; $i < 8; $i++) {
$text = preg_replace(
- '@[\s]+(border|cellpadding|cellspacing|width|height|valign|frame|rules|naturalsizeflag|background)=[^\s>]+@i',
- '',
+ '@<img src="[\./]*images/(.*\.png)" alt="(.*)"([ ][/])?>@Ssm',
+ '<img src="/style-v2/css_0/${1}" alt="${2}" />',
$text );
- /* */
- for ($i = 0; $i < 8; $i++) {
- $text = preg_replace(
- '@<img src="[\./a-z]*images/(prev|up|home|next|tip|note|warning|important|caution|sidebar|hint|alert)\.png" alt="([^"]+)"([ /]*)>@Ssm',
- '<img src="/gfx/space.png" alt="${2}" class="${1}_image" />',
- $text );
- }
- /* */
-
- print $text;
}
+ $text = str_replace('<hr>','',$text);
+ $text = str_replace('<table width="100%">','<table class="footer-table">',$text);
+ $text = preg_replace(
+ '@[\s]+(border|cellpadding|cellspacing|width|height|valign|frame|rules|naturalsizeflag|background)=[^\s>]+@i',
+ '',
+ $text );
+
+ print $text;
+}
- function render($archive) {
- $archive->display_template();
- }
+function simple_filter($archive)
+{
+ print prepare_html($archive->content_);
}
-class boost_libs_filter extends html_base_filter
+function basic_filter($archive)
{
- function init($archive)
- {
- parent::init($archive);
- }
+ $text = prepare_html($archive->content_);
+ $text = remove_html_banner($text);
- function content($archive)
- {
- return $archive->content_;
- }
+ $is_xhtml = preg_match('@<!DOCTYPE[^>]*xhtml_at_i', $text);
+ $tag_end = $is_xhtml ? '/>' : '>';
- function render($archive)
- {
- $text = extract_html_body($archive->content_);
- if($text) {
- $text = prepare_html($text);
- $text = remove_html_banner($text);
- $text = prepare_themed_html($text);
- $archive->content_ = $text;
-
- $archive->display_template();
- }
- else {
- print $archive->content_;
+ $sections = preg_split('@(</head>|<body[^>]*>)@i',$text,-1,PREG_SPLIT_DELIM_CAPTURE);
+
+ $body_index = 0;
+ $index = 0;
+ foreach($sections as $section) {
+ if(stripos($section, '<body') === 0) {
+ $body_index = $index;
+ break;
}
+ ++$index;
}
-}
-class boost_frame1_filter extends html_base_filter
-{
- function init($archive)
- {
- parent::init($archive);
+ if(!$body_index) {
+ print($text);
}
-
- function content($archive)
- {
- $text = prepare_html($archive->content_);
-
- $text = substr($text,strpos($text,'<div class="spirit-nav">'));
- $text = substr($text,0,strpos($text,'</body>'));
- for ($i = 0; $i < 8; $i++) {
- $text = preg_replace(
- '@<img src="[\./]*images/(.*\.png)" alt="(.*)"([ ][/])?>@Ssm',
- '<img src="/style-v2/css_0/${1}" alt="${2}" />',
- $text );
+ else {
+ $index = 0;
+ foreach($sections as $section) {
+ print($section);
+ if($index == 0) {
+ print '<link rel="icon" href="/favicon.ico" type="image/ico"'.$tag_end;
+ print '<link rel="stylesheet" type="text/css" href="/style-v2/section-basic.css"'.$tag_end;
+ }
+ else if($index == $body_index) {
+ virtual("/common/heading-doc.html");
+ }
+ ++$index;
}
- $text = str_replace('<hr>','',$text);
- $text = str_replace('<table width="100%">','<table class="footer-table">',$text);
- $text = preg_replace(
- '@[\s]+(border|cellpadding|cellspacing|width|height|valign|frame|rules|naturalsizeflag|background)=[^\s>]+@i',
- '',
- $text );
-
- print $text;
}
+}
- function render($archive) {
- $archive->display_template();
- }
+/* File Not Found */
+
+function file_not_found($file, $message = null)
+{
+ header("HTTP/1.0 404 Not Found");
+ display_template(new file_not_found_render_callbacks($file, $message));
}
-class simple_filter extends html_base_filter
+class file_not_found_render_callbacks
{
- function init($archive)
- {
+ var $file, $message;
+
+ function file_not_found_render_callbacks($file, $message) {
+ $this->file = $file;
+ $this->message = $message;
}
- function content($archive)
+ function content_head()
{
- print prepare_html($archive->content_);
+ print <<<HTML
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+ <title>Boost C++ Libraries - 404 Not Found</title>
+HTML;
}
- function render($archive)
+ function content()
{
- $this->content($archive);
+ print '<h1>404 Not Found</h1><p>File "' . $this->file . '" not found.</p>';
+ if($this->message) {
+ print '<p>Unzip error: '.htmlentities($this->message).'</p>';
+ }
}
}
-class basic_filter extends html_base_filter
+/*
+ * HTML processing functions
+ */
+
+function html_headers($content)
{
- function init($archive)
+ if(preg_match(
+ '@<meta\s+http-equiv\s*=\s*["\']?refresh["\']?\s+content\s*=\s*["\']0;\s*URL=([^"\']*)["\']\s*/?>@i',
+ $content,
+ $redirect))
{
+ header('Location: '.resolve_url($redirect[1]), TRUE, 301);
+ return true;
}
+}
- function content($archive)
- {
- $text = prepare_html($archive->content_);
- $text = remove_html_banner($text);
+// Not a full implementation. Just good enough for redirecting.
+function resolve_url($url) {
+ $url = parse_url($url);
- $is_xhtml = preg_match('@<!DOCTYPE[^>]*xhtml_at_i', $text);
- $tag_end = $is_xhtml ? '/>' : '>';
-
- $sections = preg_split('@(</head>|<body[^>]*>)@i',$text,-1,PREG_SPLIT_DELIM_CAPTURE);
+ if(isset($url['schme'])) return $url;
- $body_index = 0;
- $index = 0;
- foreach($sections as $section) {
- if(stripos($section, '<body') === 0) {
- $body_index = $index;
- break;
- }
- ++$index;
- }
+ $url['scheme'] = 'http'; # Detect other schemes?
- if(!$body_index) {
- print($text);
- }
- else {
- $index = 0;
- foreach($sections as $section) {
- print($section);
- if($index == 0) {
- print '<link rel="icon" href="/favicon.ico" type="image/ico"'.$tag_end;
- print '<link rel="stylesheet" type="text/css" href="/style-v2/section-basic.css"'.$tag_end;
- }
- else if($index == $body_index) {
- virtual("/common/heading-doc.html");
- }
- ++$index;
+ if(!isset($url['host'])) {
+ $url['host'] = $_SERVER['SERVER_NAME'];
+
+ if($url['path'][0] != '/') {
+ $path = explode('/', $_SERVER['REQUEST_URI']);
+ array_pop($path);
+ $rel_path = explode('/', $url['path']);
+ while(isset($rel_path[0]) && $rel_path[0] == '..') {
+ array_pop($path);
+ array_shift($rel_path);
}
+ $url['path'] = implode('/', $path).'/'.implode('/', $rel_path);
}
}
- function render($archive)
- {
- $this->content($archive);
- }
+ return $url['scheme'].'://'.$url['host'] . $url['path'];
}
-class h404_filter extends filter_base
+function html_init($archive)
{
- function init($archive)
+ preg_match('@text/html; charset=([^\s"\']+)@i',$archive->content_,$charset);
+ if (isset($charset[1]))
{
- header("HTTP/1.0 404 Not Found");
+ $archive->charset_ = $charset[1];
}
-
- function content($archive)
+
+ preg_match('@<title>([^<]+)</title>@i',$archive->content_,$title);
+ if (isset($title[1]))
{
- # This might also be an error extracting the file, or because we don't
- # know how to deal with the file. It would be good to give a better
- # error in those cases.
-
- print '<h1>404 Not Found</h1><p>File "' . $archive->file_ . '"not found.</p>';
- if($archive->content_) {
- print '<p>Unzip error: '.htmlentities($archive->content_).'</p>';
- }
- }
-
- function render($archive) {
- $archive->display_template();
+ $archive->title_ = $title[1];
}
}
@@ -659,6 +649,13 @@
return $text;
}
+// Display the content in the standard boost template
+
+function display_template($callbacks) {
+ $_file = $callbacks;
+ include(dirname(__FILE__)."/template.php");
+}
+
// Return a readable error message for unzip exit state.
function unzip_error($exit_status) {
@@ -682,4 +679,5 @@
default: return 'Unknown unzip error code: ' + $exit_status;
}
}
+
?>
Modified: website/public_html/live/common/code/boost_version.php
==============================================================================
--- website/public_html/live/common/code/boost_version.php (original)
+++ website/public_html/live/common/code/boost_version.php 2010-05-27 16:51:56 EDT (Thu, 27 May 2010)
@@ -6,6 +6,8 @@
*/
require_once(dirname(__FILE__) . '/boost.php');
+$boost_current_version = Array(1,43,0);
+
function boost_title()
{
$vinfo = array();
@@ -44,4 +46,31 @@
return TRUE;
}
}
-?>
+
+function boost_future_version($version)
+{
+ if ($version)
+ {
+ $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;
+ }
+ }
+ else
+ {
+ return FALSE;
+ }
+}
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-05-27 16:51:56 EDT (Thu, 27 May 2010)
@@ -1,5 +1,6 @@
<?php
require_once(dirname(__FILE__) . '/../common/code/boost_archive.php');
+require_once(dirname(__FILE__) . '/../common/code/boost_version.php');
function add_spirit_analytics($content) {
if(stripos($content, '_uacct = "UA-11715441-2"') !== FALSE)
@@ -32,56 +33,27 @@
return str_ireplace('</head>', $analytics.'</head>', $content);
}
+$location = get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"]);
+
+if (boost_future_version($location['version'])) {
+ file_not_found($location['file'],
+ "Documentation for this version has not been uploaded yet. ".
+ "Documentation is only uploaded when it's fully released, ".
+ "you can see the documentation for a beta version or snapshot in the download.");
+ return;
+}
+
display_from_archive(
- get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"]),
- array(
- //~ array(version-regex,path-regex,raw|simple|text|cpp|boost_book_html|boost_libs_html,mime-type[,preprocess hook]),
- //~ this handles most of the simple cases of index.htm(l) redirect files
+ $location,
array(
- '@1_('.implode('|',array(
- '34','35',
- )).')_[0-9]@',
- '@^libs/('.implode('|',array(
- 'accumulators','algorithm/string','any','array','asio','assign','bind','bimap',
- 'circular_buffer',
- 'concept_check','config','date_time','date_time/doc','disjoint_sets',
- 'dynamic_bitset','exception','filesystem','foreach','function',
- 'functional/factory','functional/forward','functional/hash',
- 'function_types','fusion','graph','interprocess','intrusive',
- 'io','iostreams','iterator','lambda',
- 'lambda/doc','math','math/doc','mem_fn','mpl',
- 'multi_array','multi_index','numeric','numeric/conversion','numeric/interval/doc',
- 'numeric/ublas','unmeric/ublas/doc','optional','parameter','pool','preprocessor',
- 'program_options','program_options/doc','property_map','proto','ptr_container','python',
- 'python/doc/tutorial','python/doc/v2','range','regex','serialization','signals',
- 'signals/doc','smart_ptr','statechart','static_assert','system','test',
- 'thread','thread/doc','tr1','tuple','typeof',
- 'type_traits','units','unordered','variant','xpressive'
- )).')/index.(html|htm)$@i',
- 'raw','text/html'),
//~ special cases that can't be processed at all (some redirects)
- array('@.*@','@^libs/index.html$@i','raw','text/html'),
- array('@.*@','@^libs/bind/ref.html$@i','raw','text/html'),
- array('@.*@','@^libs/config/config.htm$@i','raw','text/html'),
array('@.*@','@^libs/gil/doc/.*(html|htm)$@i','raw','text/html'),
- array('@.*@','@^libs/math/doc/common_factor.html$@i','raw','text/html'),
array('@.*@','@^libs/preprocessor/doc/.*(html|htm)$@i','raw','text/html'),
array('@.*@','@^libs/test/doc/components/test_tools/reference/.*(html|htm)$@i','raw','text/html'),
- array('@.*@','@^libs/python/doc/PyConDC_2003/bpl.html$@i','raw','text/html'),
array('@.*@','@^libs/spirit/.*(html|htm)$@i','simple','text/html', 'add_spirit_analytics'),
array('@.*@','@^libs/fusion/.*(html|htm)$@i','basic','text/html', 'add_spirit_analytics'),
- array('@.*@','@^libs/static_assert/static_assert.htm$@i','raw','text/html'),
- array('@.*@','@^libs/type_traits/cxx_type_traits.htm$@i','raw','text/html'),
- array('@.*@','@^libs/utility/iterator_adaptors.htm$@i','raw','text/html'),
array('@.*@','@^libs/wave/.*(html|htm)$@i','raw','text/html'),
array('@.*@','@^libs/range/doc/.*(html|htm)$@i','raw','text/html'),
- array('@.*@','@^status/index.html$@i','raw','text/html'),
- array('@.*@','@^tools/boostbook/index.html$@i','raw','text/html'),
- array('@.*@','@^tools/build/index.html$@i','raw','text/html'),
- array('@.*@','@^tools/jam/index.html$@i','raw','text/html'),
- array('@.*@','@^tools/quickbook/index.html$@i','raw','text/html'),
- array('@.*@','@^tools/regression/index.html?$@i','raw','text/html'),
- array('@.*@','@^wiki/index.html$@i','raw','text/html'),
//~ special cases that can't be embeded in the standard frame
array('@.*@','@^libs/iostreams/doc/.*(html|htm)$@i','simple','text/html'),
array('@.*@','@^libs/serialization/doc/.*(html|htm)$@i','simple','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-05-27 16:51:56 EDT (Thu, 27 May 2010)
@@ -96,7 +96,8 @@
}
else
{
- $docref = '/doc/libs/1_43_0/'.$lib['documentation'];
+ global $boost_current_version;
+ $docref = '/doc/libs/'.implode('_', $boost_current_version).'/'.$lib['documentation'];
}
print ''.($lib['name'] ? $lib['name'] : $lib['key']).'';
}
Modified: website/public_html/live/feed/templates/boost_x_xx_x.qbk
==============================================================================
--- website/public_html/live/feed/templates/boost_x_xx_x.qbk (original)
+++ website/public_html/live/feed/templates/boost_x_xx_x.qbk 2010-05-27 16:51:56 EDT (Thu, 27 May 2010)
@@ -1,5 +1,5 @@
[article Version 1.xx.x
- [quickbook 1.4]
+ [quickbook 1.5]
[source-mode c++]
[purpose New Libraries: Updated Libraries: ]
[authors [Dawes, Beman]]
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