Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026

Diff for Metafox/lib/phpWebFileManager/plugins/file.php between version 1.2 and 1.3

version 1.2, 2005/10/01 23:59:47 version 1.3, 2024/11/20 15:48:04
Line 5 
Line 5 
  * file.php   * file.php
  *   *
  * This is a plugin for phpWebFileManager that allows you to restrict   * This is a plugin for phpWebFileManager that allows you to restrict
  * access to View files.   * access to View files.
  *   *
  * Although it wouldn't technically be required, it works best to set up a   * Although it wouldn't technically be required, it works best to set up a
  * mod_rewrite rule in apache so that when a user choses to download a file   * mod_rewrite rule in apache so that when a user choses to download a file
Line 23 
Line 23 
  * Tony J. White, tjw@tjw.org, 2002-04-15   * Tony J. White, tjw@tjw.org, 2002-04-15
  **************************************************************************/   **************************************************************************/
   
 /* $Platon: phpWebFileManager/plugins/file.php,v 1.8 2004/07/13 16:52:02 nepto Exp $ */  /* $Platon: Metafox/lib/phpWebFileManager/plugins/file.php,v 1.2 2005-10-01 23:59:47 nepto Exp $ */
   
 /*  /*
  * phpWebFileManager initialization   * phpWebFileManager initialization
Line 72  function fm_parse_apache_mime_types($fil
Line 72  function fm_parse_apache_mime_types($fil
         $mime_types   = file($file);          $mime_types   = file($file);
   
         if (is_array($mime_types)) {          if (is_array($mime_types)) {
                 while (list(,$line) = each($mime_types)) {                  foreach ($mime_types as $line) {
                         if ($line[0] == '#')                          if ($line[0] == '#')
                                 continue;                                  continue;
   
                         $parts = preg_split('/(\s+)/', $line);                          $parts = preg_split('/(\s+)/', $line);
                         if (is_array($parts) && sizeof($parts) > 2) {                          if (is_array($parts) && sizeof($parts) > 2) {
                                 list(,$mime) = each($parts);                                  $mime = array_shift($parts);
                                 while (list(,$ext) = each($parts)) {                                  foreach ($parts as $ext) {
                                         if (trim($ext) != '')                                          if (trim($ext) != '')
                                                 $mimes_by_ext[$ext] = $mime;                                                  $mimes_by_ext[$ext] = $mime;
                                 }                                  }
Line 111  function fm_main()
Line 111  function fm_main()
         if (! isset($HTTP_GET_VARS[$fm_cfg['cgi'].'path'])) {          if (! isset($HTTP_GET_VARS[$fm_cfg['cgi'].'path'])) {
                 echo 'CGI variable "'.$fm_cfg['cgi'].'path" is not present.';                  echo 'CGI variable "'.$fm_cfg['cgi'].'path" is not present.';
                 return false;                  return false;
         }          }
   
         $file = $HTTP_GET_VARS[$fm_cfg['cgi'].'path'];          $file = $HTTP_GET_VARS[$fm_cfg['cgi'].'path'];
         if ($file{0} != '/') {          if ($file{0} != '/') {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top