improves regexes parsing plugins metadata

git-svn-id: http://piwigo.org/svn/trunk@28969 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
mistic100 2014-07-06 14:05:05 +00:00
parent dbedfd173f
commit 1633d8ffaa
4 changed files with 21 additions and 19 deletions

View file

@ -380,7 +380,7 @@ function autoupdate_plugin(&$plugin)
$i++;
if ($i < 2) continue; // first lines are typically "<?php" and "/*"
if (preg_match('#Version: ([\\w.-]+)#', $line, $matches))
if (preg_match('/Version:\\s*([\\w.-]+)/', $line, $matches))
{
$fs_version = $matches[1];
}