Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv18584/chat/lib
Modified Files:
smilies.lib.php3
Log Message:
Fixed a lacking file extension for the ':mine:' code and problems with iso-8859-1 charset
Index: smilies.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/smilies.lib.php3,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** smilies.lib.php3 2001/05/30 19:26:11 1.15
--- smilies.lib.php3 2001/06/18 18:51:38 1.16
***************
*** 93,108 ****
&& ($prop = @getImageSize('./images/smilies/reserved/' . $dbSessionVars['nick'] . '.gif')))
{
! $smilies[':mine:'] = array('reserved/' . $dbSessionVars['nick'], $prop[0], $prop[1]);
}
// '<' and '>' characters may have been converted to their html entities
! // inside messages
! reset($smilies);
! while (list($key, $prop) = each($smilies))
{
! if (strpos(' ' . $key, '>') + strpos(' ' . $key, '<') > 0)
{
! $modifiedKey = str_replace('>', '>', str_replace('<', '<', $key));
! $smilies[$modifiedKey] = $prop;
}
}
--- 93,112 ----
&& ($prop = @getImageSize('./images/smilies/reserved/' . $dbSessionVars['nick'] . '.gif')))
{
! $smilies[':mine:'] = array('reserved/' . $dbSessionVars['nick'] . '.gif', $prop[0], $prop[1]);
}
// '<' and '>' characters may have been converted to their html entities
! // inside messages (skipped for iso-8859-1 charsets because all the smilies
! // codes will be translated in html entities
! if (!$GLOBALS['latin1'])
{
! reset($smilies);
! while (list($key, $prop) = each($smilies))
{
! if (strpos(' ' . $key, '>') + strpos(' ' . $key, '<') > 0)
! {
! $modifiedKey = str_replace('>', '>', str_replace('<', '<', $key));
! $smilies[$modifiedKey] = $prop;
! }
}
}
***************
*** 192,195 ****
--- 196,203 ----
while ((list($key, $prop) = each($smilies)) && ($replacedCnt < C_MAX_GSMILIES))
{
+ if ($GLOBALS['latin1'])
+ {
+ $key = htmlentities($key);
+ }
$pos = 0;
$substrDone = '';
|