add TagTermParseEvent for parsing tags during tagging

This commit is contained in:
Daku
2014-01-29 07:18:49 +00:00
parent 711ad775da
commit b7778b54c9
3 changed files with 41 additions and 9 deletions

View File

@@ -479,15 +479,9 @@ class Image {
$this->delete_tags_from_image();
// insert each new tags
foreach($tags as $tag) {
if(preg_match("/^source[=|:](.*)$/i", $tag, $matches)) {
$this->set_source($matches[1]);
continue;
}
if(preg_match("/^pool[=|:](.*)$/i", $tag, $matches)) {
if(class_exists("Pools")) {
$pls = new Pools();
$pls->add_post_from_tag($matches[1], $this->id);
}
$ttpe = new TagTermParseEvent($tag, $this->id);
send_event($ttpe);
if($ttpe->is_metatag()) {
continue;
}