summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/helpers/l10n_scanner.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/gallery/helpers/l10n_scanner.php b/modules/gallery/helpers/l10n_scanner.php
index a68aa28b..a8059b3a 100644
--- a/modules/gallery/helpers/l10n_scanner.php
+++ b/modules/gallery/helpers/l10n_scanner.php
@@ -82,11 +82,10 @@ class l10n_scanner_Core {
}
static function scan_info_file($file, &$cache) {
- $code = file_get_contents($file);
- if (preg_match("#name\s*?=\s*(.*?)\ndescription\s*?=\s*(.*)\n#", $code, $matches)) {
- unset($matches[0]);
- foreach ($matches as $string) {
- l10n_scanner::process_message($string, $cache);
+ $info = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS);
+ foreach (array('name', 'description') as $property) {
+ if (isset($info->$property)) {
+ l10n_scanner::process_message($info->$property, $cache);
}
}
}