aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_install.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-12-29 13:46:42 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-12-29 13:46:42 +0100
commit382317b1352db90605d6555eaf2fbc4238c2d547 (patch)
treebfdf6980f9a19ad54842f5c50d210da5061ebab7 /phpBB/includes/functions_install.php
parentac131a51592f5e45e5a555ae0ac04543d02f9c31 (diff)
parentdb94f80c5ba117ca410bb2aafa3ae5c02dcf11c8 (diff)
downloadforums-382317b1352db90605d6555eaf2fbc4238c2d547.tar
forums-382317b1352db90605d6555eaf2fbc4238c2d547.tar.gz
forums-382317b1352db90605d6555eaf2fbc4238c2d547.tar.bz2
forums-382317b1352db90605d6555eaf2fbc4238c2d547.tar.xz
forums-382317b1352db90605d6555eaf2fbc4238c2d547.zip
Merge branch 'develop' of https://github.com/phpbb/phpbb into feature/passwords
Conflicts: phpBB/config/services.yml
Diffstat (limited to 'phpBB/includes/functions_install.php')
-rw-r--r--phpBB/includes/functions_install.php50
1 files changed, 49 insertions, 1 deletions
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index bfd669fdfa..deb304b838 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -505,7 +505,7 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_test
'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
'table_prefix' => $data['table_prefix'],
- 'adm_relative_path' => 'adm/',
+ 'phpbb_adm_relative_path' => 'adm/',
'acm_type' => 'phpbb\cache\driver\file',
);
@@ -533,3 +533,51 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_test
return $config_data;
}
+
+/**
+* Check whether a file should be ignored on update
+*
+* We ignore new files in some circumstances:
+* 1. The file is a language file, but the language is not installed
+* 2. The file is a style file, but the style is not installed
+* 3. The file is a style language file, but the language is not installed
+*
+* @param string $phpbb_root_path phpBB root path
+* @param string $file File including path from phpbb root
+* @return bool Should we ignore the new file or add it to the board?
+*/
+function phpbb_ignore_new_file_on_update($phpbb_root_path, $file)
+{
+ $ignore_new_file = false;
+
+ // We ignore new files in some circumstances:
+ // 1. The file is a language file, but the language is not installed
+ if (!$ignore_new_file && strpos($file, 'language/') === 0)
+ {
+ list($language_dir, $language_iso) = explode('/', $file);
+ $ignore_new_file = !file_exists($phpbb_root_path . $language_dir . '/' . $language_iso);
+ }
+
+ // 2. The file is a style file, but the style is not installed
+ if (!$ignore_new_file && strpos($file, 'styles/') === 0)
+ {
+ list($styles_dir, $style_name) = explode('/', $file);
+ $ignore_new_file = !file_exists($phpbb_root_path . $styles_dir . '/' . $style_name);
+ }
+
+ // 3. The file is a style language file, but the language is not installed
+ if (!$ignore_new_file && strpos($file, 'styles/') === 0)
+ {
+ $dirs = explode('/', $file);
+ if (sizeof($dirs) >= 5)
+ {
+ list($styles_dir, $style_name, $template_component, $language_iso) = explode('/', $file);
+ if ($template_component == 'theme' && $language_iso !== 'images')
+ {
+ $ignore_new_file = !file_exists($phpbb_root_path . 'language/' . $language_iso);
+ }
+ }
+ }
+
+ return $ignore_new_file;
+}