[Phpfreechat-svn] SF.net SVN: phpfreechat: [655] trunk/src/pfcinfo.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-07-17 08:56:26
|
Revision: 655 Author: kerphi Date: 2006-07-17 01:56:18 -0700 (Mon, 17 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=655&view=rev Log Message: ----------- Bug fix: the getLastMsg function ignored the number of last messages parameter (2nd parameter). Modified Paths: -------------- trunk/src/pfcinfo.class.php Modified: trunk/src/pfcinfo.class.php =================================================================== --- trunk/src/pfcinfo.class.php 2006-07-12 12:16:41 UTC (rev 654) +++ trunk/src/pfcinfo.class.php 2006-07-17 08:56:18 UTC (rev 655) @@ -58,15 +58,18 @@ function getLastMsg($channel, $nb) { + // to be sure the $nb params is a positive number + if ( !( $nb >= 0 ) ) $nb = 10; + // to get the channel recipient name // @todo must use another function to get a private message last messages $channel = pfcCommand_join::GetRecipient($channel); $container =& $this->getContainerInstance(); $lastmsg_id = $container->getLastId($channel); - $lastmsg_raw = $container->read($channel, $lastmsg_id-10); + $lastmsg_raw = $container->read($channel, $lastmsg_id-$nb); return $lastmsg_raw; } } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |