[Phpfreechat-svn] SF.net SVN: phpfreechat:[1268] trunk
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2010-01-14 19:47:10
|
Revision: 1268 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1268&view=rev Author: kerphi Date: 2010-01-14 19:47:03 +0000 (Thu, 14 Jan 2010) Log Message: ----------- fixes few php warnings Modified Paths: -------------- trunk/demo/demo32_show_last_messages-chat.php trunk/demo/demo32_show_last_messages-config.php trunk/demo/demo34_add_a_link_on_nicknames.php trunk/demo/demo43_change_the_nicknames_colors.php trunk/demo/demo5_customized_style.php trunk/src/containers/file.class.php trunk/src/pfcglobalconfig.class.php Modified: trunk/demo/demo32_show_last_messages-chat.php =================================================================== --- trunk/demo/demo32_show_last_messages-chat.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo32_show_last_messages-chat.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -2,7 +2,7 @@ require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; require_once dirname(__FILE__)."/demo32_show_last_messages-config.php"; -$chat = new phpFreeChat($pfc_config); +$chat = new phpFreeChat($params); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Modified: trunk/demo/demo32_show_last_messages-config.php =================================================================== --- trunk/demo/demo32_show_last_messages-config.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo32_show_last_messages-config.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -1,10 +1,10 @@ <?php require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; +$params = array(); $params["title"] = "Show last posted messages channel"; $params["serverid"] = md5($params["title"]); // calculate a unique id for this chat $params["max_msg"] = 20; $params["channels"] = array("channel1"); -$pfc_config =& pfcGlobalConfig::Instance( $params ); ?> \ No newline at end of file Modified: trunk/demo/demo34_add_a_link_on_nicknames.php =================================================================== --- trunk/demo/demo34_add_a_link_on_nicknames.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo34_add_a_link_on_nicknames.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -33,7 +33,7 @@ ?> <?php - $filename = dirname(__FILE__)."/demo34_add_a_link_on_nicknames/mytheme/customize.js"; + $filename = dirname(__FILE__)."/demo34_add_a_link_on_nicknames/mytheme/customize.js.php"; echo "<p><code>".$filename."</code></p>"; echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; $content = file_get_contents($filename); Modified: trunk/demo/demo43_change_the_nicknames_colors.php =================================================================== --- trunk/demo/demo43_change_the_nicknames_colors.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo43_change_the_nicknames_colors.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -32,14 +32,5 @@ echo "</pre>"; ?> -<?php - $filename = dirname(__FILE__)."/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php"; - echo "<p><code>".$filename."</code></p>"; - echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; - $content = file_get_contents($filename); - highlight_string($content); - echo "</pre>"; -?> - </body> </html> \ No newline at end of file Modified: trunk/demo/demo5_customized_style.php =================================================================== --- trunk/demo/demo5_customized_style.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo5_customized_style.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -41,7 +41,7 @@ ?> <?php - $filename = dirname(__FILE__)."/demo5_customized_style_data/mytheme/templates/style.css.tpl.php"; + $filename = dirname(__FILE__)."/demo5_customized_style_data/mytheme/style.css.php"; echo "<p><code>".$filename."</code></p>"; echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; $content = file_get_contents($filename); Modified: trunk/src/containers/file.class.php =================================================================== --- trunk/src/containers/file.class.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/src/containers/file.class.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -2,7 +2,7 @@ /** * file.class.php * - * Copyright \xA9 2006 Stephane Gully <ste...@gm...> + * Copyright � 2006 Stephane Gully <ste...@gm...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -110,7 +110,7 @@ $leafexists = file_exists($leaffilename); if ($leafvalue == NULL) { - unlink($leaffilename); + @unlink($leaffilename); touch($leaffilename); } else Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/src/pfcglobalconfig.class.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -962,15 +962,15 @@ if (in_array('log',$this->proxies)) { // test the LOCK_EX feature because the log proxy needs to write in a file - $filename = $c->data_private_path.'/filemtime2.test'; + $filename = $this->data_private_path.'/filemtime2.test'; if (is_writable(dirname($filename))) { - $data1 = time(); - file_put_contents($filename, $data1, LOCK_EX); - $data2 = file_get_contents($filename); - if ($data1 != $data2) { - unset($this->proxies[array_search('log',$this->proxies)]); - } + $data1 = time(); + file_put_contents($filename, $data1, LOCK_EX); + $data2 = file_get_contents($filename); + if ($data1 != $data2) { + unset($this->proxies[array_search('log',$this->proxies)]); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |