mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-12 21:43:06 +01:00
step 1 for cibuild php
This commit is contained in:
26
webinstall/config.php
Normal file
26
webinstall/config.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
$allowed=array(
|
||||
'user'=> array('wellenvogel'),
|
||||
'repo'=> array('esp32-nmea2000')
|
||||
);
|
||||
|
||||
|
||||
function fillUserAndRepo($vars=null){
|
||||
global $allowed;
|
||||
if ($vars == null) {
|
||||
$vars=array();
|
||||
}
|
||||
foreach (array('user','repo') as $n){
|
||||
if (! isset($_REQUEST[$n])){
|
||||
die("missing parameter $n");
|
||||
}
|
||||
$v=$_REQUEST[$n];
|
||||
$av=$allowed[$n];
|
||||
if (! in_array($v,$av)){
|
||||
die("value $v for $n not allowed");
|
||||
}
|
||||
$vars[$n]=$v;
|
||||
}
|
||||
return $vars;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user