From 0ad0337259fd84f1100965c6466954335448d111 Mon Sep 17 00:00:00 2001 From: lhy6305 <2734565242@qq.com> Date: Mon, 23 Sep 2024 22:34:15 +0800 Subject: [PATCH] ~~ssh~~ https auto update --- api.php | 16 ---------------- incl_attachment_dl.php | 15 +++++++++++++++ phplib/libvar_alias2cid.php | 2 +- phplib/libvar_cid2tid.php | 1 + 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/api.php b/api.php index 1bf1672..4c11a1b 100644 --- a/api.php +++ b/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 diff --git a/incl_attachment_dl.php b/incl_attachment_dl.php index fd697d6..d7aa9a8 100644 --- a/incl_attachment_dl.php +++ b/incl_attachment_dl.php @@ -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"); diff --git a/phplib/libvar_alias2cid.php b/phplib/libvar_alias2cid.php index 85a1e47..995d90e 100644 --- a/phplib/libvar_alias2cid.php +++ b/phplib/libvar_alias2cid.php @@ -14,7 +14,7 @@ $alias2cid_l=[ ], "wood-2"=>[ - "wp24-mc-1"=>"cid_200", + "wp24-mc-1"=>"cid_106", ], ]; \ No newline at end of file diff --git a/phplib/libvar_cid2tid.php b/phplib/libvar_cid2tid.php index 592465d..c0e5e9e 100644 --- a/phplib/libvar_cid2tid.php +++ b/phplib/libvar_cid2tid.php @@ -30,6 +30,7 @@ $cid2tid_l=[ "cid_88"=>"tid_4", "cid_90"=>"tid_5", "cid_87"=>"tid_6", + "cid_106"=>"tid_7", ], ]; \ No newline at end of file