support for short urls with image domain
authorAlan Knowles <alan@roojs.com>
Tue, 20 Jun 2023 04:04:59 +0000 (12:04 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 20 Jun 2023 04:04:59 +0000 (12:04 +0800)
DataObjects/Images.php

index 31fd50b..6401243 100644 (file)
@@ -609,8 +609,10 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
             $id = $matches[1];
         } else if (preg_match('#Images/([0-9]+)/#', $url, $matches)) {
             $id = $matches[1];
+        } else if (preg_match('#images[^/]+/([0-9]+)/#', $url, $matches)) {
+            // supports images.xxxxx.com/{number}/name...
+            $id = $matches[1];
         }
-        
         if ($id === false ||  $id < 1) {
             return false;
         }