- if (!$sort_by_date) {
- $entries = $xpath->query("/atom:feed/atom:entry");
- foreach ($entries as $entry) {
- self::processEntry($header, $xpath, $entry, $importer, $xml, $protocol);
- }
- } else {
- $newentries = [];
- $entries = $xpath->query("/atom:feed/atom:entry");
- foreach ($entries as $entry) {
- $created = XML::getFirstNodeValue($xpath, "atom:published/text()", $entry);
- $newentries[strtotime($created)] = $entry;
- }
-
- // Now sort after the publishing date
- ksort($newentries);
-
- foreach ($newentries as $entry) {
- self::processEntry($header, $xpath, $entry, $importer, $xml, $protocol);
- }
+ $entries = $xpath->query("/atom:feed/atom:entry");
+ foreach ($entries as $entry) {
+ self::processEntry($header, $xpath, $entry, $importer, $xml, $protocol);