1
0

Use a fixed string to specify tag format

This commit is contained in:
Mike Miller 2013-02-18 09:44:30 +02:00
parent 4be18155a0
commit 9ed3fae364

View File

@ -21,8 +21,13 @@ class date_tag {
static function tag_item($item) {
if ($item->is_photo() && $item->captured) {
tag::add($item, date("F", $item->captured));
tag::add($item, date("Y", $item->captured));
$date_format = "F, Y";
foreach (explode(",", date($date_format, $item->captured)) as $tag_name) {
$tag_name = trim($tag_name);
if ($tag_name) {
tag::add($item, $tag_name);
}
}
}
return;
}