From 6993ea05b768fd0cdbc99e14e177e1ca3b3a9904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Sun, 15 Jul 2007 19:14:19 +0000 Subject: #159463 by hass (with phpdoc addition from myself): file_scan_directory() should not have a trailing slash in the dir parameter --- includes/file.inc | 2 +- includes/locale.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'includes') diff --git a/includes/file.inc b/includes/file.inc index f1206b513..eec106f0f 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -849,7 +849,7 @@ function file_download() { * from being scanned. * * @param $dir - * The base directory for the scan. + * The base directory for the scan, without trailing slash. * @param $mask * The regular expression of the files to find. * @param $nomask diff --git a/includes/locale.inc b/includes/locale.inc index 1fc920087..a2abfca13 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -2411,7 +2411,7 @@ function locale_batch_by_language($langcode, $finished = '_locale_batch_installe // with names ending with $langcode.po. This allows for filenames // like node-module.de.po to let translators use small files and // be able to import in smaller chunks. - $files = array_merge($files, file_scan_directory(dirname($component->filename) .'/translations/', '(^|\.)'. $langcode .'\.po$', array('.', '..', 'CVS'), 0, FALSE)); + $files = array_merge($files, file_scan_directory(dirname($component->filename) .'/translations', '(^|\.)'. $langcode .'\.po$', array('.', '..', 'CVS'), 0, FALSE)); } return _locale_batch_build($files, $finished); @@ -2481,7 +2481,7 @@ function locale_batch_by_component($components, $finished = '_locale_batch_syste // as $langcode.po or with names ending with $langcode.po. This allows // for filenames like node-module.de.po to let translators use small // files and be able to import in smaller chunks. - $files = array_merge($files, file_scan_directory(dirname($component->filename) .'/translations/', '(^|\.)('. $language_list .')\.po$', array('.', '..', 'CVS'), 0, FALSE)); + $files = array_merge($files, file_scan_directory(dirname($component->filename) .'/translations', '(^|\.)('. $language_list .')\.po$', array('.', '..', 'CVS'), 0, FALSE)); } } return _locale_batch_build($files, $finished); -- cgit v1.2.3