[Phpfreechat-svn] SF.net SVN: phpfreechat: [705] trunk/src/containers/file.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-08-26 09:31:21
|
Revision: 705 Author: kerphi Date: 2006-08-26 02:31:12 -0700 (Sat, 26 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=705&view=rev Log Message: ----------- [en] Bug fix: in the default file container, the old messages were never deleted. (thanks to dan_m2k, thehermit and AkS for the bug report) [fr] Bug fix?\194?\160: dans le conteneur par d?\195?\169faut (file), les vieux messages n'?\195?\169taient jamais d?\195?\169truits. (merci ?\195?\160 dan_m2k, thehermit et AkS pour le rapport de bug) Modified Paths: -------------- trunk/src/containers/file.class.php Modified: trunk/src/containers/file.class.php =================================================================== --- trunk/src/containers/file.class.php 2006-08-25 19:55:44 UTC (rev 704) +++ trunk/src/containers/file.class.php 2006-08-26 09:31:12 UTC (rev 705) @@ -475,6 +475,11 @@ // write message file_put_contents($msg_filename, $data); + + // delete the obsolete message + $old_msg_id = $msg_id - $c->max_msg - 20; + if ($old_msg_id > 0 && file_exists($msg_dir."/".$old_msg_id)) + @unlink($msg_dir."/".$old_msg_id); return $msg_id; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |