aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-01-06 19:37:09 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-01-06 19:37:09 +0000
commit48b76be50b4f7c9e6e5a627887534d9115419afd (patch)
tree0f54a3d68a5f6d541f1ff26b07e4e6da034622a9 /phpBB/includes
parent962be6ed09bc19bb255e3e9bbe0194831a922f5c (diff)
downloadforums-48b76be50b4f7c9e6e5a627887534d9115419afd.tar
forums-48b76be50b4f7c9e6e5a627887534d9115419afd.tar.gz
forums-48b76be50b4f7c9e6e5a627887534d9115419afd.tar.bz2
forums-48b76be50b4f7c9e6e5a627887534d9115419afd.tar.xz
forums-48b76be50b4f7c9e6e5a627887534d9115419afd.zip
tiny alterations
git-svn-id: file:///svn/phpbb/trunk@6846 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_admin.php6
-rw-r--r--phpBB/includes/functions_messenger.php15
-rw-r--r--phpBB/includes/functions_upload.php9
3 files changed, 25 insertions, 5 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index f32bf00254..f1d51c8d71 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2580,7 +2580,7 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
{
$get_info = true;
}
- else if (strpos($line, '404 Not Found') !== false)
+ else if (stripos($line, '404 not found') !== false)
{
$errstr = $user->lang['FILE_NOT_FOUND'] . ': ' . $filename;
return false;
@@ -2593,11 +2593,13 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
{
if ($errstr)
{
+ // convert possible localized errstr to utf8
+ // $errstr = utf8_convert_message($errstr);
return false;
}
else
{
- $errstr = 'fsock disabled';
+ $errstr = $user->lang['FSOCK_DISABLED'];
return false;
}
}
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index a9e6011b8c..8ee887e09b 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -821,6 +821,11 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
// Ok we have error checked as much as we can to this point let's get on it already.
if (!$smtp->socket = @fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 20))
{
+ if ($errstr)
+ {
+ $errstr = utf8_convert_message($errstr);
+ }
+
$err_msg = (isset($user->lang['NO_CONNECT_TO_SMTP_HOST'])) ? sprintf($user->lang['NO_CONNECT_TO_SMTP_HOST'], $errno, $errstr) : "Could not connect to smtp host : $errno : $errstr";
return false;
}
@@ -1062,6 +1067,11 @@ class smtp_class
// able to get our ip for matching...
if (!$this->socket = @fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 10))
{
+ if ($errstr)
+ {
+ $errstr = utf8_convert_message($errstr);
+ }
+
$err_msg = (isset($user->lang['NO_CONNECT_TO_SMTP_HOST'])) ? sprintf($user->lang['NO_CONNECT_TO_SMTP_HOST'], $errno, $errstr) : "Could not connect to smtp host : $errno : $errstr";
return $err_msg;
}
@@ -1152,6 +1162,11 @@ class smtp_class
if (!$this->socket = @fsockopen($hostname, 110, $errno, $errstr, 10))
{
+ if ($errstr)
+ {
+ $errstr = utf8_convert_message($errstr);
+ }
+
return (isset($user->lang['NO_CONNECT_TO_SMTP_HOST'])) ? sprintf($user->lang['NO_CONNECT_TO_SMTP_HOST'], $errno, $errstr) : "Could not connect to smtp host : $errno : $errstr";
}
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 31687ab3fe..e28c7fa64f 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -649,6 +649,9 @@ class fileupload
$filename = $url['path'];
$filesize = 0;
+ $errno = 0;
+ $errstr = '';
+
if (!($fsock = @fsockopen($host, $port, $errno, $errstr)))
{
$file = new fileerror($user->lang[$this->error_prefix . 'NOT_UPLOADED']);
@@ -677,11 +680,11 @@ class fileupload
}
else
{
- if (strpos($line, 'Content-Type: ') !== false)
+ if (stripos($line, 'content-type: ') !== false)
{
- $upload_ary['type'] = rtrim(str_replace('Content-Type: ', '', $line));
+ $upload_ary['type'] = rtrim(str_replace('content-type: ', '', strtolower($line)));
}
- else if (strpos($line, '404 Not Found') !== false)
+ else if (stripos($line, '404 not found') !== false)
{
$file = new fileerror($user->lang[$this->error_prefix . 'URL_NOT_FOUND']);
return $file;