1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-17 14:18:24 +01:00

Merge pull request #2821 from bantu/ticket/12903

[ticket/12903] Remove dead phpbb\extension\metadata_manager::_validate_version
This commit is contained in:
Dhruv Goel 2014-08-07 18:01:11 +02:00
commit ba2c40cde9

View File

@ -329,27 +329,6 @@ class metadata_manager
return true;
}
/**
* Version validation helper
*
* @param string $string The string for comparing to a version
* @param string $current_version The version to compare to
* @return bool True/False if meets version requirements
*/
private function _validate_version($string, $current_version)
{
// Allow them to specify their own comparison operator (ex: <3.1.2, >=3.1.0)
$comparison_matches = false;
preg_match('#[=<>]+#', $string, $comparison_matches);
if (!empty($comparison_matches))
{
return version_compare($current_version, str_replace(array($comparison_matches[0], ' '), '', $string), $comparison_matches[0]);
}
return version_compare($current_version, $string, '>=');
}
/**
* Outputs the metadata into the template
*