Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59893 - website/public_html/beta/common/code
From: daniel_james_at_[hidden]
Date: 2010-02-25 03:42:55


Author: danieljames
Date: 2010-02-25 03:42:54 EST (Thu, 25 Feb 2010)
New Revision: 59893
URL: http://svn.boost.org/trac/boost/changeset/59893

Log:
Remove extra banner from documentation pages, fixing a bug in remove_html_banner.
Text files modified:
   website/public_html/beta/common/code/boost_archive.php | 27 +++++++++++++++++++++------
   1 files changed, 21 insertions(+), 6 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 2010-02-25 03:42:54 EST (Thu, 25 Feb 2010)
@@ -304,11 +304,23 @@
 
     function content($archive)
     {
+ return $archive->content_;
+ }
+
+ function render($archive)
+ {
         $text = extract_html_body($archive->content_);
- $text = prepare_html($text);
- $text = remove_html_banner($text);
- $text = prepare_themed_html($text);
- print $text;
+ 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_;
+ }
     }
 
     function render($archive) {
@@ -376,6 +388,7 @@
     function content($archive)
     {
         $text = prepare_html($archive->content_);
+ $text = remove_html_banner($text);
 
         $is_xhtml = preg_match('@<!DOCTYPE[^>]*xhtml_at_i', $text);
         $tag_end = $is_xhtml ? '/>' : '>';
@@ -514,8 +527,10 @@
         if(strpos($table_contents, 'boost.png') !== FALSE) {
             preg_match('@<td[^<>]*>?([^<]*<(h[12]|p).*?)</td>@is', $table_contents,
                 $table_contents_header, PREG_OFFSET_CAPTURE);
- $text = (isset($table_contents_header[1]) ? $table_contents_header[1][0] : '').
- substr($text, $table_end[0][1] + 8);
+ $text =
+ substr($text, 0, $table_begin[0][1]).
+ (isset($table_contents_header[1]) ? $table_contents_header[1][0] : '').
+ substr($text, $table_end[0][1] + strlen($table_end[0][0]));
         }
     }
     return $text;


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