mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 01:36:57 +02:00
- introduce new function build_url to easily build a valid url from the user->page object as well as optionally removing certain keys
- changed attachment config to utilize the config build methods - cleaned up posting.php - the submit/delete_post functions are now usable (functions_posting.php) - adjusted header icons (transparency) - a bunch of fixes for mssql - bug fixes git-svn-id: file:///svn/phpbb/trunk@5902 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -98,7 +98,6 @@ class dbal_mssql extends dbal
|
||||
{
|
||||
global $cache;
|
||||
|
||||
|
||||
// EXPLAIN only in extra debug mode
|
||||
if (defined('DEBUG_EXTRA'))
|
||||
{
|
||||
@@ -315,17 +314,33 @@ class dbal_mssql extends dbal
|
||||
*/
|
||||
function _sql_error()
|
||||
{
|
||||
|
||||
$error = array(
|
||||
'message' => @mssql_get_last_message($this->db_connect_id),
|
||||
'code' => ''
|
||||
);
|
||||
|
||||
$result_id = @mssql_query('SELECT @@ERROR as errno', $this->db_connect_id);
|
||||
// Get error code number
|
||||
$result_id = @mssql_query('SELECT @@ERROR as code', $this->db_connect_id);
|
||||
if ($result_id)
|
||||
{
|
||||
$row = @mssql_fetch_assoc($result_id);
|
||||
$error['code'] = $row['errno'];
|
||||
$error['code'] = $row['code'];
|
||||
@mssql_free_result($result_id);
|
||||
}
|
||||
|
||||
// Get full error message if possible
|
||||
$sql = 'SELECT CAST(description as varchar(255)) as message
|
||||
FROM master.dbo.sysmessages
|
||||
WHERE error = ' . $error['code'];
|
||||
$result_id = @mssql_query($sql);
|
||||
|
||||
if ($result_id)
|
||||
{
|
||||
$row = @mssql_fetch_assoc($result_id);
|
||||
if (!empty($row['message']))
|
||||
{
|
||||
$error['message'] .= '<br />' . $row['message'];
|
||||
}
|
||||
@mssql_free_result($result_id);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user