aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_module.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-07-09 11:33:14 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-07-09 11:33:14 +0000
commit179c77ccddcd8bd4df2f29d05b460c6365396d49 (patch)
tree872b58682c59b2e3400fe841e541b5a8c9455db7 /phpBB/includes/functions_module.php
parentc923e4191a28026a21c0ebb0dd2120c258d96229 (diff)
downloadforums-179c77ccddcd8bd4df2f29d05b460c6365396d49.tar
forums-179c77ccddcd8bd4df2f29d05b460c6365396d49.tar.gz
forums-179c77ccddcd8bd4df2f29d05b460c6365396d49.tar.bz2
forums-179c77ccddcd8bd4df2f29d05b460c6365396d49.tar.xz
forums-179c77ccddcd8bd4df2f29d05b460c6365396d49.zip
- 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
Diffstat (limited to 'phpBB/includes/functions_module.php')
-rw-r--r--phpBB/includes/functions_module.php8
1 files changed, 6 insertions, 2 deletions
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))