function end_element($parser, $name) { if (!$this->is_item or $name != 'ITEM') { return; } $item = array_map(array(&$this, 'escape'), $this->item); $this->item = array(); if (array_key_exists('DC:DATE', $item)) { $time = plugin_showrss_get_timestamp($item['DC:DATE']); } else { if (array_key_exists('PUBDATE', $item)) { $time = plugin_showrss_get_timestamp($item['PUBDATE']); } else { $time = time() - MOD_PUKI_LOCALZONE; } } $item['_TIMESTAMP'] = $time; $date = PukiWikiFunc::get_date('Y-m-d', $item['_TIMESTAMP']); $this->items[$date][] = $item; $this->is_item = FALSE; }