[Phpfreechat-svn] SF.net SVN: phpfreechat: [1042] trunk/src/commands/getnewmsg.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2007-06-30 19:24:59
|
Revision: 1042 http://svn.sourceforge.net/phpfreechat/?rev=1042&view=rev Author: kerphi Date: 2007-06-30 12:24:58 -0700 (Sat, 30 Jun 2007) Log Message: ----------- Bug fix: when max_msg was null and a new channel was joined dynamicaly, the new posted message were invisible (thanks to white_devil) Bug fix : lorsque max_msg ?\195?\169tait null et qu'un nouveau salon ?\195?\169tait cr?\195?\169?\195?\169 dynamiquement, les prochain messages envoy?\195?\169s dans le salon ?\195?\169taient invisibles (merci ?\195?\160 white_devil) Modified Paths: -------------- trunk/src/commands/getnewmsg.class.php Modified: trunk/src/commands/getnewmsg.class.php =================================================================== --- trunk/src/commands/getnewmsg.class.php 2007-06-30 19:21:04 UTC (rev 1041) +++ trunk/src/commands/getnewmsg.class.php 2007-06-30 19:24:58 UTC (rev 1042) @@ -48,16 +48,16 @@ // create a new lock $_SESSION["pfc_lock_readnewmsg_".$c->getId()."_".$clientid] = time(); - // read the last from_id value $container =& pfcContainer::Instance(); $from_id_sid = "pfc_from_id_".$c->getId()."_".$clientid."_".$recipientid; + $from_id = 0; if (isset($_SESSION[$from_id_sid])) $from_id = $_SESSION[$from_id_sid]; else { - $from_id = $container->getLastId($recipient)-$c->max_msg; + $from_id = $container->getLastId($recipient) - $c->max_msg - 1; if ($from_id < 0) $from_id = 0; } // check if this is the first time you get messages This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |