aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_jabber.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-09-17 22:02:28 +0000
committerNils Adermann <naderman@naderman.de>2006-09-17 22:02:28 +0000
commitea065f3e67ee0c0cb28c88569042461dd8cf2c27 (patch)
tree69f31f549e0020a741f6320000cd20f822bf7bc5 /phpBB/includes/functions_jabber.php
parente2ac2f9d7dda112adb9a548c8913108f83fb6391 (diff)
downloadforums-ea065f3e67ee0c0cb28c88569042461dd8cf2c27.tar
forums-ea065f3e67ee0c0cb28c88569042461dd8cf2c27.tar.gz
forums-ea065f3e67ee0c0cb28c88569042461dd8cf2c27.tar.bz2
forums-ea065f3e67ee0c0cb28c88569042461dd8cf2c27.tar.xz
forums-ea065f3e67ee0c0cb28c88569042461dd8cf2c27.zip
- no more encoding mixture, say hello to UTF-8 (I'll add a validation solution for PHP 4.3.3/4 ASAP) [side effect: fixes Bug #3762]
- take local server time into consideration for birthday/age calculation - faster active topic search - allow changing active topic time frame [Bug #4150] - reload stylesheet on language change [Bug #4222] git-svn-id: file:///svn/phpbb/trunk@6380 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_jabber.php')
-rw-r--r--phpBB/includes/functions_jabber.php67
1 files changed, 0 insertions, 67 deletions
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 96d2e686e4..9efe17dc6b 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -25,7 +25,6 @@
*/
class jabber
{
- var $encoding;
var $server;
var $port;
var $username;
@@ -68,8 +67,6 @@ class jabber
$this->packet_queue = $this->subscription_queue = array();
$this->iq_sleep_timer = $this->delay_disconnect = 1;
- $this->encoding = 'UTF-8';
-
$this->returned_keep_alive = true;
$this->txnid = 0;
@@ -454,7 +451,6 @@ class jabber
}
$this->_array_xmlspecialchars($content);
- $this->_array_conv_utf8($content);
$xml = "<message to='$to' type='$type' id='$id'>\n";
@@ -795,69 +791,6 @@ class jabber
$string = str_replace(array('&', '>', '<', '"', '\''), array('&amp;', '&gt;', '&lt;', '&quot;', '&apos;'), $string);
}
- /**
- * Recursively converts all elements in an array to UTF-8 from the encoding stored in {@link encoding the encoding attribute}.
- * @access private
- */
- function _array_conv_utf8(&$array)
- {
- // no need to do anything if the encoding already is UTF-8
- if (strtoupper($this->encoding) == 'UTF-8')
- {
- return true;
- }
-
- if (is_array($array))
- {
- foreach ($array as $k => $v)
- {
- if (is_array($v))
- {
- $this->_array_conv_utf8($array[$k]);
- }
- else
- {
- $this->_conv_utf8($array[$k]);
- }
- }
- }
- }
-
- /**
- * Converts a string to utf8 encoding.
- *
- * @param string $string has to have the same encoding as {@link encoding the encoding attribute} is set to.
- *
- * @return boolean True on success, false on failure.
- *
- * @access private
- */
- function _conv_utf8(&$string)
- {
- // no need to do anything if the encoding already is UTF-8
- if (strtoupper($this->encoding) == 'UTF-8')
- {
- return true;
- }
-
- // first try iconv then mb_convert_encoding and as a last fall back try recode_string
- if (function_exists('iconv') && (($string = iconv($this->encoding, 'UTF-8', $string)) !== false))
- {
- return true;
- }
- elseif (function_exists('mb_convert_encoding') && (($string = mb_convert_encoding($string, 'UTF-8', $this->encoding)) !== false))
- {
- return true;
- }
- elseif (function_exists('recode_string') && (($string = recode_string($this->encoding . '..UTF-8', $string)) !== false))
- {
- return true;
- }
-
- // if everything fails we will just have to live with what we have, good luck!
- return false;
- }
-
// ======================================================================
// <message/> parsers
// ======================================================================