aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_update.php10
-rw-r--r--phpBB/includes/db/mssqlnative.php26
-rw-r--r--phpBB/includes/functions_admin.php2
3 files changed, 31 insertions, 7 deletions
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index 3204e0204e..b0ce8f1084 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -51,6 +51,14 @@ class acp_update
$announcement_url = (strpos($announcement_url, '&') === false) ? str_replace('&', '&', $announcement_url) : $announcement_url;
$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update');
+ // next feature release
+ $next_feature_version = $next_feature_announcement_url = false;
+ if (isset($info[2]) && trim($info[2]) !== '')
+ {
+ $next_feature_version = trim($info[2]);
+ $next_feature_announcement_url = trim($info[3]);
+ }
+
// Determine automatic update...
$sql = 'SELECT config_value
FROM ' . CONFIG_TABLE . "
@@ -74,8 +82,10 @@ class acp_update
'LATEST_VERSION' => $latest_version,
'CURRENT_VERSION' => $config['version'],
'AUTO_VERSION' => $version_update_from,
+ 'NEXT_FEATURE_VERSION' => $next_feature_version,
'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_link),
+ 'UPGRADE_INSTRUCTIONS' => $next_feature_version ? $user->lang('UPGRADE_INSTRUCTIONS', $next_feature_version, $next_feature_announcement_url) : false,
));
}
}
diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/mssqlnative.php
index d6ac3b3acc..7ed4146f27 100644
--- a/phpBB/includes/db/mssqlnative.php
+++ b/phpBB/includes/db/mssqlnative.php
@@ -349,7 +349,8 @@ class dbal_mssqlnative extends dbal
{
$this->query_result = false;
- if ($offset === false || $offset == 0)
+ // total == 0 means all results - not zero results
+ if ($offset == 0 && $total !== 0)
{
if (strpos($query, "SELECT") === false)
{
@@ -360,13 +361,21 @@ class dbal_mssqlnative extends dbal
$query = preg_replace('/SELECT(\s*DISTINCT)?/Dsi', 'SELECT$1 TOP '.$total, $query);
}
}
- else
+ else if ($offset > 0)
{
$query = preg_replace('/SELECT(\s*DISTINCT)?/Dsi', 'SELECT$1 TOP(10000000) ', $query);
$query = 'SELECT *
FROM (SELECT sub2.*, ROW_NUMBER() OVER(ORDER BY sub2.line2) AS line3
- FROM (SELECT 1 AS line2, sub1.* FROM (' . $query . ') AS sub1) as sub2) AS sub3
- WHERE line3 BETWEEN ' . ($offset+1) . ' AND ' . ($offset + $total);
+ FROM (SELECT 1 AS line2, sub1.* FROM (' . $query . ') AS sub1) as sub2) AS sub3';
+
+ if ($total > 0)
+ {
+ $query .= ' WHERE line3 BETWEEN ' . ($offset+1) . ' AND ' . ($offset + $total);
+ }
+ else
+ {
+ $query .= ' WHERE line3 > ' . $offset;
+ }
}
$result = $this->sql_query($query, $cache_ttl);
@@ -406,13 +415,18 @@ class dbal_mssqlnative extends dbal
$row = @sqlsrv_fetch_array($query_id, SQLSRV_FETCH_ASSOC);
- // I hope i am able to remove this later... hopefully only a PHP or MSSQL bug
if ($row)
{
foreach ($row as $key => $value)
{
$row[$key] = ($value === ' ' || $value === NULL) ? '' : $value;
}
+
+ // remove helper values from LIMIT queries
+ if (isset($row['line2']))
+ {
+ unset($row['line2'], $row['line3']);
+ }
}
return $row;
}
@@ -624,4 +638,4 @@ class dbal_mssqlnative extends dbal
}
}
-?> \ No newline at end of file
+?>
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 3178d35c34..2aa12adb2e 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -3299,7 +3299,7 @@ function obtain_latest_version_info($force_update = false, $warn_fail = false, $
$errstr = '';
$errno = 0;
- $info = get_remote_file('www.phpbb.com', '/updatecheck',
+ $info = get_remote_file('version.phpbb.com', '/phpbb',
((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno);
if ($info === false)