[geeklog-cvs] Geeklog-1.x/system lib-story.php, 1.127, 1.128 lib-webservices.php, 1.42, 1.43
Dirk Haun
dhaun at qs1489.pair.com
Mon Jul 28 15:35:49 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/system
In directory qs1489.pair.com:/tmp/cvs-serv13199/system
Modified Files:
lib-story.php lib-webservices.php
Log Message:
Use <atom:published>. Thanks to Daniel Jalkut for the reminder ...
Index: lib-webservices.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-webservices.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** lib-webservices.php 27 Jul 2008 18:11:26 -0000 1.42
--- lib-webservices.php 28 Jul 2008 19:35:46 -0000 1.43
***************
*** 560,563 ****
--- 560,569 ----
$args['updated'] = (string)$node->firstChild->nodeValue;
break;
+ case 'edited':
+ $args['edited'] = (string)$node->firstChild->nodeValue;
+ break;
+ case 'published':
+ $args['published'] = (string)$node->firstChild->nodeValue;
+ break;
case 'content':
WS_getContent($args, $atom_doc, $node);
***************
*** 607,619 ****
}
! if (empty($args['updated'])) {
! $args['updated'] = date('c');
}
! $args['publish_month'] = date('m', strtotime($args['updated']));
! $args['publish_year'] = date('Y', strtotime($args['updated']));
! $args['publish_day'] = date('d', strtotime($args['updated']));
! $args['publish_hour'] = date('H', strtotime($args['updated']));
! $args['publish_minute'] = date('i', strtotime($args['updated']));
! $args['publish_second'] = date('s', strtotime($args['updated']));
if (isset($args['control']) && is_array($args['control'])) {
--- 613,630 ----
}
! $timestamp = date('c');
! if (!empty($args['published'])) {
! $timestamp = $args['published'];
! } elseif (!empty($args['updated'])) {
! $timestamp = $args['updated'];
! } elseif (!empty($args['edited'])) {
! $timestamp = $args['edited'];
}
! $args['publish_month'] = date('m', strtotime($timestamp));
! $args['publish_year'] = date('Y', strtotime($timestamp));
! $args['publish_day'] = date('d', strtotime($timestamp));
! $args['publish_hour'] = date('H', strtotime($timestamp));
! $args['publish_minute'] = date('i', strtotime($timestamp));
! $args['publish_second'] = date('s', strtotime($timestamp));
if (isset($args['control']) && is_array($args['control'])) {
***************
*** 647,650 ****
--- 658,666 ----
$entry_elem->appendChild($id);
+ if (!empty($arr['published'])) {
+ $published = $atom_doc->createElement('atom:published', $arr['published']);
+ $entry_elem->appendChild($published);
+ }
+
$updated = $atom_doc->createElement('atom:updated', $arr['updated']);
$entry_elem->appendChild($updated);
Index: lib-story.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-story.php,v
retrieving revision 1.127
retrieving revision 1.128
diff -C2 -d -r1.127 -r1.128
*** lib-story.php 27 Jul 2008 18:10:09 -0000 1.127
--- lib-story.php 28 Jul 2008 19:35:46 -0000 1.128
***************
*** 1569,1572 ****
--- 1569,1573 ----
$output['id'] = $output['sid'];
$output['category'] = array($output['tid']);
+ $output['published'] = date('c', $output['date']);
$output['updated'] = date('c', $output['date']);
if (empty($output['bodytext'])) {
***************
*** 1654,1657 ****
--- 1655,1659 ----
$output_item['id'] = $output_item['sid'];
$output_item['category'] = array($output_item['tid']);
+ $output_item['published'] = date('c', $output_item['date']);
$output_item['updated'] = date('c', $output_item['date']);
if (empty($output_item['bodytext'])) {
More information about the geeklog-cvs
mailing list