Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51882 - website/public_html/beta/common/code
From: daniel_james_at_[hidden]
Date: 2009-03-21 11:35:42


Author: danieljames
Date: 2009-03-21 11:35:41 EDT (Sat, 21 Mar 2009)
New Revision: 51882
URL: http://svn.boost.org/trac/boost/changeset/51882

Log:
Fix display of certain documentation pages.

Still requires the page to have a body tag which means that some pages
that are technically valid HTML (neither the body tag nor the head tag
are required).
Text files modified:
   website/public_html/beta/common/code/boost_archive.php | 28 ++++++++++++++++++----------
   1 files changed, 18 insertions(+), 10 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 2009-03-21 11:35:41 EDT (Sat, 21 Mar 2009)
@@ -488,16 +488,24 @@
     function _content_basic()
     {
         $text = $this->_content_html_pre();
- $text = preg_split('@(</head>)|(<body[^>]*>)@i',$text,-1,PREG_SPLIT_DELIM_CAPTURE);
- print $text[0];
- print '<link rel="icon" href="/favicon.ico" type="image/ico" />';
- print '<link rel="stylesheet" type="text/css" href="/style/section-basic.css" />';
- print $text[1];
- print $text[2];
- print $text[3];
- print $text[4];
- virtual("/common/heading-doc.html");
- print $text[5];
+ $text = preg_split('@(</head>|<body[^>]*>)@i',$text,-1,PREG_SPLIT_DELIM_CAPTURE);
+ $state = 0;
+ foreach($text as $section) {
+ print($section);
+ switch($state) {
+ case 0:
+ print '<link rel="icon" href="/favicon.ico" type="image/ico" />';
+ print '<link rel="stylesheet" type="text/css" href="/style/section-basic.css" />';
+ $state = 1;
+ break;
+ case 1:
+ if(strpos($section, '<body') === 0) {
+ $state = 2;
+ virtual("/common/heading-doc.html");
+ }
+ break;
+ }
+ }
     }
 
     function _init_404()


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