aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-03-18 14:32:49 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-03-18 14:32:49 +0000
commit337f1c33c9ee760db180d0628e756bed61c75020 (patch)
tree0e50bd2d264d9ffec83235656a1c8c8fac81a19a
parente1d5f76848be9564989e60189b31c5c4c4f673d7 (diff)
downloadforums-337f1c33c9ee760db180d0628e756bed61c75020.tar
forums-337f1c33c9ee760db180d0628e756bed61c75020.tar.gz
forums-337f1c33c9ee760db180d0628e756bed61c75020.tar.bz2
forums-337f1c33c9ee760db180d0628e756bed61c75020.tar.xz
forums-337f1c33c9ee760db180d0628e756bed61c75020.zip
Do not error out if php_uname function disabled / Authenticating on SMTP Server (Bug #22235 - patch by HoL)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8449 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/functions_messenger.php5
2 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 804be705ef..d2f233150a 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -140,6 +140,7 @@
<li>[Fix] Clean up who is online code in page_header (Bug #22715, thanks HighwayofLife)</li>
<li>[Fix] Pertain select single link on memberlist (Bug #23235 - patch provided by Schumi)</li>
<li>[Fix] Allow &amp; and | in local part of email addresses (Bug #22995)</li>
+ <li>[Fix] Do not error out if php_uname function disabled / Authenticating on SMTP Server (Bug #22235 - patch by HoL)</li>
</ul>
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index be78ad2999..90dbc33363 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -1056,8 +1056,7 @@ class smtp_class
global $user;
$err_msg = '';
- $local_host = php_uname('n');
- $local_host = (empty($local_host)) ? 'localhost' : $local_host;
+ $local_host = (function_exists('php_uname')) ? php_uname('n') : $user->host;
// If we are authenticating through pop-before-smtp, we
// have to login ones before we get authenticated
@@ -1332,7 +1331,7 @@ class smtp_class
// Realm
if (empty($tokens['realm']))
{
- $tokens['realm'] = php_uname('n');
+ $tokens['realm'] = (function_exists('php_uname')) ? php_uname('n') : $user->host;
}
// Maxbuf