aboutsummaryrefslogtreecommitdiffstats
path: root/proxy.php
diff options
context:
space:
mode:
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