[pLog-svn] r2378 - plog/branches/plog-1.0.2
Oscar Renalias
oscar at renalias.net
Tue Aug 30 19:06:54 GMT 2005
hope it's not too late to point this out, but I was fixing some other
issues with xmlrpc.php and I noticed that it doesn't work at all for
me because of this:
$item->getDateObject()->getTimestamp();
This statement does not work in php4... don't ask me why, but the
flawed implementation of objects in php4 does not allow this kind of
constructions so when coding, please write code for the lowest common
factor which in our case happens to be php 4.3.0.
I know php4 is getting old and outdated, but as long as most of our
users keep using this version, we'll have to support it!
Oscar
On 1 Aug 2005, at 09:33, pwestbro at devel.plogworld.net wrote:
> Author: pwestbro
> Date: 2005-08-01 06:33:24 +0000 (Mon, 01 Aug 2005)
> New Revision: 2378
>
> Modified:
> plog/branches/plog-1.0.2/xmlrpc.php
> Log:
> Fixed bug in xmlrpc where the date and times were not being
> reported correctly.
>
>
> Modified: plog/branches/plog-1.0.2/xmlrpc.php
> ===================================================================
> --- plog/branches/plog-1.0.2/xmlrpc.php 2005-07-29 19:06:54 UTC
> (rev 2377)
> +++ plog/branches/plog-1.0.2/xmlrpc.php 2005-08-01 06:33:24 UTC
> (rev 2378)
> @@ -317,13 +317,14 @@
> if ($erg != false)
> {
> $item = $articles->getUserArticle($postid, $erg->_id);
> + $time = $item->getDateObject()->getTimestamp();
> $time = mktime(
> - substr($item->_date,8,2),
> - substr($item->_date,10,2),
> - substr($item->_date,12,2),
> - substr($item->_date,4,2),
> - substr($item->_date,6,2),
> - substr($item->_date,0,4)
> + substr($time,8,2),
> + substr($time,10,2),
> + substr($time,12,2),
> + substr($time,4,2),
> + substr($time,6,2),
> + substr($time,0,4)
> );
>
> $dummy = array();
> @@ -356,13 +357,14 @@
> if ($erg != false)
> {
> $item = $articles->getUserArticle($postid, $erg->_id);
> + $time = $item->getDateObject()->getTimestamp();
> $time = mktime(
> - substr($item->_date,8,2),
> - substr($item->_date,10,2),
> - substr($item->_date,12,2),
> - substr($item->_date,4,2),
> - substr($item->_date,6,2),
> - substr($item->_date,0,4)
> + substr($time,8,2),
> + substr($time,10,2),
> + substr($time,12,2),
> + substr($time,4,2),
> + substr($time,6,2),
> + substr($time,0,4)
> );
>
> $articleCat = $item->getCategory();
> @@ -607,13 +609,14 @@
>
> foreach($list as $item)
> {
> + $time = $item->getDateObject()->getTimestamp();
> $time = mktime(
> - substr($item->_date,8,2),
> - substr($item->_date,10,2),
> - substr($item->_date,12,2),
> - substr($item->_date,4,2),
> - substr($item->_date,6,2),
> - substr($item->_date,0,4)
> + substr($time,8,2),
> + substr($time,10,2),
> + substr($time,12,2),
> + substr($time,4,2),
> + substr($time,6,2),
> + substr($time,0,4)
> );
>
> $dummy = array();
> @@ -659,13 +662,14 @@
>
> foreach($list as $item)
> {
> + $time = $item->getDateObject()->getTimestamp();
> $time = mktime(
> - substr($item->_date,8,2),
> - substr($item->_date,10,2),
> - substr($item->_date,12,2),
> - substr($item->_date,4,2),
> - substr($item->_date,6,2),
> - substr($item->_date,0,4)
> + substr($time,8,2),
> + substr($time,10,2),
> + substr($time,12,2),
> + substr($time,4,2),
> + substr($time,6,2),
> + substr($time,0,4)
> );
>
> $articleCat = $item->getCategory();
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>
>
More information about the pLog-svn
mailing list