function end_element($parser, $name) { if (!$this->is_item || $name != 'ITEM') { return; } $item = array_map(array(&$this, 'escape'), $this->item); $this->item = array(); if (isset($item['DC:DATE'])) { $time = plugin_showrss_get_timestamp($item['DC:DATE']); } else { if (isset($item['PUBDATE'])) { $time = plugin_showrss_get_timestamp($item['PUBDATE']); } else { if (isset($item['DESCRIPTION']) && ($description = trim($item['DESCRIPTION'])) != '' && ($time = strtotime($description)) != -1) { $time -= LOCALZONE; } else { $time = time() - LOCALZONE; } } } $item['_TIMESTAMP'] = $time; $date = get_date('Y-m-d', $item['_TIMESTAMP']); $this->items[$date][] = $item; $this->is_item = FALSE; }
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; }