[Ircphpstats-devel] [CVS] Module phpstats: Change committed
Status: Inactive
Brought to you by:
mrvolta
|
From: Mr. v. <mr...@us...> - 2003-07-11 20:06:09
|
Committer : volta <mr...@us...>
CVSROOT : /cvsroot/ircphpstats
Module : phpstats
Commit time: 2003-07-11 20:06:07 UTC
Modified files:
sqlfunctions.php
Log message:
Bugfix in sql_changekey(): the "'" char in the channel key causes a parser error in pg_exec().
---------------------- diff included ----------------------
Index: phpstats/sqlfunctions.php
diff -u phpstats/sqlfunctions.php:1.2 phpstats/sqlfunctions.php:1.3
--- phpstats/sqlfunctions.php:1.2 Thu Jun 5 01:40:05 2003
+++ phpstats/sqlfunctions.php Fri Jul 11 13:05:56 2003
@@ -5,7 +5,7 @@
E-mail: <vo...@gm...>
This program is free but copyrighted software; see the file LICENSE for
details.
- $Id: sqlfunctions.php,v 1.2 2003/06/05 08:40:05 mrvolta Exp $
+ $Id: sqlfunctions.php,v 1.3 2003/07/11 20:05:56 mrvolta Exp $
*/
$a = 1;
@@ -184,6 +184,7 @@
function sql_changekey ($channelname,$newkey) {
global $database;
$channelname = str_replace("'","\'",$channelname);
+ $newkey = str_replace("'","\'",$newkey);
if ($newkey == NULL) $newkey = "";
$query = "UPDATE channels SET key = '$newkey' WHERE name = '$channelname';";
pg_exec($database,$query);
----------------------- End of diff -----------------------
|