1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-23 11:28:33 +01:00

Merge pull request #2650 from PayBas/ticket/12766

[ticket/12766] Event exporter does not like RCx as version

* PayBas/ticket/12766:
  [ticket/12766] Event exporter does not like RCx as version
This commit is contained in:
Joas Schilling 2014-06-25 14:06:39 +02:00
commit d083f29244
3 changed files with 4 additions and 2 deletions

View File

@ -227,7 +227,7 @@ class md_exporter
*/
public function validate_since($since)
{
if (!preg_match('#^\d+\.\d+\.\d+(?:-(?:a|b|rc|pl)\d+)?$#', $since))
if (!preg_match('#^\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?$#', $since))
{
throw new \LogicException("Invalid since information found for event '{$this->current_event}'");
}

View File

@ -550,7 +550,7 @@ class php_exporter
public function validate_since($line)
{
$match = array();
preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|rc|pl)\d+)?)$#', ltrim($line, "\t"), $match);
preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?)$#', ltrim($line, "\t"), $match);
if (!isset($match[1]))
{
throw new \LogicException("Invalid '@since' information for event "

View File

@ -118,6 +118,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
array('* @since 3.1.0-a1', '3.1.0-a1'),
array('* @since 3.1.0-b3', '3.1.0-b3'),
array(' * @since 3.1.0-b3', '3.1.0-b3'),
array('* @since 3.1.0-RC2', '3.1.0-RC2'),
);
}
@ -137,6 +138,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
array('* @since 3.1.0-a1 bertie is cool'),
array('bertie* @since 3.1.0-a1'),
array('* @since 3.1-A2'),
array('* @since 3.1.0-rc1'),
);
}