cvs: pear /Net_SmartIRC SmartIRC.php

From: Date: Mon, 09 Jun 2003 12:02:22 +0000
Subject: cvs: pear /Net_SmartIRC SmartIRC.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-10801@lists.php.net to get a copy of this message
meebey Mon Jun 9 08:02:22 2003 EDT Modified files: /pear/Net_SmartIRC SmartIRC.php Log: - on a reconnect, the logfile won't be overwritten anymore. Index: pear/Net_SmartIRC/SmartIRC.php diff -u pear/Net_SmartIRC/SmartIRC.php:1.38 pear/Net_SmartIRC/SmartIRC.php:1.39 --- pear/Net_SmartIRC/SmartIRC.php:1.38 Sun Jun 8 20:32:02 2003 +++ pear/Net_SmartIRC/SmartIRC.php Mon Jun 9 08:02:22 2003 @@ -1,9 +1,9 @@ <?php /** - * $Id: SmartIRC.php,v 1.38 2003/06/09 00:32:02 meebey Exp $ - * $Revision: 1.38 $ + * $Id: SmartIRC.php,v 1.39 2003/06/09 12:02:22 meebey Exp $ + * $Revision: 1.39 $ * $Author: meebey $ - * $Date: 2003/06/09 00:32:02 $ + * $Date: 2003/06/09 12:02:22 $ * * Net_SmartIRC * Communication for PHP with IRC networks @@ -833,7 +833,12 @@ break; case SMARTIRC_FILE: if (!is_resource($this->_logfilefp)) { - $this->_logfilefp = @fopen($this->_logfile,'w+'); + if ($this->_logfilefp === null) { + // we reconncted and don't want to destroy the old log entries + $this->_logfilefp = @fopen($this->_logfile,'a'); + } else { + $this->_logfilefp = @fopen($this->_logfile,'w'); + } } @fwrite($this->_logfilefp, $formatedentry); fflush($this->_logfilefp);

« previous php.pear.cvs (#10801) next »