+ $subdirReg .= '[0-9a-f]';
+ $hashDirReg .= "$subdirReg/";
+ }
+ $zoneReg = preg_quote( $zoneUriPath ); // regex for thumb zone URI
+
+ // Check if this is a thumbnail of an original in the local file repo
+ if ( preg_match( "!^$zoneReg/((archive/)?$hashDirReg([^/]*)/([^/]*))$!", $uriPath, $m ) ) {
+ list( /*all*/, $rel, $archOrTemp, $filename, $thumbname ) = $m;
+ // Check if this is a thumbnail of an temp file in the local file repo
+ } elseif ( preg_match( "!^$zoneReg/(temp/)($hashDirReg([^/]*)/([^/]*))$!", $uriPath, $m ) ) {
+ list( /*all*/, $archOrTemp, $rel, $filename, $thumbname ) = $m;
+ } else {
+ return null; // not a valid looking thumbnail request