diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-09-08 01:03:38 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-09-08 01:12:34 +0200 |
commit | 552233d8fd27ca09fbed555582a9880771205929 (patch) | |
tree | 746c020d8692625a34cf3031a73a6a66a81ae6ea /phpBB/includes/functions_jabber.php | |
parent | 23b00d393cd39336befb81c4f422f4e04aefdbf4 (diff) | |
download | forums-552233d8fd27ca09fbed555582a9880771205929.tar forums-552233d8fd27ca09fbed555582a9880771205929.tar.gz forums-552233d8fd27ca09fbed555582a9880771205929.tar.bz2 forums-552233d8fd27ca09fbed555582a9880771205929.tar.xz forums-552233d8fd27ca09fbed555582a9880771205929.zip |
[ticket/11100] Mark can_use_ssl() and can_use_tls() as static.
PHPBB3-11100
Diffstat (limited to 'phpBB/includes/functions_jabber.php')
-rw-r--r-- | phpBB/includes/functions_jabber.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php index d76309d5bb..3d8e403f4b 100644 --- a/phpBB/includes/functions_jabber.php +++ b/phpBB/includes/functions_jabber.php @@ -68,7 +68,7 @@ class jabber } $this->password = $password; - $this->use_ssl = ($use_ssl && $this->can_use_ssl()) ? true : false; + $this->use_ssl = ($use_ssl && self::can_use_ssl()) ? true : false; // Change port if we use SSL if ($this->port == 5222 && $this->use_ssl) @@ -83,7 +83,7 @@ class jabber /** * Able to use the SSL functionality? */ - function can_use_ssl() + static public function can_use_ssl() { // Will not work with PHP >= 5.2.1 or < 5.2.3RC2 until timeout problem with ssl hasn't been fixed (http://bugs.php.net/41236) return ((version_compare(PHP_VERSION, '5.2.1', '<') || version_compare(PHP_VERSION, '5.2.3RC2', '>=')) && @extension_loaded('openssl')) ? true : false; @@ -92,7 +92,7 @@ class jabber /** * Able to use TLS? */ - function can_use_tls() + static public function can_use_tls() { if (!@extension_loaded('openssl') || !function_exists('stream_socket_enable_crypto') || !function_exists('stream_get_meta_data') || !function_exists('socket_set_blocking') || !function_exists('stream_get_wrappers')) { @@ -442,7 +442,7 @@ class jabber } // Let's use TLS if SSL is not enabled and we can actually use it - if (!$this->session['ssl'] && $this->can_use_tls() && $this->can_use_ssl() && isset($xml['stream:features'][0]['#']['starttls'])) + if (!$this->session['ssl'] && self::can_use_tls() && self::can_use_ssl() && isset($xml['stream:features'][0]['#']['starttls'])) { $this->add_to_log('Switching to TLS.'); $this->send("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>\n"); |