diff --git a/ext/pools/main.php b/ext/pools/main.php index 4454493f..08fef3fb 100644 --- a/ext/pools/main.php +++ b/ext/pools/main.php @@ -325,7 +325,7 @@ class Pools extends Extension { public function onTagTermParse(TagTermParseEvent $event) { $matches = array(); - if(preg_match("/^pool[=|:](.*)$/i", $event->term, $matches)) { + if(preg_match("/^pool[=|:]([^:]*):?([0-9]*)$/i", $event->term, $matches)) { global $user; $poolTag = (string) str_replace("_", " ", $matches[1]); @@ -337,7 +337,8 @@ class Pools extends Extension { } if($pool ? $this->have_permission($user, $pool) : FALSE){ - $this->add_post($pool['id'], $event->id, true); + $image_order = ($matches[2] ?: 0); + $this->add_post($pool['id'], $event->id, true, $image_order); } }