1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-14 12:40:13 +01:00

[ticket/12903] Remove dead phpbb\extension\metadata_manager::_validate_version

PHPBB3-12903
This commit is contained in:
jeroendedauw 2014-07-31 20:28:14 +02:00 committed by Andreas Fischer
parent a8dee3fb65
commit f6f6657842

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
*