mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Version compatibility check for isoquery options
This commit is contained in:
parent
ff7f1f01b4
commit
89cb4621fa
@ -874,10 +874,15 @@ function loadFooterScripts($extraFooterScripts)
|
|||||||
*
|
*
|
||||||
* @param string $locale
|
* @param string $locale
|
||||||
* @param boolean $flag
|
* @param boolean $flag
|
||||||
|
* @see https://salsa.debian.org/debian/isoquery/
|
||||||
*/
|
*/
|
||||||
function getCountryCodes($locale = 'en', $flag = true) {
|
function getCountryCodes($locale = 'en', $flag = true) {
|
||||||
|
define("FLAG_SUPPORT", "3.3.0");
|
||||||
$output = [];
|
$output = [];
|
||||||
if ($flag) {
|
$version = shell_exec("isoquery --version | grep -oP '(?<=isoquery )\d+\.\d+\.\d+'");
|
||||||
|
$compat = checkReleaseVersion(FLAG_SUPPORT, $version);
|
||||||
|
|
||||||
|
if ($flag && $compat) {
|
||||||
$opt = '--flag';
|
$opt = '--flag';
|
||||||
}
|
}
|
||||||
exec("isoquery $opt --locale $locale | awk -F'\t' '{print $5 \"\t\" $0}' | sort | cut -f2-", $output);
|
exec("isoquery $opt --locale $locale | awk -F'\t' '{print $5 \"\t\" $0}' | sort | cut -f2-", $output);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user