Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv12273/lib
Modified Files:
common.lib.php3 banish.lib.php3
Log Message:
Too many details have been changed.... See by yourself
Index: common.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/common.lib.php3,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** common.lib.php3 2001/04/10 15:00:05 1.3
--- common.lib.php3 2001/04/13 08:59:26 1.4
***************
*** 366,378 ****
*
* @param string string to slash
*
! * @return string slashed/unslashed string
*
* @access public
*/
! function pmcSlashSingleQuotes($str = '')
{
! return str_replace('\'', '\\\'', $str);
} // end of the 'pmcSlashSingleQuotes()' function
?>
--- 366,401 ----
*
* @param string string to slash
+ * @param integer number of slashes to add before a single quote
*
! * @return string slashed string
*
* @access public
*/
! function pmcSlashSingleQuotes($str = '', $runTimes = 1)
{
! $replaceBy = '\\\'';
! for ($i = 1; $i < $runTimes; $i++)
! $replaceBy = '\\' . $replaceBy;
! return str_replace('\'', $replaceBy, $str);
} // end of the 'pmcSlashSingleQuotes()' function
+
+ /**
+ * Add backslashes before double quotes in a string (used for html forms
+ * fields)
+ *
+ * @param string string to slash
+ * @param integer number of slashes to add before a double quote
+ *
+ * @return string slashed string
+ *
+ * @access public
+ */
+ function pmcSlashDoubleQuotes($str = '', $runTimes = 1)
+ {
+ $replaceBy = '\\"';
+ for ($i = 1; $i < $runTimes; $i++)
+ $replaceBy = '\\' . $replaceBy;
+ return str_replace('"', $replaceBy, $str);
+ } // end of the 'pmcSlashDoubleQuotes()' function
?>
Index: banish.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/banish.lib.php3,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** banish.lib.php3 2001/04/03 20:10:14 1.1
--- banish.lib.php3 2001/04/13 08:59:26 1.2
***************
*** 117,121 ****
// Add the nick to the banished users table if necessary
if ($isBanished)
! $dbLink->query("INSERT INTO " . C_BAN_TBL . " VALUES ('$slashedNick', '$latin1', '$ip', '$banishedFromRooms', '$banUntil')");
} // end of the case where IP is banished from some rooms
else
--- 117,121 ----
// Add the nick to the banished users table if necessary
if ($isBanished)
! $dbLink->query("INSERT INTO " . C_BAN_TBL . " VALUES ('$slashedNick', $latin1, '$ip', '$banishedFromRooms', '$banUntil')");
} // end of the case where IP is banished from some rooms
else
|