summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcatch2012-01-18 04:01:07 (GMT)
committercatch2012-01-18 04:01:07 (GMT)
commit8e20a82ed5fedb932e9b6b3d4ba1b8ebb239822b (patch)
treed06cd7018470a1fea124e1ddb91d4bdbbf3b8093
parent2cc7d45de1c2545afd3804879ac6c692c14ed9d7 (diff)
Issue #1392174 by Gábor Hojtsy, Garrett Albright, tstoeckler: Fixed install_find_translation_files() breaks if is passed.
-rw-r--r--core/includes/install.core.inc13
-rw-r--r--core/modules/simpletest/simpletest.info1
2 files changed, 13 insertions, 1 deletions
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 3f5eb2e..61f7891 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -1159,10 +1159,21 @@ function install_find_translations() {
/**
* Find installer translations either for a specific langcode or all languages.
+ *
+ * @param $langcode
+ * (optional) The language code corresponding to the language for which we
+ * want to find translation files. If omitted, information on all available
+ * files will be returned.
+ *
+ * @return
+ * An associative array of file information objects keyed by file URIs as
+ * returned by file_scan_directory().
+ *
+ * @see file_scan_directory()
*/
function install_find_translation_files($langcode = NULL) {
$directory = variable_get('locale_translate_file_directory', conf_path() . '/files/translations');
- $files = file_scan_directory($directory, '!install\.' . (!empty($langcode) ? '\.' . preg_quote($langcode, '!') : '[^\.]+') . '\.po$!', array('recurse' => FALSE));
+ $files = file_scan_directory($directory, '!install\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!', array('recurse' => FALSE));
return $files;
}
diff --git a/core/modules/simpletest/simpletest.info b/core/modules/simpletest/simpletest.info
index fab7b5e..bbe65f0 100644
--- a/core/modules/simpletest/simpletest.info
+++ b/core/modules/simpletest/simpletest.info
@@ -21,6 +21,7 @@ files[] = tests/filetransfer.test
files[] = tests/form.test
files[] = tests/graph.test
files[] = tests/image.test
+files[] = tests/installer.test
files[] = tests/lock.test
files[] = tests/mail.test
files[] = tests/menu.test