From f4a4bd8fac188ebc9cda822ffc811c218fd92b45 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Thu, 20 Oct 2011 12:18:42 -0500 Subject: adding new license file (OSL 3.0) and updating readme to ReST added notice of license to all source files. OSL to all except the few files we ship inside of the application folder, those are AFL. Updated license in user guide. incrementing next dev version to 3.0 due to licensing change --- system/database/drivers/mssql/mssql_result.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 2897ca5a5..a8cd7c982 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -4,10 +4,22 @@ * * An open source application development framework for PHP 5.1.6 or newer * + * NOTICE OF LICENSE + * + * Licensed under the Open Software License version 3.0 + * + * This source file is subject to the Open Software License (OSL 3.0) that is + * bundled with this package in the files license.txt / license.rst. It is + * also available through the world wide web at this URL: + * http://opensource.org/licenses/OSL-3.0 + * If you did not receive a copy of the license and are unable to obtain it + * through the world wide web, please send an email to + * licensing@ellislab.com so we can send you a copy immediately. + * * @package CodeIgniter - * @author ExpressionEngine Dev Team - * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. - * @license http://codeigniter.com/user_guide/license.html + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. (http://ellislab.com/) + * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 * @filesource @@ -21,7 +33,7 @@ * This class extends the parent result class: CI_DB_result * * @category Database - * @author ExpressionEngine Dev Team + * @author EllisLab Dev Team * @link http://codeigniter.com/user_guide/database/ */ class CI_DB_mssql_result extends CI_DB_result { -- cgit v1.2.3-24-g4f1b From 0defe5d33ee2633f377a109519ca818becc60f64 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Sun, 1 Jan 2012 18:46:41 -0600 Subject: Updating copyright date to 2012 --- system/database/drivers/mssql/mssql_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index a8cd7c982..bba2e6243 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -18,7 +18,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/) * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 -- cgit v1.2.3-24-g4f1b From 4da24f8f1137afbaa2ec51d9c9fb635df1481472 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 25 Jan 2012 21:54:23 +0200 Subject: Improve the MSSQL database driver --- system/database/drivers/mssql/mssql_result.php | 50 +++++++++++--------------- 1 file changed, 20 insertions(+), 30 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index bba2e6243..579cd3de7 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -1,13 +1,13 @@ -result_id); } @@ -54,10 +51,9 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Number of fields in the result set * - * @access public - * @return integer + * @return int */ - function num_fields() + public function num_fields() { return @mssql_num_fields($this->result_id); } @@ -69,10 +65,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Generates an array of column names * - * @access public * @return array */ - function list_fields() + public function list_fields() { $field_names = array(); while ($field = mssql_fetch_field($this->result_id)) @@ -90,20 +85,19 @@ class CI_DB_mssql_result extends CI_DB_result { * * Generates an array of objects containing field meta-data * - * @access public * @return array */ - function field_data() + public function field_data() { $retval = array(); while ($field = mssql_fetch_field($this->result_id)) { - $F = new stdClass(); - $F->name = $field->name; - $F->type = $field->type; + $F = new stdClass(); + $F->name = $field->name; + $F->type = $field->type; $F->max_length = $field->max_length; $F->primary_key = 0; - $F->default = ''; + $F->default = ''; $retval[] = $F; } @@ -116,9 +110,9 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Free the result * - * @return null + * @return void */ - function free_result() + public function free_result() { if (is_resource($this->result_id)) { @@ -132,14 +126,13 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Data Seek * - * Moves the internal pointer to the desired offset. We call + * Moves the internal pointer to the desired offset. We call * this internally before fetching results to make sure the * result set starts at zero * - * @access private * @return array */ - function _data_seek($n = 0) + public function _data_seek($n = 0) { return mssql_data_seek($this->result_id, $n); } @@ -151,10 +144,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an array * - * @access private * @return array */ - function _fetch_assoc() + protected function _fetch_assoc() { return mssql_fetch_assoc($this->result_id); } @@ -166,16 +158,14 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an object * - * @access private * @return object */ - function _fetch_object() + protected function _fetch_object() { return mssql_fetch_object($this->result_id); } } - /* End of file mssql_result.php */ -/* Location: ./system/database/drivers/mssql/mssql_result.php */ \ No newline at end of file +/* Location: ./system/database/drivers/mssql/mssql_result.php */ -- cgit v1.2.3-24-g4f1b From 07c1ac830b4e98aa40f48baef3dd05fb68c0a836 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Fri, 9 Mar 2012 17:03:37 +0000 Subject: Bumped CodeIgniter's PHP requirement to 5.2.4. Yes I know PHP 5.4 just came out, and yes I know PHP 5.3 has lovely features, but there are plenty of corporate systems running on CodeIgniter and PHP 5.3 still is not widely supported enough. CodeIgniter is great for distributed applications, and this is the highest we can reasonably go without breaking support. PHP 5.3 will most likely happen in another year or so. Fingers crossed on that one anyway... --- system/database/drivers/mssql/mssql_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index bba2e6243..b205ce2d1 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -2,7 +2,7 @@ /** * CodeIgniter * - * An open source application development framework for PHP 5.1.6 or newer + * An open source application development framework for PHP 5.2.4 or newer * * NOTICE OF LICENSE * -- cgit v1.2.3-24-g4f1b From ba1ebbefa9c5d225fa28c76dac276e6120263a25 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 19 Mar 2012 17:48:46 -0400 Subject: Added access modifiers for MSSQL driver --- system/database/drivers/mssql/mssql_result.php | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index b205ce2d1..ff899406c 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -41,10 +41,9 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Number of rows in the result set * - * @access public * @return integer */ - function num_rows() + public function num_rows() { return @mssql_num_rows($this->result_id); } @@ -54,10 +53,9 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Number of fields in the result set * - * @access public * @return integer */ - function num_fields() + public function num_fields() { return @mssql_num_fields($this->result_id); } @@ -69,10 +67,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Generates an array of column names * - * @access public * @return array */ - function list_fields() + public function list_fields() { $field_names = array(); while ($field = mssql_fetch_field($this->result_id)) @@ -90,10 +87,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Generates an array of objects containing field meta-data * - * @access public * @return array */ - function field_data() + public function field_data() { $retval = array(); while ($field = mssql_fetch_field($this->result_id)) @@ -118,7 +114,7 @@ class CI_DB_mssql_result extends CI_DB_result { * * @return null */ - function free_result() + public function free_result() { if (is_resource($this->result_id)) { @@ -136,10 +132,9 @@ class CI_DB_mssql_result extends CI_DB_result { * this internally before fetching results to make sure the * result set starts at zero * - * @access private * @return array */ - function _data_seek($n = 0) + protected function _data_seek($n = 0) { return mssql_data_seek($this->result_id, $n); } @@ -151,10 +146,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an array * - * @access private * @return array */ - function _fetch_assoc() + protected function _fetch_assoc() { return mssql_fetch_assoc($this->result_id); } @@ -166,16 +160,14 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an object * - * @access private * @return object */ - function _fetch_object() + protected function _fetch_object() { return mssql_fetch_object($this->result_id); } } - /* End of file mssql_result.php */ /* Location: ./system/database/drivers/mssql/mssql_result.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 8c1b2dc39d104774b3a7be87dc41f2b702bb883c Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 19 Mar 2012 19:07:18 -0400 Subject: Revert "Added access modifiers for MSSQL driver" This reverts commit ba1ebbefa9c5d225fa28c76dac276e6120263a25. --- system/database/drivers/mssql/mssql_result.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index ff899406c..b205ce2d1 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -41,9 +41,10 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Number of rows in the result set * + * @access public * @return integer */ - public function num_rows() + function num_rows() { return @mssql_num_rows($this->result_id); } @@ -53,9 +54,10 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Number of fields in the result set * + * @access public * @return integer */ - public function num_fields() + function num_fields() { return @mssql_num_fields($this->result_id); } @@ -67,9 +69,10 @@ class CI_DB_mssql_result extends CI_DB_result { * * Generates an array of column names * + * @access public * @return array */ - public function list_fields() + function list_fields() { $field_names = array(); while ($field = mssql_fetch_field($this->result_id)) @@ -87,9 +90,10 @@ class CI_DB_mssql_result extends CI_DB_result { * * Generates an array of objects containing field meta-data * + * @access public * @return array */ - public function field_data() + function field_data() { $retval = array(); while ($field = mssql_fetch_field($this->result_id)) @@ -114,7 +118,7 @@ class CI_DB_mssql_result extends CI_DB_result { * * @return null */ - public function free_result() + function free_result() { if (is_resource($this->result_id)) { @@ -132,9 +136,10 @@ class CI_DB_mssql_result extends CI_DB_result { * this internally before fetching results to make sure the * result set starts at zero * + * @access private * @return array */ - protected function _data_seek($n = 0) + function _data_seek($n = 0) { return mssql_data_seek($this->result_id, $n); } @@ -146,9 +151,10 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an array * + * @access private * @return array */ - protected function _fetch_assoc() + function _fetch_assoc() { return mssql_fetch_assoc($this->result_id); } @@ -160,14 +166,16 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an object * + * @access private * @return object */ - protected function _fetch_object() + function _fetch_object() { return mssql_fetch_object($this->result_id); } } + /* End of file mssql_result.php */ /* Location: ./system/database/drivers/mssql/mssql_result.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 215890b015d219f0d31e8ad678b0b655e6923f3b Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Tue, 20 Mar 2012 09:38:16 -0400 Subject: Remove extraneous newlines --- system/database/drivers/mssql/mssql_result.php | 1 - 1 file changed, 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index b205ce2d1..c77c5a752 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -176,6 +176,5 @@ class CI_DB_mssql_result extends CI_DB_result { } - /* End of file mssql_result.php */ /* Location: ./system/database/drivers/mssql/mssql_result.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 11559020f790fe7be8018aa42663e9d5976f012a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 20 Mar 2012 16:04:48 +0200 Subject: Visibility declarations and cleanup for CI_DB_mssql_result --- system/database/drivers/mssql/mssql_result.php | 37 ++++++++++---------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index c77c5a752..2723f4614 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -1,13 +1,13 @@ -result_id); } @@ -54,10 +51,9 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Number of fields in the result set * - * @access public - * @return integer + * @return int */ - function num_fields() + public function num_fields() { return @mssql_num_fields($this->result_id); } @@ -69,10 +65,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Generates an array of column names * - * @access public * @return array */ - function list_fields() + public function list_fields() { $field_names = array(); while ($field = mssql_fetch_field($this->result_id)) @@ -90,10 +85,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Generates an array of objects containing field meta-data * - * @access public * @return array */ - function field_data() + public function field_data() { $retval = array(); while ($field = mssql_fetch_field($this->result_id)) @@ -116,9 +110,9 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Free the result * - * @return null + * @return void */ - function free_result() + public function free_result() { if (is_resource($this->result_id)) { @@ -136,10 +130,9 @@ class CI_DB_mssql_result extends CI_DB_result { * this internally before fetching results to make sure the * result set starts at zero * - * @access private * @return array */ - function _data_seek($n = 0) + protected function _data_seek($n = 0) { return mssql_data_seek($this->result_id, $n); } @@ -151,10 +144,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an array * - * @access private * @return array */ - function _fetch_assoc() + protected function _fetch_assoc() { return mssql_fetch_assoc($this->result_id); } @@ -166,10 +158,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an object * - * @access private * @return object */ - function _fetch_object() + protected function _fetch_object() { return mssql_fetch_object($this->result_id); } -- cgit v1.2.3-24-g4f1b From 8f3566fffcb9015ba53dbf52922fc5724ffa6045 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 12 Apr 2012 14:30:05 +0300 Subject: Changed default CI_DB_result::_data_seek() return value to FALSE and removed the method from drivers that don't support it --- system/database/drivers/mssql/mssql_result.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 2723f4614..4cc87f4cf 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -126,11 +126,11 @@ class CI_DB_mssql_result extends CI_DB_result { /** * Data Seek * - * Moves the internal pointer to the desired offset. We call + * Moves the internal pointer to the desired offset. We call * this internally before fetching results to make sure the * result set starts at zero * - * @return array + * @return bool */ protected function _data_seek($n = 0) { -- cgit v1.2.3-24-g4f1b From c7db6bb9b64c8322af4d727bcb71122cd7f09dbf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 5 Jul 2012 15:11:20 +0300 Subject: Clean-up the separate drivers' DB result classes from no longer needed methods --- system/database/drivers/mssql/mssql_result.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 5929306af..62996aac1 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -33,6 +33,7 @@ * @category Database * @author EllisLab Dev Team * @link http://codeigniter.com/user_guide/database/ + * @since 1.3 */ class CI_DB_mssql_result extends CI_DB_result { @@ -43,7 +44,9 @@ class CI_DB_mssql_result extends CI_DB_result { */ public function num_rows() { - return @mssql_num_rows($this->result_id); + return is_int($this->num_rows) + ? $this->num_rows + : $this->num_rows = @mssql_num_rows($this->result_id); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 9a4f356846daa078c077cbadb227524c857b8f97 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 6 Jul 2012 11:57:37 +0300 Subject: _fetch_object(), custom_result_object() to utilize PHP's native capability to directly return custom class results --- system/database/drivers/mssql/mssql_result.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 62996aac1..aeede3f4b 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -26,7 +26,7 @@ */ /** - * MS SQL Result Class + * MSSQL Result Class * * This class extends the parent result class: CI_DB_result * @@ -161,11 +161,25 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an object * + * @param string * @return object */ - protected function _fetch_object() + protected function _fetch_object($class_name = 'stdClass') { - return mssql_fetch_object($this->result_id); + $row = @mssql_fetch_object($this->result_id); + + if ($class_name === 'stdClass' OR ! $row) + { + return $row; + } + + $class_name = new $class_name(); + foreach ($row as $key => $value) + { + $class_name->$key = $value; + } + + return $class_name; } } -- cgit v1.2.3-24-g4f1b From 5fd3ae8d33a4f5d3159b86683b9a670e973a63f5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 24 Oct 2012 14:55:35 +0300 Subject: [ci skip] style and phpdoc-related changes (rel #1295) --- system/database/drivers/mssql/mssql_result.php | 1 + 1 file changed, 1 insertion(+) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index aeede3f4b..84d2814f1 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -133,6 +133,7 @@ class CI_DB_mssql_result extends CI_DB_result { * this internally before fetching results to make sure the * result set starts at zero * + * @param int $n = 0 * @return bool */ protected function _data_seek($n = 0) -- cgit v1.2.3-24-g4f1b From c5536aac5752054f7f76e448d58b86407d8f574e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Nov 2012 17:33:58 +0200 Subject: Manually apply PR #1594 (fixing phpdoc page-level generation/warnings) Also partially fixes issue #1295, fixes inconsistencies in some page-level docblocks and adds include checks in language files. --- system/database/drivers/mssql/mssql_result.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 84d2814f1..11849f005 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -1,4 +1,4 @@ - Date: Fri, 2 Nov 2012 02:16:28 +0200 Subject: [ci skip] DocBlocks for DB drivers' result classes Partially fixes issue #1295. --- system/database/drivers/mssql/mssql_result.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 11849f005..c74c70abf 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -132,9 +132,9 @@ class CI_DB_mssql_result extends CI_DB_result { * * Moves the internal pointer to the desired offset. We call * this internally before fetching results to make sure the - * result set starts at zero + * result set starts at zero. * - * @param int $n = 0 + * @param int $n * @return bool */ protected function _data_seek($n = 0) @@ -163,7 +163,7 @@ class CI_DB_mssql_result extends CI_DB_result { * * Returns the result set as an object * - * @param string + * @param string $class_name * @return object */ protected function _fetch_object($class_name = 'stdClass') -- cgit v1.2.3-24-g4f1b From f1e1b7789b9adaf0b38b8386c99f46fc37507c8f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 16 Nov 2012 01:27:00 +0200 Subject: Improve DB field_data() for MSSQL / SQL Server --- system/database/drivers/mssql/mssql_result.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index c74c70abf..a8f850d72 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -94,16 +94,14 @@ class CI_DB_mssql_result extends CI_DB_result { public function field_data() { $retval = array(); - while ($field = mssql_fetch_field($this->result_id)) + for ($i = 0, $c = $this->num_field(); $i < $c; $i++) { - $F = new stdClass(); - $F->name = $field->name; - $F->type = $field->type; - $F->max_length = $field->max_length; - $F->primary_key = 0; - $F->default = ''; - - $retval[] = $F; + $field = mssql_fetch_field($this->result_id, $i); + + $retval[$i] = new stdClass(); + $retval[$i]->name = $field->name; + $retval[$i]->type = $field->type; + $retval[$i]->max_length = $field->max_length; } return $retval; -- cgit v1.2.3-24-g4f1b From 69edc4368d6c6588936b3b6c8bcb9d36626d363a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 4 Dec 2012 13:32:16 +0200 Subject: Rename DB_result _data_seek() to data_seek() and make it publicly available (as requested in #2050) --- system/database/drivers/mssql/mssql_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index a8f850d72..ca222aed4 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -135,7 +135,7 @@ class CI_DB_mssql_result extends CI_DB_result { * @param int $n * @return bool */ - protected function _data_seek($n = 0) + public function data_seek($n = 0) { return mssql_data_seek($this->result_id, $n); } -- cgit v1.2.3-24-g4f1b From 80500afbd188600212ca913a7bac073009feac73 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 1 Jan 2013 08:16:53 +0200 Subject: [ci skip] Happy new year --- system/database/drivers/mssql/mssql_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index ca222aed4..ea3f8e4d1 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -18,7 +18,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/) * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 -- cgit v1.2.3-24-g4f1b From b835a4f3b3f8fccd7ce457d4ab13344d3dcb91a9 Mon Sep 17 00:00:00 2001 From: Chris Buckley Date: Mon, 28 Jan 2013 23:35:13 +0000 Subject: Fix list_fields seek bug On the first list_fields call, the field pointer is moved to the end of the list of fields. This change ensures that the pointer is positioned at the start of the field list before grabbing the names. Signed-off-by: Chris Buckley --- system/database/drivers/mssql/mssql_result.php | 1 + 1 file changed, 1 insertion(+) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index ea3f8e4d1..b6e5f2b17 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -74,6 +74,7 @@ class CI_DB_mssql_result extends CI_DB_result { public function list_fields() { $field_names = array(); + mssql_field_seek($this->result_id, 0); while ($field = mssql_fetch_field($this->result_id)) { $field_names[] = $field->name; -- cgit v1.2.3-24-g4f1b From 871754af60251993d640981e107d2def5f2db396 Mon Sep 17 00:00:00 2001 From: darwinel Date: Tue, 11 Feb 2014 17:34:57 +0100 Subject: 2013 > 2014 Update copyright notices from 2013 to 2014. And update one calendar example in user_guide from year 2013/2014 to 2014/2015. --- system/database/drivers/mssql/mssql_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index b6e5f2b17..cce93740f 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -18,7 +18,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 -- cgit v1.2.3-24-g4f1b From 2bbbd1a13ead097fd3f4b00bfb275f0b0f836f93 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 May 2014 10:24:14 +0300 Subject: Remove (most of) error suppression from database drivers (issue #3036) --- system/database/drivers/mssql/mssql_result.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index cce93740f..f3ee987ed 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -47,7 +47,7 @@ class CI_DB_mssql_result extends CI_DB_result { { return is_int($this->num_rows) ? $this->num_rows - : $this->num_rows = @mssql_num_rows($this->result_id); + : $this->num_rows = mssql_num_rows($this->result_id); } // -------------------------------------------------------------------- @@ -59,7 +59,7 @@ class CI_DB_mssql_result extends CI_DB_result { */ public function num_fields() { - return @mssql_num_fields($this->result_id); + return mssql_num_fields($this->result_id); } // -------------------------------------------------------------------- @@ -167,7 +167,7 @@ class CI_DB_mssql_result extends CI_DB_result { */ protected function _fetch_object($class_name = 'stdClass') { - $row = @mssql_fetch_object($this->result_id); + $row = mssql_fetch_object($this->result_id); if ($class_name === 'stdClass' OR ! $row) { -- cgit v1.2.3-24-g4f1b From bdb96ca1b1dbfc1791172fd169d7751cbc4d7d55 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Oct 2014 00:13:31 +0200 Subject: [ci skip] Switch to MIT license; close #3293 --- system/database/drivers/mssql/mssql_result.php | 42 +++++++++++++++++--------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index f3ee987ed..b58b6c5d9 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -4,24 +4,35 @@ * * An open source application development framework for PHP 5.2.4 or newer * - * NOTICE OF LICENSE + * This content is released under the MIT License (MIT) * - * Licensed under the Open Software License version 3.0 + * Copyright (c) 2014, British Columbia Institute of Technology * - * This source file is subject to the Open Software License (OSL 3.0) that is - * bundled with this package in the files license.txt / license.rst. It is - * also available through the world wide web at this URL: - * http://opensource.org/licenses/OSL-3.0 - * If you did not receive a copy of the license and are unable to obtain it - * through the world wide web, please send an email to - * licensing@ellislab.com so we can send you a copy immediately. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: * - * @package CodeIgniter - * @author EllisLab Dev Team + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) - * @link http://codeigniter.com - * @since Version 1.0 + * @copyright Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/) + * @license http://opensource.org/licenses/MIT MIT License + * @link http://codeigniter.com + * @since Version 1.3.0 * @filesource */ defined('BASEPATH') OR exit('No direct script access allowed'); @@ -31,10 +42,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * This class extends the parent result class: CI_DB_result * + * @package CodeIgniter + * @subpackage Drivers * @category Database * @author EllisLab Dev Team * @link http://codeigniter.com/user_guide/database/ - * @since 1.3 */ class CI_DB_mssql_result extends CI_DB_result { -- cgit v1.2.3-24-g4f1b From fe9309d22c1b088f5363954d6dac013c8c955894 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Jan 2015 17:48:58 +0200 Subject: Bulk (mostly documentation) update - Remove PHP version from license notices - Bump year number in copyright notices - Recommend PHP 5.4 or newer to be used - Tell Travis-CI to test on PHP 5.3.0 instead of the latest 5.3 version Related: #3450 --- system/database/drivers/mssql/mssql_result.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index b58b6c5d9..0f6dcd21e 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -2,11 +2,11 @@ /** * CodeIgniter * - * An open source application development framework for PHP 5.2.4 or newer + * An open source application development framework for PHP * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014, British Columbia Institute of Technology + * Copyright (c) 2014 - 2015, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 -- cgit v1.2.3-24-g4f1b From 4cbe463b4c442e0e2dae2f43565e77f7ac5ecb86 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 21 Jan 2015 22:56:22 +0100 Subject: Remove closing blocks at end of PHP files --- system/database/drivers/mssql/mssql_result.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 0f6dcd21e..8828dc9e6 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -196,6 +196,3 @@ class CI_DB_mssql_result extends CI_DB_result { } } - -/* End of file mssql_result.php */ -/* Location: ./system/database/drivers/mssql/mssql_result.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 8194ce50c3eae0f371e338d9093b99e2ff1b4d16 Mon Sep 17 00:00:00 2001 From: Gabriel Potkány Date: Wed, 4 Feb 2015 10:34:24 +0100 Subject: Fix typos in func names --- system/database/drivers/mssql/mssql_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 8828dc9e6..c1c42a486 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -107,7 +107,7 @@ class CI_DB_mssql_result extends CI_DB_result { public function field_data() { $retval = array(); - for ($i = 0, $c = $this->num_field(); $i < $c; $i++) + for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) { $field = mssql_fetch_field($this->result_id, $i); -- cgit v1.2.3-24-g4f1b From 125ef4751080a2118cb203357d77687699e3eb25 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:33:00 +0200 Subject: [ci skip] Bump year to 2016 --- system/database/drivers/mssql/mssql_result.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index c1c42a486..af1e4d794 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 -- cgit v1.2.3-24-g4f1b From bd202c91b0e9cf0a8c93bcaa71df9574f5909346 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:50:18 +0200 Subject: [ci skip] Update codeigniter.com links to https --- system/database/drivers/mssql/mssql_result.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index af1e4d794..bd747c77b 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mssql_result extends CI_DB_result { -- cgit v1.2.3-24-g4f1b From 1924e879b165fb119847a49a7a5eab2f28295fa2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:55:34 +0200 Subject: [ci skip] Update ellislab.com links to https too --- system/database/drivers/mssql/mssql_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index bd747c77b..b62bf75cb 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com -- cgit v1.2.3-24-g4f1b From da60e9bc66ec90970fbd2dfd08b0a6e66b9f5f5f Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sat, 31 Dec 2016 08:46:18 -0800 Subject: Update copyright data to 2017 --- system/database/drivers/mssql/mssql_result.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/mssql/mssql_result.php') diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index b62bf75cb..38a0a0574 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2016, British Columbia Institute of Technology + * Copyright (c) 2014 - 2017, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 -- cgit v1.2.3-24-g4f1b