diff options
| author | lolcat <will@lolcat.ca> | 2025-04-17 20:06:42 -0400 |
|---|---|---|
| committer | lolcat <will@lolcat.ca> | 2025-04-17 20:06:42 -0400 |
| commit | 566680fe3603f8fc12161612b5857ec024ec63e3 (patch) | |
| tree | 52068c7c200f868f23b228b1f23672a128188eb3 | |
| parent | 077692db4904df65302be05da64a0cbcddf18fbb (diff) | |
ok its unfucked now
| -rw-r--r-- | proxy.php | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -60,17 +60,15 @@ try{ if($id === null){ - // fallback to getting ID from path - $id = explode("/", $image["path"]); - - for($i=count($id) - 1; $i>0; $i--){ + $id = explode("/th/id/", $image["path"], 2); + + if(count($id) !== 2){ - if(trim($id[$i]) != ""){ - - $id = $id[$i]; - break; - } + // malformed + return $url; } + + $id = $id[1]; } if(is_array($id)){ |
