aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/driver/mssql_odbc.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/db/driver/mssql_odbc.php')
-rw-r--r--phpBB/phpbb/db/driver/mssql_odbc.php36
1 files changed, 10 insertions, 26 deletions
diff --git a/phpBB/phpbb/db/driver/mssql_odbc.php b/phpBB/phpbb/db/driver/mssql_odbc.php
index a1d1a5d5dd..34b913dc8a 100644
--- a/phpBB/phpbb/db/driver/mssql_odbc.php
+++ b/phpBB/phpbb/db/driver/mssql_odbc.php
@@ -7,13 +7,7 @@
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\db\driver;
/**
* Unified ODBC functions
@@ -26,13 +20,13 @@ if (!defined('IN_PHPBB'))
*
* @package dbal
*/
-class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
+class mssql_odbc extends \phpbb\db\driver\mssql_base
{
var $last_query_text = '';
var $connect_error = '';
/**
- * Connect to server
+ * {@inheritDoc}
*/
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
{
@@ -89,10 +83,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
}
/**
- * Version information about used database
- * @param bool $raw if true, only return the fetched sql_server_version
- * @param bool $use_cache If true, it is safe to retrieve the value from the cache
- * @return string sql server version
+ * {@inheritDoc}
*/
function sql_server_info($raw = false, $use_cache = true)
{
@@ -150,13 +141,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
}
/**
- * Base query method
- *
- * @param string $query Contains the SQL query which shall be executed
- * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
- * @return mixed When casted to bool the returned value returns true on success and false on failure
- *
- * @access public
+ * {@inheritDoc}
*/
function sql_query($query = '', $cache_ttl = 0)
{
@@ -242,7 +227,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
}
/**
- * Return number of affected rows
+ * {@inheritDoc}
*/
function sql_affectedrows()
{
@@ -250,8 +235,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
}
/**
- * Fetch current row
- * @note number of bytes returned depends on odbc.defaultlrl php.ini setting. If it is limited to 4K for example only 4K of data is returned max.
+ * {@inheritDoc}
*/
function sql_fetchrow($query_id = false)
{
@@ -271,7 +255,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
}
/**
- * Get last inserted id after insert statement
+ * {@inheritDoc}
*/
function sql_nextid()
{
@@ -292,7 +276,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
}
/**
- * Free sql result
+ * {@inheritDoc}
*/
function sql_freeresult($query_id = false)
{
@@ -303,7 +287,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
$query_id = $this->query_result;
}
- if ($cache && $cache->sql_exists($query_id))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}