make "source[=|:]none" null the source

This commit is contained in:
Daku 2014-01-29 08:42:57 +00:00
parent b7778b54c9
commit 6a1a57b1a2

View File

@ -192,7 +192,8 @@ class TagEdit extends Extension {
$matches = array();
if(preg_match("/^source[=|:](.*)$/i", $event->term, $matches)) {
send_event(new SourceSetEvent(Image::by_id($event->id), $matches[1]));
$source = ($matches[1] !== "none" ? $matches[1] : null);
send_event(new SourceSetEvent(Image::by_id($event->id), $source));
}
if(!empty($matches)) $event->metatag = true;