Permalink
Browse files

bug 2668 - fix php warnings on glob function

git-svn-id: http://piwigo.org/svn/trunk@16167 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information...
modus75 committed Jun 29, 2012
1 parent e39685d commit a05c8c538a6a1a907dade83fc6c8e3b66bf6253f
Showing with 10 additions and 4 deletions.
  1. +5 −2 admin/configuration.php
  2. +5 −2 admin/include/functions.php
@@ -514,9 +514,12 @@ function order_by_is_local()
{
$watermark_files[] = substr($file, strlen(PHPWG_ROOT_PATH));
}
foreach (glob(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'watermarks/*.png') as $file)
if ( ($glob=glob(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'watermarks/*.png')) !== false)
{
$watermark_files[] = substr($file, strlen(PHPWG_ROOT_PATH));
foreach ($glob as $file)
{
$watermark_files[] = substr($file, strlen(PHPWG_ROOT_PATH));
}
}
$watermark_filemap = array( '' => '---' );
foreach( $watermark_files as $file)
@@ -2360,9 +2360,12 @@ function delete_element_derivatives($infos, $type='all')
$pattern = '-'.derivative_to_url($type).'*';
}
$path = substr_replace($path, $pattern, $dot, 0);
foreach( glob(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$path) as $file)
if ( ($glob=glob(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$path)) !== false)
{
@unlink($file);
foreach( $glob as $file)
{
@unlink($file);
}
}
}
?>

0 comments on commit a05c8c5

Please sign in to comment.