Skip to content

Commit

Permalink
fixes few php warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://phpfreechat.svn.sourceforge.net/svnroot/phpfreechat/trunk@1268 2772adf2-ac07-0410-9d30-e29d8120292e
  • Loading branch information
kerphi committed Jan 14, 2010
1 parent 06d6178 commit bc12670
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion demo/demo32_show_last_messages-chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion demo/demo32_show_last_messages-config.php
Original file line number Diff line number Diff line change
@@ -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 );

?>
2 changes: 1 addition & 1 deletion demo/demo34_add_a_link_on_nicknames.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 0 additions & 9 deletions demo/demo43_change_the_nicknames_colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion demo/demo5_customized_style.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/containers/file.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* file.class.php
*
* Copyright © 2006 Stephane Gully <[email protected]>
* Copyright 2006 Stephane Gully <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -110,7 +110,7 @@ function setMeta($group, $subgroup, $leaf, $leafvalue = NULL)
$leafexists = file_exists($leaffilename);
if ($leafvalue == NULL)
{
unlink($leaffilename);
@unlink($leaffilename);
touch($leaffilename);
}
else
Expand Down
14 changes: 7 additions & 7 deletions src/pfcglobalconfig.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -962,15 +962,15 @@ function init()

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)]);
}
}
}

Expand Down

0 comments on commit bc12670

Please sign in to comment.