From: Lo?c C. <lo...@us...> - 2001-04-13 08:59:05
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv12175 Modified Files: input.php3 handle_input.php3 Log Message: Too many details have been changed.... See by yourself Index: input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** input.php3 2001/04/12 23:45:34 1.14 --- input.php3 2001/04/13 08:59:00 1.15 *************** *** 49,55 **** pmcGrabGlobals($toGrab); if (!empty($msgTo)) ! $msgTo = pmcHandleMagicQuotes($msgTo, '1', '', 'del'); if (!empty($message)) ! $message = pmcHandleMagicQuotes($message, '1', '', 'del'); /** --- 49,57 ---- pmcGrabGlobals($toGrab); if (!empty($msgTo)) ! $msgTo = pmcHandleMagicQuotes($msgTo, 1, '', 'del'); ! if (!empty($prevMessage)) ! $prevMessage = pmcHandleMagicQuotes($prevMessage, 1, '', 'del'); if (!empty($message)) ! $message = pmcHandleMagicQuotes($message, 1, '', 'del'); /** *************** *** 70,74 **** */ require('./localization/' . $dbSessionVars['lang'] . '/chat.loc'); ! $latin1 = (L_CHARSET == 'iso-8859-1'); /** --- 72,76 ---- */ require('./localization/' . $dbSessionVars['lang'] . '/chat.loc'); ! $latin1 = (L_CHARSET == 'iso-8859-1') ? 1 : 0; /** *************** *** 140,149 **** } - // Put the message in the 'messages' table - if (empty($msgTo)) - $slashedMsgTo = 'NULL'; - else - $slashedMsgTo = '\'' . pmcSlashSingleQuotes($msgTo) . '\''; - $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' . 'VALUES (' --- 142,145 ---- *************** *** 153,161 **** . $latin1 . ', ' . time() . ', ' ! . $slashedMsgTo . ', ' . '\'' . $color . '\', ' . '\'' . pmcSlashSingleQuotes($originalMessage) . '\', ' . '\'' . pmcSlashSingleQuotes($enhancedMessage) . '\'' ! . ')'; $dbLink->query($msgQuery); --- 149,157 ---- . $latin1 . ', ' . time() . ', ' ! . 'NULL, ' . '\'' . $color . '\', ' . '\'' . pmcSlashSingleQuotes($originalMessage) . '\', ' . '\'' . pmcSlashSingleQuotes($enhancedMessage) . '\'' ! .')'; $dbLink->query($msgQuery); *************** *** 181,186 **** * Displays the frame * ! * Uses the 'pmcUrlForStyleSheet()' function from the ! * 'chat/lib/common.lib.php3' library */ // The url for the style sheet --- 177,183 ---- * Displays the frame * ! * Uses the 'pmcUrlForStyleSheet()', the 'pmcSlashSingleQuotes()' and the ! * 'pmcSlashDoubleQuotes()' functions from the ! * 'chat/lib/common.lib.php3' library */ // The url for the style sheet *************** *** 226,230 **** <!-- Last sent message or command (used for the '/!' command) --> ! <input type="hidden" name="prevMessage" value="<?php echo(isset($message) ? htmlspecialchars(stripslashes($message)) : ''); ?>" /> <!-- Addressee that will be filled when the user click on a nick at the users frame --> --- 223,227 ---- <!-- Last sent message or command (used for the '/!' command) --> ! <input type="hidden" name="prevMessage" value="<?php echo(isset($message) ? pmcSlashDoubleQuotes($message) : ''); ?>" /> <!-- Addressee that will be filled when the user click on a nick at the users frame --> *************** *** 245,251 **** // - last submission if it was an erroneous command; // - else nothing. ! $msgValue = ($displayMessage) ? htmlspecialchars($prevMessage) : ''; if (isset($error) && !($isCommand)) ! $msgValue = htmlspecialchars($message); ?> <!-- Message box --> --- 242,248 ---- // - last submission if it was an erroneous command; // - else nothing. ! $msgValue = ($displayMessage) ? pmcSlashDoubleQuotes($prevMessage) : ''; if (isset($error) && !($isCommand)) ! $msgValue = pmcSlashDoubleQuotes($message); ?> <!-- Message box --> Index: handle_input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/handle_input.php3,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** handle_input.php3 2001/04/12 23:45:34 1.12 --- handle_input.php3 2001/04/13 08:59:00 1.13 *************** *** 49,55 **** pmcGrabGlobals($toGrab); if (!empty($msgTo)) ! $msgTo = pmcHandleMagicQuotes($msgTo, '1', '', 'del'); if (!empty($message)) ! $message = pmcHandleMagicQuotes($message, '1', '', 'del'); /** --- 49,57 ---- pmcGrabGlobals($toGrab); if (!empty($msgTo)) ! $msgTo = pmcHandleMagicQuotes($msgTo, 1, '', 'del'); ! if (!empty($prevMessage)) ! $prevMessage = pmcHandleMagicQuotes($prevMessage, 1, '', 'del'); if (!empty($message)) ! $message = pmcHandleMagicQuotes($message, 1, '', 'del'); /** *************** *** 70,74 **** */ require('./localization/' . $dbSessionVars['lang'] . '/chat.loc'); ! $latin1 = (L_CHARSET == 'iso-8859-1'); /** --- 72,76 ---- */ require('./localization/' . $dbSessionVars['lang'] . '/chat.loc'); ! $latin1 = (L_CHARSET == 'iso-8859-1') ? 1 : 0; /** *************** *** 141,150 **** } - // Put the message in the 'messages' table - if (empty($msgTo)) - $slashedMsgTo = 'NULL'; - else - $slashedMsgTo = '\'' . pmcSlashSingleQuotes($msgTo) . '\''; - $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' . 'VALUES (' --- 143,146 ---- *************** *** 154,158 **** . $latin1 . ', ' . time() . ', ' ! . $slashedMsgTo . ', ' . '\'' . $color . '\', ' . '\'' . pmcSlashSingleQuotes($originalMessage) . '\', ' --- 150,154 ---- . $latin1 . ', ' . time() . ', ' ! . 'NULL, ' . '\'' . $color . '\', ' . '\'' . pmcSlashSingleQuotes($originalMessage) . '\', ' *************** *** 181,184 **** --- 177,183 ---- /** * "Displays" the frame + * + * The 'pmcSlashSingleQuotes()' and the 'pmcSlashDoubleQuotes()' functions are + * defined in the 'chat/lib/common.lib.php3' script */ ?> *************** *** 196,200 **** with (window.parent.frames['input'].window.document.forms['inputForm']) { ! elements['prevMessage'].value = '<?php echo(isset($message) ? pmcSlashSingleQuotes(htmlspecialchars($message)) : ''); ?>'; <?php --- 195,199 ---- with (window.parent.frames['input'].window.document.forms['inputForm']) { ! elements['prevMessage'].value = '<?php echo(isset($message) ? pmcSlashSingleQuotes(pmcSlashDoubleQuotes($message)) : ''); ?>'; <?php *************** *** 203,209 **** // - last submission if it was an erroneous command; // - else nothing. ! $msgValue = ($displayMessage) ? htmlspecialchars($prevMessage) : ''; if (isset($error) && !($isCommand)) ! $msgValue = pmcSlashSingleQuotes(htmlspecialchars($message)); ?> elements['message'].value = '<?php echo($msgValue); ?>'; --- 202,208 ---- // - last submission if it was an erroneous command; // - else nothing. ! $msgValue = ($displayMessage) ? pmcSlashDoubleQuotes($prevMessage) : ''; if (isset($error) && !($isCommand)) ! $msgValue = pmcSlashSingleQuotes(pmcSlashDoubleQuotes($message)); ?> elements['message'].value = '<?php echo($msgValue); ?>'; |