소스 검색

ok its unfucked now

lolcat 1 년 전
부모
커밋
566680fe36
1개의 변경된 파일7개의 추가작업 그리고 9개의 파일을 삭제
  1. 7 9
      proxy.php

+ 7 - 9
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)){