projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1cf572
)
Fixes
author
Roland Häder
<roland@mxchange.org>
Wed, 24 Apr 2013 02:50:32 +0000
(
02:50
+0000)
committer
Roland Häder
<roland@mxchange.org>
Wed, 24 Apr 2013 02:50:32 +0000
(
02:50
+0000)
inc/functions.php
patch
|
blob
|
history
diff --git
a/inc/functions.php
b/inc/functions.php
index c227a23925e6d5069a84a1108ea06b4c353727d4..e68db149d1bfdfdc203fc6d9f24d6723ed066fe6 100644
(file)
--- a/
inc/functions.php
+++ b/
inc/functions.php
@@
-1854,7
+1854,7
@@
function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = FALSE, $ad
if ($addBaseDir === TRUE) {
// With base path
array_push($foundMatches, $fileName);
if ($addBaseDir === TRUE) {
// With base path
array_push($foundMatches, $fileName);
- } elseif (
$withPrefixSuffix === FALSE
) {
+ } elseif (
($withPrefixSuffix === FALSE) && (!empty($extension))
) {
// No prefix/suffix
array_push($foundMatches, substr($baseFile, strlen($prefix), -strlen($suffix . $extension)));
} else {
// No prefix/suffix
array_push($foundMatches, substr($baseFile, strlen($prefix), -strlen($suffix . $extension)));
} else {
@@
-1867,7
+1867,16
@@
function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = FALSE, $ad
}
} elseif (($fileExtension == $extension) || (empty($extension))) {
// Other, generic file found
}
} elseif (($fileExtension == $extension) || (empty($extension))) {
// Other, generic file found
- array_push($foundMatches, $fileName);
+ if ($addBaseDir === TRUE) {
+ // With base path
+ array_push($foundMatches, $fileName);
+ } elseif (($withPrefixSuffix === FALSE) && (!empty($extension))) {
+ // No prefix/suffix
+ array_push($foundMatches, substr($baseFile, strlen($prefix), -strlen($suffix . $extension)));
+ } else {
+ // No base path
+ array_push($foundMatches, $baseFile);
+ }
}
} // END - while
}
} // END - while