From 179c77ccddcd8bd4df2f29d05b460c6365396d49 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 9 Jul 2007 11:33:14 +0000 Subject: - do not include if there are no files fetched with glob() - allow options for merged files on update (merge, new file, old file) git-svn-id: file:///svn/phpbb/trunk@7848 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_module.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions_module.php') diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 1010de643b..073dfa60ad 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -127,10 +127,14 @@ class p_master if (file_exists($user->lang_path . 'mods')) { $add_files = array(); + $info_files = glob($user->lang_path . 'mods/info_' . strtolower($this->p_class) . '_*.' . $phpEx, GLOB_NOSORT); - foreach (glob($user->lang_path . 'mods/info_' . strtolower($this->p_class) . '_*.' . $phpEx, GLOB_NOSORT) as $file) + if ($info_files !== false && sizeof($info_files)) { - $add_files[] = 'mods/' . substr(basename($file), 0, -(strlen($phpEx) + 1)); + foreach ($info_files as $file) + { + $add_files[] = 'mods/' . substr(basename($file), 0, -(strlen($phpEx) + 1)); + } } if (sizeof($add_files)) -- cgit v1.2.1