aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rwxr-xr-x[-rw-r--r--]phpBB/includes/db/mssqlnative.php8
-rw-r--r--phpBB/includes/functions_messenger.php7
-rw-r--r--phpBB/includes/mcp/mcp_queue.php19
-rw-r--r--phpBB/includes/search/fulltext_mysql.php2
4 files changed, 26 insertions, 10 deletions
diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/mssqlnative.php
index 98e22d4412..44d5722e4f 100644..100755
--- a/phpBB/includes/db/mssqlnative.php
+++ b/phpBB/includes/db/mssqlnative.php
@@ -503,6 +503,7 @@ class dbal_mssqlnative extends dbal
{
$errors = @sqlsrv_errors(SQLSRV_ERR_ERRORS);
$error_message = '';
+ $code = 0;
if ($errors != null)
{
@@ -510,6 +511,7 @@ class dbal_mssqlnative extends dbal
{
$error_message .= "SQLSTATE: ".$error[ 'SQLSTATE']."\n";
$error_message .= "code: ".$error[ 'code']."\n";
+ $code = $error['code'];
$error_message .= "message: ".$error[ 'message']."\n";
}
$this->last_error_result = $error_message;
@@ -519,7 +521,11 @@ class dbal_mssqlnative extends dbal
{
$error = (isset($this->last_error_result) && $this->last_error_result) ? $this->last_error_result : array();
}
- return $error;
+
+ return array(
+ 'message' => $error,
+ 'code' => $code,
+ );
}
/**
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 99883cd9ca..bb0d88ec1b 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -671,11 +671,18 @@ class queue
$package_size = $data_ary['package_size'];
$num_items = (!$package_size || sizeof($data_ary['data']) < $package_size) ? sizeof($data_ary['data']) : $package_size;
+ /*
+ * This code is commented out because it causes problems on some web hosts.
+ * The core problem is rather restrictive email sending limits.
+ * This code is nly useful if you have no such restrictions from the
+ * web host and the package size setting is wrong.
+
// If the amount of emails to be sent is way more than package_size than we need to increase it to prevent backlogs...
if (sizeof($data_ary['data']) > $package_size * 2.5)
{
$num_items = sizeof($data_ary['data']);
}
+ */
switch ($object)
{
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index f84a8c5f07..e43881fab2 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -691,16 +691,19 @@ function approve_post($post_id_list, $id, $mode)
{
$show_notify = false;
- foreach ($post_info as $post_data)
+ if ($config['email_enable'] || $config['jab_enable'])
{
- if ($post_data['poster_id'] == ANONYMOUS)
- {
- continue;
- }
- else
+ foreach ($post_info as $post_data)
{
- $show_notify = true;
- break;
+ if ($post_data['poster_id'] == ANONYMOUS)
+ {
+ continue;
+ }
+ else
+ {
+ $show_notify = true;
+ break;
+ }
}
}
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index da3833754e..0be3a10e5f 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -122,7 +122,7 @@ class fulltext_mysql extends search_backend
if ($terms == 'all')
{
- $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#\+#', '#-#', '#\|#');
+ $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#(^|\s)\+#', '#(^|\s)-#', '#(^|\s)\|#');
$replace = array(' +', ' |', ' -', ' +', ' -', ' |');
$keywords = preg_replace($match, $replace, $keywords);