Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72211 - website/public_html/live/common/code
From: dnljms_at_[hidden]
Date: 2011-05-27 08:56:16


Author: danieljames
Date: 2011-05-27 08:56:15 EDT (Fri, 27 May 2011)
New Revision: 72211
URL: http://svn.boost.org/trac/boost/changeset/72211

Log:
Website: check if files to serve are readable.
Text files modified:
   website/public_html/live/common/code/boost_archive.php | 8 ++++----
   1 files changed, 4 insertions(+), 4 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 2011-05-27 08:56:15 EDT (Fri, 27 May 2011)
@@ -61,7 +61,7 @@
     {
         $check_file = $params['archive'];
 
- if (!is_file($check_file)) {
+ if (!is_readable($check_file)) {
             file_not_found($params, 'Unable to find zipfile.');
             return;
         }
@@ -79,8 +79,8 @@
             }
 
             $found_file = NULL;
- if (is_file("$check_file/index.html")) $found_file = 'index.html';
- else if (is_file("$check_file/index.htm")) $found_file = 'index.htm';
+ if (is_readable("$check_file/index.html")) $found_file = 'index.html';
+ else if (is_readable("$check_file/index.htm")) $found_file = 'index.htm';
 
             if ($found_file) {
                 $params['file'] = $check_file = $check_file.$found_file;
@@ -93,7 +93,7 @@
                 return display_dir($params, $check_file);
             }
         }
- else if (!is_file($check_file)) {
+ else if (!is_readable($check_file)) {
             file_not_found($params, 'Unable to find file.');
             return;
         }


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