@@ -95,10 +95,10 @@ |
||
95 | 95 | { |
96 | 96 | $info = ibase_field_info($this->result_id, $i); |
97 | 97 | |
98 | - $retval[$i] = new stdClass(); |
|
98 | + $retval[$i] = new stdClass(); |
|
99 | 99 | $retval[$i]->name = $info['name']; |
100 | 100 | $retval[$i]->type = $info['type']; |
101 | - $retval[$i]->max_length = $info['length']; |
|
101 | + $retval[$i]->max_length = $info['length']; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | return $retval; |
@@ -1,40 +1,40 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * CodeIgniter |
|
4 | - * |
|
5 | - * An open source application development framework for PHP |
|
6 | - * |
|
7 | - * This content is released under the MIT License (MIT) |
|
8 | - * |
|
9 | - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
10 | - * |
|
11 | - * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
12 | - * of this software and associated documentation files (the "Software"), to deal |
|
13 | - * in the Software without restriction, including without limitation the rights |
|
14 | - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
15 | - * copies of the Software, and to permit persons to whom the Software is |
|
16 | - * furnished to do so, subject to the following conditions: |
|
17 | - * |
|
18 | - * The above copyright notice and this permission notice shall be included in |
|
19 | - * all copies or substantial portions of the Software. |
|
20 | - * |
|
21 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
22 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
23 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
24 | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
25 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
26 | - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
27 | - * THE SOFTWARE. |
|
28 | - * |
|
29 | - * @package CodeIgniter |
|
30 | - * @author EllisLab Dev Team |
|
31 | - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
32 | - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
33 | - * @license http://opensource.org/licenses/MIT MIT License |
|
34 | - * @link http://codeigniter.com |
|
35 | - * @since Version 3.0.0 |
|
36 | - * @filesource |
|
37 | - */ |
|
3 | + * CodeIgniter |
|
4 | + * |
|
5 | + * An open source application development framework for PHP |
|
6 | + * |
|
7 | + * This content is released under the MIT License (MIT) |
|
8 | + * |
|
9 | + * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
10 | + * |
|
11 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
12 | + * of this software and associated documentation files (the "Software"), to deal |
|
13 | + * in the Software without restriction, including without limitation the rights |
|
14 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
15 | + * copies of the Software, and to permit persons to whom the Software is |
|
16 | + * furnished to do so, subject to the following conditions: |
|
17 | + * |
|
18 | + * The above copyright notice and this permission notice shall be included in |
|
19 | + * all copies or substantial portions of the Software. |
|
20 | + * |
|
21 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
22 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
23 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
24 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
25 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
26 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
27 | + * THE SOFTWARE. |
|
28 | + * |
|
29 | + * @package CodeIgniter |
|
30 | + * @author EllisLab Dev Team |
|
31 | + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
32 | + * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
33 | + * @license http://opensource.org/licenses/MIT MIT License |
|
34 | + * @link http://codeigniter.com |
|
35 | + * @since Version 3.0.0 |
|
36 | + * @filesource |
|
37 | + */ |
|
38 | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
39 | 39 | |
40 | 40 | /** |
@@ -111,10 +111,10 @@ |
||
111 | 111 | { |
112 | 112 | $field = mssql_fetch_field($this->result_id, $i); |
113 | 113 | |
114 | - $retval[$i] = new stdClass(); |
|
114 | + $retval[$i] = new stdClass(); |
|
115 | 115 | $retval[$i]->name = $field->name; |
116 | 116 | $retval[$i]->type = $field->type; |
117 | - $retval[$i]->max_length = $field->max_length; |
|
117 | + $retval[$i]->max_length = $field->max_length; |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | return $retval; |
@@ -122,7 +122,7 @@ |
||
122 | 122 | $retval = array(); |
123 | 123 | for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) |
124 | 124 | { |
125 | - $retval[$i] = new stdClass(); |
|
125 | + $retval[$i] = new stdClass(); |
|
126 | 126 | $retval[$i]->name = mysql_field_name($this->result_id, $i); |
127 | 127 | $retval[$i]->type = mysql_field_type($this->result_id, $i); |
128 | 128 | $retval[$i]->max_length = mysql_field_len($this->result_id, $i); |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | if (is_array($this->encrypt)) |
135 | 135 | { |
136 | 136 | $ssl = array(); |
137 | - empty($this->encrypt['ssl_key']) OR $ssl['key'] = $this->encrypt['ssl_key']; |
|
138 | - empty($this->encrypt['ssl_cert']) OR $ssl['cert'] = $this->encrypt['ssl_cert']; |
|
139 | - empty($this->encrypt['ssl_ca']) OR $ssl['ca'] = $this->encrypt['ssl_ca']; |
|
137 | + empty($this->encrypt['ssl_key']) OR $ssl['key'] = $this->encrypt['ssl_key']; |
|
138 | + empty($this->encrypt['ssl_cert']) OR $ssl['cert'] = $this->encrypt['ssl_cert']; |
|
139 | + empty($this->encrypt['ssl_ca']) OR $ssl['ca'] = $this->encrypt['ssl_ca']; |
|
140 | 140 | empty($this->encrypt['ssl_capath']) OR $ssl['capath'] = $this->encrypt['ssl_capath']; |
141 | 141 | empty($this->encrypt['ssl_cipher']) OR $ssl['cipher'] = $this->encrypt['ssl_cipher']; |
142 | 142 | |
@@ -149,9 +149,9 @@ discard block |
||
149 | 149 | |
150 | 150 | $client_flags |= MYSQLI_CLIENT_SSL; |
151 | 151 | $mysqli->ssl_set( |
152 | - isset($ssl['key']) ? $ssl['key'] : NULL, |
|
153 | - isset($ssl['cert']) ? $ssl['cert'] : NULL, |
|
154 | - isset($ssl['ca']) ? $ssl['ca'] : NULL, |
|
152 | + isset($ssl['key']) ? $ssl['key'] : NULL, |
|
153 | + isset($ssl['cert']) ? $ssl['cert'] : NULL, |
|
154 | + isset($ssl['ca']) ? $ssl['ca'] : NULL, |
|
155 | 155 | isset($ssl['capath']) ? $ssl['capath'] : NULL, |
156 | 156 | isset($ssl['cipher']) ? $ssl['cipher'] : NULL |
157 | 157 | ); |
@@ -430,16 +430,16 @@ discard block |
||
430 | 430 | $retval = array(); |
431 | 431 | for ($i = 0, $c = count($query); $i < $c; $i++) |
432 | 432 | { |
433 | - $retval[$i] = new stdClass(); |
|
434 | - $retval[$i]->name = $query[$i]->Field; |
|
433 | + $retval[$i] = new stdClass(); |
|
434 | + $retval[$i]->name = $query[$i]->Field; |
|
435 | 435 | |
436 | 436 | sscanf($query[$i]->Type, '%[a-z](%d)', |
437 | 437 | $retval[$i]->type, |
438 | 438 | $retval[$i]->max_length |
439 | 439 | ); |
440 | 440 | |
441 | - $retval[$i]->default = $query[$i]->Default; |
|
442 | - $retval[$i]->primary_key = (int) ($query[$i]->Key === 'PRI'); |
|
441 | + $retval[$i]->default = $query[$i]->Default; |
|
442 | + $retval[$i]->primary_key = (int) ($query[$i]->Key === 'PRI'); |
|
443 | 443 | } |
444 | 444 | |
445 | 445 | return $retval; |
@@ -104,8 +104,7 @@ discard block |
||
104 | 104 | empty($this->database) OR $this->dsn .= ';dbname='.$this->database; |
105 | 105 | empty($this->char_set) OR $this->dsn .= ';charset='.$this->char_set; |
106 | 106 | empty($this->appname) OR $this->dsn .= ';appname='.$this->appname; |
107 | - } |
|
108 | - else |
|
107 | + } else |
|
109 | 108 | { |
110 | 109 | if ( ! empty($this->char_set) && strpos($this->dsn, 'charset=', 6) === FALSE) |
111 | 110 | { |
@@ -282,8 +281,7 @@ discard block |
||
282 | 281 | if (count($this->qb_select) === 0) |
283 | 282 | { |
284 | 283 | $select = '*'; // Inevitable |
285 | - } |
|
286 | - else |
|
284 | + } else |
|
287 | 285 | { |
288 | 286 | // Use only field names and their aliases, everything else is out of our scope. |
289 | 287 | $select = array(); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @var string |
55 | 55 | */ |
56 | - protected $_create_database = 'CREATE DATABASE %s CHARACTER SET %s COLLATE %s'; |
|
56 | + protected $_create_database = 'CREATE DATABASE %s CHARACTER SET %s COLLATE %s'; |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * CREATE TABLE keys flag |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @var bool |
65 | 65 | */ |
66 | - protected $_create_table_keys = TRUE; |
|
66 | + protected $_create_table_keys = TRUE; |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * UNSIGNED support |
70 | 70 | * |
71 | 71 | * @var array |
72 | 72 | */ |
73 | - protected $_unsigned = array( |
|
73 | + protected $_unsigned = array( |
|
74 | 74 | 'TINYINT', |
75 | 75 | 'SMALLINT', |
76 | 76 | 'MEDIUMINT', |
@@ -162,14 +162,12 @@ discard block |
||
162 | 162 | $field[$i] = ($alter_type === 'ADD') |
163 | 163 | ? "\n\tADD ".$field[$i]['_literal'] |
164 | 164 | : "\n\tMODIFY ".$field[$i]['_literal']; |
165 | - } |
|
166 | - else |
|
165 | + } else |
|
167 | 166 | { |
168 | 167 | if ($alter_type === 'ADD') |
169 | 168 | { |
170 | 169 | $field[$i]['_literal'] = "\n\tADD "; |
171 | - } |
|
172 | - else |
|
170 | + } else |
|
173 | 171 | { |
174 | 172 | $field[$i]['_literal'] = empty($field[$i]['new_name']) ? "\n\tMODIFY " : "\n\tCHANGE "; |
175 | 173 | } |
@@ -235,8 +233,7 @@ discard block |
||
235 | 233 | continue; |
236 | 234 | } |
237 | 235 | } |
238 | - } |
|
239 | - elseif ( ! isset($this->fields[$this->keys[$i]])) |
|
236 | + } elseif ( ! isset($this->fields[$this->keys[$i]])) |
|
240 | 237 | { |
241 | 238 | unset($this->keys[$i]); |
242 | 239 | continue; |
@@ -110,12 +110,12 @@ |
||
110 | 110 | $field_data = $this->result_id->fetch_fields(); |
111 | 111 | for ($i = 0, $c = count($field_data); $i < $c; $i++) |
112 | 112 | { |
113 | - $retval[$i] = new stdClass(); |
|
113 | + $retval[$i] = new stdClass(); |
|
114 | 114 | $retval[$i]->name = $field_data[$i]->name; |
115 | 115 | $retval[$i]->type = $field_data[$i]->type; |
116 | 116 | $retval[$i]->max_length = $field_data[$i]->max_length; |
117 | 117 | $retval[$i]->primary_key = (int) ($field_data[$i]->flags & 2); |
118 | - $retval[$i]->default = $field_data[$i]->def; |
|
118 | + $retval[$i]->default = $field_data[$i]->def; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | return $retval; |
@@ -53,21 +53,21 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @var string |
55 | 55 | */ |
56 | - protected $_list_databases = 'SHOW DATABASES'; |
|
56 | + protected $_list_databases = 'SHOW DATABASES'; |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * OPTIMIZE TABLE statement |
60 | 60 | * |
61 | 61 | * @var string |
62 | 62 | */ |
63 | - protected $_optimize_table = 'OPTIMIZE TABLE %s'; |
|
63 | + protected $_optimize_table = 'OPTIMIZE TABLE %s'; |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * REPAIR TABLE statement |
67 | 67 | * |
68 | 68 | * @var string |
69 | 69 | */ |
70 | - protected $_repair_table = 'REPAIR TABLE %s'; |
|
70 | + protected $_repair_table = 'REPAIR TABLE %s'; |
|
71 | 71 | |
72 | 72 | // -------------------------------------------------------------------- |
73 | 73 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $output .= 'SET foreign_key_checks = 0;'.$newline; |
97 | 97 | } |
98 | 98 | |
99 | - foreach ( (array) $tables as $table) |
|
99 | + foreach ((array) $tables as $table) |
|
100 | 100 | { |
101 | 101 | // Is the table in the "ignore" list? |
102 | 102 | if (in_array($table, (array) $ignore, TRUE)) |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | // Trim off the end comma |
168 | - $field_str = preg_replace('/, $/' , '', $field_str); |
|
168 | + $field_str = preg_replace('/, $/', '', $field_str); |
|
169 | 169 | |
170 | 170 | // Build the insert string |
171 | 171 | foreach ($query->result_array() as $row) |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | } |
193 | 193 | |
194 | 194 | // Remove the comma at the end of the string |
195 | - $val_str = preg_replace('/, $/' , '', $val_str); |
|
195 | + $val_str = preg_replace('/, $/', '', $val_str); |
|
196 | 196 | |
197 | 197 | // Build the INSERT string |
198 | 198 | $output .= 'INSERT INTO '.$this->db->protect_identifiers($table).' ('.$field_str.') VALUES ('.$val_str.');'.$newline; |
@@ -179,8 +179,7 @@ |
||
179 | 179 | if ($v === NULL) |
180 | 180 | { |
181 | 181 | $val_str .= 'NULL'; |
182 | - } |
|
183 | - else |
|
182 | + } else |
|
184 | 183 | { |
185 | 184 | // Escape the data if it's not an integer |
186 | 185 | $val_str .= ($is_int[$i] === FALSE) ? $this->db->escape($v) : $v; |
@@ -51,28 +51,28 @@ |
||
51 | 51 | * |
52 | 52 | * @var string |
53 | 53 | */ |
54 | - protected $_create_database = FALSE; |
|
54 | + protected $_create_database = FALSE; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * DROP DATABASE statement |
58 | 58 | * |
59 | 59 | * @var string |
60 | 60 | */ |
61 | - protected $_drop_database = FALSE; |
|
61 | + protected $_drop_database = FALSE; |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * DROP TABLE IF statement |
65 | 65 | * |
66 | 66 | * @var string |
67 | 67 | */ |
68 | - protected $_drop_table_if = FALSE; |
|
68 | + protected $_drop_table_if = FALSE; |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * UNSIGNED support |
72 | 72 | * |
73 | 73 | * @var bool|array |
74 | 74 | */ |
75 | - protected $_unsigned = FALSE; |
|
75 | + protected $_unsigned = FALSE; |
|
76 | 76 | |
77 | 77 | // -------------------------------------------------------------------- |
78 | 78 |
@@ -89,8 +89,7 @@ discard block |
||
89 | 89 | if ($alter_type === 'DROP') |
90 | 90 | { |
91 | 91 | return parent::_alter_table($alter_type, $table, $field); |
92 | - } |
|
93 | - elseif ($alter_type === 'CHANGE') |
|
92 | + } elseif ($alter_type === 'CHANGE') |
|
94 | 93 | { |
95 | 94 | $alter_type = 'MODIFY'; |
96 | 95 | } |
@@ -102,8 +101,7 @@ discard block |
||
102 | 101 | if ($field[$i]['_literal'] !== FALSE) |
103 | 102 | { |
104 | 103 | $field[$i] = "\n\t".$field[$i]['_literal']; |
105 | - } |
|
106 | - else |
|
104 | + } else |
|
107 | 105 | { |
108 | 106 | $field[$i]['_literal'] = "\n\t".$this->_process_column($field[$i]); |
109 | 107 |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $this->stmt_id = $driver_object->stmt_id; |
92 | 92 | $this->curs_id = $driver_object->curs_id; |
93 | 93 | $this->limit_used = $driver_object->limit_used; |
94 | - $this->commit_mode =& $driver_object->commit_mode; |
|
94 | + $this->commit_mode = & $driver_object->commit_mode; |
|
95 | 95 | $driver_object->stmt_id = FALSE; |
96 | 96 | } |
97 | 97 | |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | $retval = array(); |
144 | 144 | for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++) |
145 | 145 | { |
146 | - $F = new stdClass(); |
|
146 | + $F = new stdClass(); |
|
147 | 147 | $F->name = oci_field_name($this->stmt_id, $c); |
148 | 148 | $F->type = oci_field_type($this->stmt_id, $c); |
149 | - $F->max_length = oci_field_size($this->stmt_id, $c); |
|
149 | + $F->max_length = oci_field_size($this->stmt_id, $c); |
|
150 | 150 | |
151 | 151 | $retval[] = $F; |
152 | 152 | } |