$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r79660 - in website/public_html/beta: common/code development doc
From: dnljms_at_[hidden]
Date: 2012-07-22 03:22:15
Author: danieljames
Date: 2012-07-22 03:22:13 EDT (Sun, 22 Jul 2012)
New Revision: 79660
URL: http://svn.boost.org/trac/boost/changeset/79660
Log:
Website: Call get_archive_location from inside display_from_archive
Text files modified: 
   website/public_html/beta/common/code/boost_archive.php   |    42 ++++++++++++++++++++++++++++++--------- 
   website/public_html/beta/development/testing_results.php |    14 ++++++------                            
   website/public_html/beta/doc/display_build.php           |    12 +++++-----                              
   website/public_html/beta/doc/display_libs.php            |     7 +++--                                   
   4 files changed, 49 insertions(+), 26 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	2012-07-22 03:22:13 EDT (Sun, 22 Jul 2012)
@@ -45,21 +45,42 @@
 }
 
 function display_from_archive(
-    $params,
     $content_map = array(),
-    $override_extractor = null,
-    $extra_settings = array())
+    $params = array())
 {
-    $params['template'] = dirname(__FILE__)."/template.php";
-    $params['title'] = NULL;
-    $params['charset'] = NULL;
-    $params['content'] = NULL;
+    // Set default values
+
+    $params = array_merge(
+        array(
+            'pattern' => '@^[/]([^/]+)[/](.*)$@',
+            'vpath' => $_SERVER["PATH_INFO"],
+            'archive_subdir' => true,
+            'zipfile' => true,
+            'archive_dir' => ARCHIVE_DIR,
+            'archive_file_prefix' => ARCHIVE_FILE_PREFIX,
+            'use_http_expire_date' => false,
+            'override_extractor' => null,
+            'template' => dirname(__FILE__)."/template.php",
+            'title' => NULL,
+            'charset' => NULL,
+            'content' => NULL,
+        ),
+        $params
+    );
+
+    $params = array_merge($params, get_archive_location(
+        $params['pattern'],
+        $params['vpath'],
+        $params['archive_subdir'],
+        $params['zipfile'],
+        $params['archive_dir'],
+        $params['archive_file_prefix']
+    ));
     
     // Calculate expiry date if requested.
 
     $expires = null;
-    if (isset($extra_settings['use_http_expire_date']) &&
-        $extra_settings['use_http_expire_date'])
+    if ($settings['use_http_expire_date'])
     {
         $compare_version = BoostVersion::from($params['version'])->
             compare(BoostVersion::current());
@@ -143,7 +164,8 @@
         }
     }
     
-    if ($override_extractor) $extractor = $override_extractor;
+    if ($settings['override_extractor'])
+        $extractor = $settings['override_extractor'];
 
     if (!$extractor) {
         file_not_found($params);
Modified: website/public_html/beta/development/testing_results.php
==============================================================================
--- website/public_html/beta/development/testing_results.php	(original)
+++ website/public_html/beta/development/testing_results.php	2012-07-22 03:22:13 EDT (Sun, 22 Jul 2012)
@@ -2,14 +2,14 @@
 require_once(dirname(__FILE__) . '/../common/code/boost_archive.php');
 
 display_from_archive(
-  get_archive_location(
-    '/^[\/]([^\/]+)[\/](.*)$/',$_SERVER["PATH_INFO"],
-    false, // the result zips don't have the tag subdir
-    true, // stored as a zipfile
-    RESULTS_DIR
-  ),
   array(
   //~ array(version-regex,path-regex,raw|simple|text|cpp|boost_book_html|boost_libs_html,mime-type),
   ),
-  'raw' // we always want raw output
+  array(
+    'pattern' => '/^[\/]([^\/]+)[\/](.*)$/',
+    'archive_subdir' => false, // the result zips don't have the tag subdir
+    'zipfile' => true, // stored as a zipfile
+    'archive_dir' => RESULTS_DIR,
+    'override_extractor' => 'raw' // we always want raw output
+  )
 );
Modified: website/public_html/beta/doc/display_build.php
==============================================================================
--- website/public_html/beta/doc/display_build.php	(original)
+++ website/public_html/beta/doc/display_build.php	2012-07-22 03:22:13 EDT (Sun, 22 Jul 2012)
@@ -22,13 +22,13 @@
 }
 
 display_from_archive(
-  get_archive_location(
-    '@^[/]([^/]+)[/](.*)$@',
-    $_SERVER["PATH_INFO"],
-    false, false
-  ),
   array(
   //~ array(version-regex,path-regex,raw|simple|text|cpp|boost_book_html|boost_libs_html,mime-type[,preprocess hook]),
   array('@.*@','@^boost-build/index[.]html$@i','simple','text/html', 'add_boost_build_analytics'),
   array('@.*@','@[.](html|htm)$@i','boost_book_html','text/html')
-));
+  ),
+  array(
+    'archive_subdir' => false,
+    'zipfile' => false,
+  )
+);
Modified: website/public_html/beta/doc/display_libs.php
==============================================================================
--- website/public_html/beta/doc/display_libs.php	(original)
+++ website/public_html/beta/doc/display_libs.php	2012-07-22 03:22:13 EDT (Sun, 22 Jul 2012)
@@ -55,7 +55,6 @@
 }
 
 display_from_archive(
-  get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"],true,false),
   array(
   //~ special cases that can't be processed at all (some redirects)
   array('@.*@','@^libs/gil/doc/.*(html|htm)$@i','raw','text/html'),
@@ -86,6 +85,8 @@
   //~ the headers are text files displayed in an embeded page
   array('@.*@','@^boost/.*$@i','cpp','text/plain')
   ),
-  null,
-  array('use_http_expire_date' => true)
+  array(
+    'use_http_expire_date' => true,
+    'zipfile' => false,
+  )
 );