Author: chabotc
Date: Sun Jul 13 06:24:53 2008
New Revision: 676319
URL: http://svn.apache.org/viewvc?rev=676319&view=rev
Log:
Make title more accurate when result set < itemsPerPage .. done with the commit
spam now :)
Modified:
incubator/shindig/trunk/php/src/socialrest/converters/OutputAtomConverter.php
Modified:
incubator/shindig/trunk/php/src/socialrest/converters/OutputAtomConverter.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/socialrest/converters/OutputAtomConverter.php?rev=676319&r1=676318&r2=676319&view=diff
==============================================================================
---
incubator/shindig/trunk/php/src/socialrest/converters/OutputAtomConverter.php
(original)
+++
incubator/shindig/trunk/php/src/socialrest/converters/OutputAtomConverter.php
Sun Jul 13 06:24:53 2008
@@ -54,7 +54,8 @@
$entry = $this->addNode($doc, 'feed', '', false,
self::$nameSpace);
// Required Atom fields
- $this->addNode($entry, 'title', $requestType.' feed for
id '.$authorName.' ('.$startIndex. ' - '. (($startIndex + $itemsPerPage) - 1).'
of '.$totalResults.')');
+ $endPos = ($startIndex + $itemsPerPage) > $totalResults
? $totalResults : ($startIndex + $itemsPerPage);
+ $this->addNode($entry, 'title', $requestType.' feed for
id '.$authorName.' ('.$startIndex. ' - '. ($endPos - 1).' of
'.$totalResults.')');
$author = $this->addNode($entry, 'author');
$this->addNode($author, 'uri', $guid);
$this->addNode($author, 'name', $authorName);