aboutsummaryrefslogtreecommitdiffstats
path: root/proxy.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2025-04-17 20:06:42 -0400
committerlolcat <will@lolcat.ca>2025-04-17 20:06:42 -0400
commit566680fe3603f8fc12161612b5857ec024ec63e3 (patch)
tree52068c7c200f868f23b228b1f23672a128188eb3 /proxy.php
parent077692db4904df65302be05da64a0cbcddf18fbb (diff)
ok its unfucked now
Diffstat (limited to 'proxy.php')
-rw-r--r--proxy.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/proxy.php b/proxy.php
index 14c0efa..726b201 100644
--- a/proxy.php
+++ b/proxy.php
@@ -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)){
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage