From: Lo?c C. <lo...@us...> - 2001-04-29 11:06:31
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv24862/chat Modified Files: input.php3 Log Message: The '/!' command is no long stored as the previous message to be retained Index: input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** input.php3 2001/04/28 15:41:23 1.27 --- input.php3 2001/04/29 11:06:27 1.28 *************** *** 231,236 **** <input type="hidden" name="sent" value="0" /> <!-- Last sent message or command (used for the '/!' command) --> ! <input type="hidden" name="prevMessage" value="<?php echo(isset($message) ? str_replace('"', '"', $message) : ''); ?>" /> <!-- Addressee that will be filled when the user click on a nick at the users frame --> --- 231,250 ---- <input type="hidden" name="sent" value="0" /> + <?php + // Get the last submission to be retained: + // - nothing at first load; + // - the submission before the last if the '/!' command was the last one; + // - the last submission itself else. + if (!isset($message)) + { + $newPrevMessage = ''; + } + else + { + $newPrevMessage = str_replace('"', '"', (($displayMessage) ? $prevMessage : $message)); + } + ?> <!-- Last sent message or command (used for the '/!' command) --> ! <input type="hidden" name="prevMessage" value="<?php echo($newPrevMessage); ?>" /> <!-- Addressee that will be filled when the user click on a nick at the users frame --> |