~~ssh~~ https auto update
This commit is contained in:
parent
e8d454d461
commit
0ad0337259
16
api.php
16
api.php
@ -73,22 +73,6 @@ $team_id=explode(":", $team_token)[0];
|
||||
$team_id="team_".$team_id;
|
||||
|
||||
|
||||
//change $action[1](cid) based on $alias2cid_l
|
||||
|
||||
if(count($action)>1&&strlen($action[1])>0) {
|
||||
require(__DIR__."/phplib/libvar_alias2cid.php");
|
||||
$alias2cid=[];
|
||||
if(array_key_exists($game, $alias2cid_l)) {
|
||||
$alias2cid=$alias2cid_l[$game];
|
||||
}
|
||||
unset($alias2cid_l);
|
||||
if(array_key_exists($action[1], $alias2cid)) {
|
||||
$action[1]=$alias2cid[$action[1]];
|
||||
}
|
||||
unset($alias2cid);
|
||||
}
|
||||
|
||||
|
||||
//require files depends on the request
|
||||
//$action, $game, $ginfo, $team_id, $team_token is set
|
||||
|
||||
|
@ -5,6 +5,21 @@ if(count($action)<2) {
|
||||
exit;
|
||||
}
|
||||
|
||||
//change $action[1](cid) based on $alias2cid_l
|
||||
|
||||
if(count($action)>1&&strlen($action[1])>0) {
|
||||
require(__DIR__."/phplib/libvar_alias2cid.php");
|
||||
$alias2cid=[];
|
||||
if(array_key_exists($game, $alias2cid_l)) {
|
||||
$alias2cid=$alias2cid_l[$game];
|
||||
}
|
||||
unset($alias2cid_l);
|
||||
if(array_key_exists($action[1], $alias2cid)) {
|
||||
$action[1]=$alias2cid[$action[1]];
|
||||
}
|
||||
unset($alias2cid);
|
||||
}
|
||||
|
||||
$cid=$action[1];
|
||||
|
||||
require(__DIR__."/phplib/libvar_cid2tid.php");
|
||||
|
@ -14,7 +14,7 @@ $alias2cid_l=[
|
||||
],
|
||||
|
||||
"wood-2"=>[
|
||||
"wp24-mc-1"=>"cid_200",
|
||||
"wp24-mc-1"=>"cid_106",
|
||||
],
|
||||
|
||||
];
|
@ -30,6 +30,7 @@ $cid2tid_l=[
|
||||
"cid_88"=>"tid_4",
|
||||
"cid_90"=>"tid_5",
|
||||
"cid_87"=>"tid_6",
|
||||
"cid_106"=>"tid_7",
|
||||
],
|
||||
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user