mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #2821 from bantu/ticket/12903
[ticket/12903] Remove dead phpbb\extension\metadata_manager::_validate_version
This commit is contained in:
commit
ba2c40cde9
1 changed files with 0 additions and 21 deletions
|
@ -329,27 +329,6 @@ class metadata_manager
|
||||||
return true;
|
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
|
* Outputs the metadata into the template
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue