Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65598 - website/public_html/beta/common/code
From: dnljms_at_[hidden]
Date: 2010-09-26 08:49:40


Author: danieljames
Date: 2010-09-26 08:49:38 EDT (Sun, 26 Sep 2010)
New Revision: 65598
URL: http://svn.boost.org/trac/boost/changeset/65598

Log:
Check for file before choosing filter to use.
Text files modified:
   website/public_html/beta/common/code/boost_archive.php | 26 ++++++++++++++------------
   1 files changed, 14 insertions(+), 12 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-09-26 08:49:38 EDT (Sun, 26 Sep 2010)
@@ -55,6 +55,20 @@
     $params['charset'] = NULL;
     $params['content'] = NULL;
     
+ // Check file exists.
+
+ $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;
+ }
+
+ // Choose filter to use
+
     $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'),
@@ -91,18 +105,6 @@
         return;
     }
 
- // Check file exists.
-
- $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;
- }
-
     // Handle ETags and Last-Modified HTTP headers.
 
     // Output raw files.


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