Ignore:
Timestamp:
Dec 3, 2008, 12:28:32 AM (15 years ago)
Author:
plg
Message:

merge r2916 from branch 2.0 to trunk

bug 904 fixed: an index.htm is created in directories created by
pwg.images.add web API method, only directories that contains pictures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r2856 r2917  
    15411541  return $str; //???
    15421542}
     1543
     1544/**
     1545 * makes sure a index.htm protects the directory from browser file listing
     1546 *
     1547 * @param string dir directory
     1548 */
     1549function secure_directory($dir)
     1550{
     1551  $file = $dir.'/index.htm';
     1552  if (!file_exists($file))
     1553  {
     1554    @file_put_contents($file, 'Not allowed!');
     1555  }
     1556}
    15431557?>
Note: See TracChangeset for help on using the changeset viewer.