aboutsummaryrefslogtreecommitdiff
path: root/mod/diagnostics/start.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-12 17:03:51 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-12 17:03:51 +0000
commit73ed4ae8513af1cc6e795b125cc1f319a965bfb4 (patch)
tree86681c6baee8869faab58940588251be692dd9e4 /mod/diagnostics/start.php
parentc41553d5e532ca86070d511d50d150d97869bb84 (diff)
downloadelgg-73ed4ae8513af1cc6e795b125cc1f319a965bfb4.tar.gz
elgg-73ed4ae8513af1cc6e795b125cc1f319a965bfb4.tar.bz2
Merged Cash's bugfixes from the 1.7 branch (3288:5377).
git-svn-id: http://code.elgg.org/elgg/trunk@5378 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/diagnostics/start.php')
-rw-r--r--mod/diagnostics/start.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php
index c114c054e..12795ebc8 100644
--- a/mod/diagnostics/start.php
+++ b/mod/diagnostics/start.php
@@ -91,22 +91,22 @@ function diagnostics_plugins_hook($hook, $entity_type, $returnvalue, $params)
*/
function diagnostics_md5_dir($dir)
{
- //if (is_file(trim($dir, "/"))) {
- $extensions_allowed = array('.php', '.gif', '.png', '.jpg');
+ $extensions_allowed = array('.php', '.js', '.css');
$buffer = "";
- if (in_array(strrchr(trim($dir, "/"), '.'), $extensions_allowed))
- {
- //$dir = trim($dir, "/");
- $buffer .= md5_file($dir). " " . trim($dir, "/") . "\n";
- } else if ($handle = opendir($dir)) {
+ if (in_array(strrchr(trim($dir, "/"), '.'), $extensions_allowed)) {
+ $dir = rtrim($dir, "/");
+ $buffer .= md5_file($dir). " " . $dir . "\n";
+ } else if (is_dir($dir)) {
+ $handle = opendir($dir);
while ($file = readdir($handle)) {
-
if (($file != '.') && ($file != '..')) {
$buffer .= diagnostics_md5_dir($dir . $file. "/", $buffer);
}
}
+
+ closedir($handle);
}
return $buffer;