Completed
Branch v3.0 (3d1631)
by Samir
15:14
created
web_interface/astpp/system/database/drivers/cubrid/cubrid_utility.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * List databases
29 29
 	 *
30 30
 	 * @access	private
31
-	 * @return	array
31
+	 * @return	string|false
32 32
 	 */
33 33
 	function _list_databases()
34 34
 	{
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 *
57 57
 	 * @access	private
58 58
 	 * @param	string	the table name
59
-	 * @return	object
59
+	 * @return	boolean
60 60
 	 * @link 	http://www.cubrid.org/manual/840/en/Optimize%20Database
61 61
 	 */
62 62
 	function _optimize_table($table)
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 *
77 77
 	 * @access	private
78 78
 	 * @param	string	the table name
79
-	 * @return	object
79
+	 * @return	boolean
80 80
 	 * @link 	http://www.cubrid.org/manual/840/en/Checking%20Database%20Consistency
81 81
 	 */
82 82
 	function _repair_table($table)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 		// connected database.
40 40
 		if ($this->conn_id)
41 41
 		{
42
-			return "SELECT '" . $this->database . "'";
42
+			return "SELECT '".$this->database."'";
43 43
 		}
44 44
 		else
45 45
 		{
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -40,8 +42,7 @@  discard block
 block discarded – undo
40 42
 		if ($this->conn_id)
41 43
 		{
42 44
 			return "SELECT '" . $this->database . "'";
43
-		}
44
-		else
45
+		} else
45 46
 		{
46 47
 			return FALSE;
47 48
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/mssql/mssql_driver.php 4 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	 * @access	public
121 121
 	 * @param	string
122 122
 	 * @param	string
123
-	 * @return	resource
123
+	 * @return	boolean
124 124
 	 */
125 125
 	function db_set_charset($charset, $collation)
126 126
 	{
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 	*
320 320
 	* @access private
321 321
 	* @param string $version
322
-	* @return int16 major version number
322
+	* @return string major version number
323 323
 	*/
324 324
 	function _parse_major_version($version)
325 325
 	{
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 	 *
351 351
 	 * @access	public
352 352
 	 * @param	string
353
-	 * @return	string
353
+	 * @return	integer
354 354
 	 */
355 355
 	function count_all($table = '')
356 356
 	{
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 	 *
422 422
 	 * @access	public
423 423
 	 * @param	string	the table name
424
-	 * @return	object
424
+	 * @return	string
425 425
 	 */
426 426
 	function _field_data($table)
427 427
 	{
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 	 * The error message number
448 448
 	 *
449 449
 	 * @access	private
450
-	 * @return	integer
450
+	 * @return	string
451 451
 	 */
452 452
 	function _error_number()
453 453
 	{
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 	 *
508 508
 	 * @access	public
509 509
 	 * @param	type
510
-	 * @return	type
510
+	 * @return	string
511 511
 	 */
512 512
 	function _from_tables($tables)
513 513
 	{
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -293,13 +293,13 @@  discard block
 block discarded – undo
293 293
 	// --------------------------------------------------------------------
294 294
 
295 295
 	/**
296
-	* Insert ID
297
-	*
298
-	* Returns the last id created in the Identity column.
299
-	*
300
-	* @access public
301
-	* @return integer
302
-	*/
296
+	 * Insert ID
297
+	 *
298
+	 * Returns the last id created in the Identity column.
299
+	 *
300
+	 * @access public
301
+	 * @return integer
302
+	 */
303 303
 	function insert_id()
304 304
 	{
305 305
 		$ver = self::_parse_major_version($this->version());
@@ -312,15 +312,15 @@  discard block
 block discarded – undo
312 312
 	// --------------------------------------------------------------------
313 313
 
314 314
 	/**
315
-	* Parse major version
316
-	*
317
-	* Grabs the major version number from the
318
-	* database server version string passed in.
319
-	*
320
-	* @access private
321
-	* @param string $version
322
-	* @return int16 major version number
323
-	*/
315
+	 * Parse major version
316
+	 *
317
+	 * Grabs the major version number from the
318
+	 * database server version string passed in.
319
+	 *
320
+	 * @access private
321
+	 * @param string $version
322
+	 * @return int16 major version number
323
+	 */
324 324
 	function _parse_major_version($version)
325 325
 	{
326 326
 		preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $ver_info);
@@ -330,11 +330,11 @@  discard block
 block discarded – undo
330 330
 	// --------------------------------------------------------------------
331 331
 
332 332
 	/**
333
-	* Version number query string
334
-	*
335
-	* @access public
336
-	* @return string
337
-	*/
333
+	 * Version number query string
334
+	 *
335
+	 * @access public
336
+	 * @return string
337
+	 */
338 338
 	function _version()
339 339
 	{
340 340
 		return "SELECT @@VERSION AS ver";
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 			return 0;
360 360
 		}
361 361
 
362
-		$query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
362
+		$query = $this->query($this->_count_string.$this->_protect_identifiers('numrows')." FROM ".$this->_protect_identifiers($table, TRUE, NULL, FALSE));
363 363
 
364 364
 		if ($query->num_rows() == 0)
365 365
 		{
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 
369 369
 		$row = $query->row();
370 370
 		$this->_reset_select();
371
-		return (int) $row->numrows;
371
+		return (int)$row->numrows;
372 372
 	}
373 373
 
374 374
 	// --------------------------------------------------------------------
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 		{
478 478
 			if (strpos($item, '.'.$id) !== FALSE)
479 479
 			{
480
-				$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
480
+				$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.', $item);
481 481
 
482 482
 				// remove duplicates if the user already included the escape
483 483
 				return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
@@ -561,11 +561,11 @@  discard block
 block discarded – undo
561 561
 
562 562
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
563 563
 
564
-		$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
564
+		$orderby = (count($orderby) >= 1) ? ' ORDER BY '.implode(", ", $orderby) : '';
565 565
 
566 566
 		$sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
567 567
 
568
-		$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
568
+		$sql .= ($where != '' AND count($where) >= 1) ? " WHERE ".implode(" ", $where) : '';
569 569
 
570 570
 		$sql .= $orderby.$limit;
571 571
 
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 	{
643 643
 		$i = $limit + $offset;
644 644
 
645
-		return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$i.' ', $sql);
645
+		return preg_replace('/(^\SELECT (DISTINCT)?)/i', '\\1 TOP '.$i.' ', $sql);
646 646
 	}
647 647
 
648 648
 	// --------------------------------------------------------------------
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -487,8 +489,7 @@  discard block
 block discarded – undo
487 489
 		if (strpos($item, '.') !== FALSE)
488 490
 		{
489 491
 			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
490
-		}
491
-		else
492
+		} else
492 493
 		{
493 494
 			$str = $this->_escape_char.$item.$this->_escape_char;
494 495
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/mssql/mssql_forge.php 3 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @access	private
31 31
 	 * @param	string	the database name
32
-	 * @return	bool
32
+	 * @return	string
33 33
 	 */
34 34
 	function _create_database($name)
35 35
 	{
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 *
44 44
 	 * @access	private
45 45
 	 * @param	string	the database name
46
-	 * @return	bool
46
+	 * @return	string
47 47
 	 */
48 48
 	function _drop_database($name)
49 49
 	{
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 * Drop Table
57 57
 	 *
58 58
 	 * @access	private
59
-	 * @return	bool
59
+	 * @return	string
60 60
 	 */
61 61
 	function _drop_table($table)
62 62
 	{
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 * @param	mixed	primary key(s)
75 75
 	 * @param	mixed	key(s)
76 76
 	 * @param	boolean	should 'IF NOT EXISTS' be added to the SQL
77
-	 * @return	bool
77
+	 * @return	string
78 78
 	 */
79 79
 	function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
80 80
 	{
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	 * @param	string	the default value
187 187
 	 * @param	boolean	should 'NOT NULL' be added
188 188
 	 * @param	string	the field after which we should add the new field
189
-	 * @return	object
189
+	 * @return	string
190 190
 	 */
191 191
 	function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '')
192 192
 	{
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
 				$sql .= "\n\t".$this->db->_protect_identifiers($field);
105 105
 
106
-				$sql .=  ' '.$attributes['TYPE'];
106
+				$sql .= ' '.$attributes['TYPE'];
107 107
 
108 108
 				if (array_key_exists('CONSTRAINT', $attributes))
109 109
 				{
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		if (count($primary_keys) > 0)
146 146
 		{
147 147
 			$primary_keys = $this->db->_protect_identifiers($primary_keys);
148
-			$sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")";
148
+			$sql .= ",\n\tPRIMARY KEY (".implode(', ', $primary_keys).")";
149 149
 		}
150 150
 
151 151
 		if (is_array($keys) && count($keys) > 0)
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 					$key = array($this->db->_protect_identifiers($key));
162 162
 				}
163 163
 
164
-				$sql .= ",\n\tFOREIGN KEY (" . implode(', ', $key) . ")";
164
+				$sql .= ",\n\tFOREIGN KEY (".implode(', ', $key).")";
165 165
 			}
166 166
 		}
167 167
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
 		if ($after_field != '')
218 218
 		{
219
-			$sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field);
219
+			$sql .= ' AFTER '.$this->db->_protect_identifiers($after_field);
220 220
 		}
221 221
 
222 222
 		return $sql;
Please login to merge, or discard this patch.
Braces   +7 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -96,8 +98,7 @@  discard block
 block discarded – undo
96 98
 			if (is_numeric($field))
97 99
 			{
98 100
 				$sql .= "\n\t$attributes";
99
-			}
100
-			else
101
+			} else
101 102
 			{
102 103
 				$attributes = array_change_key_case($attributes, CASE_UPPER);
103 104
 
@@ -123,8 +124,7 @@  discard block
 block discarded – undo
123 124
 				if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE)
124 125
 				{
125 126
 					$sql .= ' NULL';
126
-				}
127
-				else
127
+				} else
128 128
 				{
129 129
 					$sql .= ' NOT NULL';
130 130
 				}
@@ -155,8 +155,7 @@  discard block
 block discarded – undo
155 155
 				if (is_array($key))
156 156
 				{
157 157
 					$key = $this->db->_protect_identifiers($key);
158
-				}
159
-				else
158
+				} else
160 159
 				{
161 160
 					$key = array($this->db->_protect_identifiers($key));
162 161
 				}
@@ -208,8 +207,7 @@  discard block
 block discarded – undo
208 207
 		if ($null === NULL)
209 208
 		{
210 209
 			$sql .= ' NULL';
211
-		}
212
-		else
210
+		} else
213 211
 		{
214 212
 			$sql .= ' NOT NULL';
215 213
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/mssql/mssql_result.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
 	 * result set starts at zero
126 126
 	 *
127 127
 	 * @access	private
128
-	 * @return	array
128
+	 * @return	boolean
129 129
 	 */
130 130
 	function _data_seek($n = 0)
131 131
 	{
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,12 +86,12 @@
 block discarded – undo
86 86
 		$retval = array();
87 87
 		while ($field = mssql_fetch_field($this->result_id))
88 88
 		{
89
-			$F				= new stdClass();
89
+			$F = new stdClass();
90 90
 			$F->name		= $field->name;
91 91
 			$F->type		= $field->type;
92
-			$F->max_length	= $field->max_length;
92
+			$F->max_length = $field->max_length;
93 93
 			$F->primary_key = 0;
94
-			$F->default		= '';
94
+			$F->default = '';
95 95
 
96 96
 			$retval[] = $F;
97 97
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/mssql/mssql_utility.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * List databases
29 29
 	 *
30 30
 	 * @access	private
31
-	 * @return	bool
31
+	 * @return	string
32 32
 	 */
33 33
 	function _list_databases()
34 34
 	{
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 *
45 45
 	 * @access	private
46 46
 	 * @param	string	the table name
47
-	 * @return	object
47
+	 * @return	boolean
48 48
 	 */
49 49
 	function _optimize_table($table)
50 50
 	{
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 *
61 61
 	 * @access	private
62 62
 	 * @param	string	the table name
63
-	 * @return	object
63
+	 * @return	boolean
64 64
 	 */
65 65
 	function _repair_table($table)
66 66
 	{
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/mysql/mysql_driver.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 	 *
373 373
 	 * @access	public
374 374
 	 * @param	string
375
-	 * @return	string
375
+	 * @return	integer
376 376
 	 */
377 377
 	function count_all($table = '')
378 378
 	{
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 	 *
442 442
 	 * @access	public
443 443
 	 * @param	string	the table name
444
-	 * @return	object
444
+	 * @return	string
445 445
 	 */
446 446
 	function _field_data($table)
447 447
 	{
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 	 *
527 527
 	 * @access	public
528 528
 	 * @param	type
529
-	 * @return	type
529
+	 * @return	string
530 530
 	 */
531 531
 	function _from_tables($tables)
532 532
 	{
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 			return 0;
382 382
 		}
383 383
 
384
-		$query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
384
+		$query = $this->query($this->_count_string.$this->_protect_identifiers('numrows')." FROM ".$this->_protect_identifiers($table, TRUE, NULL, FALSE));
385 385
 
386 386
 		if ($query->num_rows() == 0)
387 387
 		{
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
 		$row = $query->row();
392 392
 		$this->_reset_select();
393
-		return (int) $row->numrows;
393
+		return (int)$row->numrows;
394 394
 	}
395 395
 
396 396
 	// --------------------------------------------------------------------
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 		{
497 497
 			if (strpos($item, '.'.$id) !== FALSE)
498 498
 			{
499
-				$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
499
+				$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.', $item);
500 500
 
501 501
 				// remove duplicates if the user already included the escape
502 502
 				return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
@@ -613,16 +613,16 @@  discard block
 block discarded – undo
613 613
 	{
614 614
 		foreach ($values as $key => $val)
615 615
 		{
616
-			$valstr[] = $key . ' = ' . $val;
616
+			$valstr[] = $key.' = '.$val;
617 617
 		}
618 618
 
619 619
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
620 620
 
621
-		$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
621
+		$orderby = (count($orderby) >= 1) ? ' ORDER BY '.implode(", ", $orderby) : '';
622 622
 
623 623
 		$sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
624 624
 
625
-		$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
625
+		$sql .= ($where != '' AND count($where) >= 1) ? " WHERE ".implode(" ", $where) : '';
626 626
 
627 627
 		$sql .= $orderby.$limit;
628 628
 
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 	function _update_batch($table, $values, $index, $where = NULL)
647 647
 	{
648 648
 		$ids = array();
649
-		$where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : '';
649
+		$where = ($where != '' AND count($where) >= 1) ? implode(" ", $where).' AND ' : '';
650 650
 
651 651
 		foreach ($values as $key => $val)
652 652
 		{
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
 			{
657 657
 				if ($field != $index)
658 658
 				{
659
-					$final[$field][] =  'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
659
+					$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
660 660
 				}
661 661
 			}
662 662
 		}
Please login to merge, or discard this patch.
Braces   +9 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -144,8 +146,7 @@  discard block
 block discarded – undo
144 146
 		if ($this->use_set_names === TRUE)
145 147
 		{
146 148
 			return @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id);
147
-		}
148
-		else
149
+		} else
149 150
 		{
150 151
 			return @mysql_set_charset($charset, $this->conn_id);
151 152
 		}
@@ -313,16 +314,13 @@  discard block
 block discarded – undo
313 314
 		if (function_exists('mysql_real_escape_string') AND is_resource($this->conn_id))
314 315
 		{
315 316
 			$str = mysql_real_escape_string($str, $this->conn_id);
316
-		}
317
-		elseif (function_exists('mysql_real_escape_string'))
317
+		} elseif (function_exists('mysql_real_escape_string'))
318 318
 		{
319 319
 			$str = mysql_real_escape_string($str);
320
-		}
321
-		elseif (function_exists('mysql_escape_string'))
320
+		} elseif (function_exists('mysql_escape_string'))
322 321
 		{
323 322
 			$str = mysql_escape_string($str);
324
-		}
325
-		else
323
+		} else
326 324
 		{
327 325
 			$str = addslashes($str);
328 326
 		}
@@ -506,8 +504,7 @@  discard block
 block discarded – undo
506 504
 		if (strpos($item, '.') !== FALSE)
507 505
 		{
508 506
 			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
509
-		}
510
-		else
507
+		} else
511 508
 		{
512 509
 			$str = $this->_escape_char.$item.$this->_escape_char;
513 510
 		}
@@ -753,8 +750,7 @@  discard block
 block discarded – undo
753 750
 		if ($offset == 0)
754 751
 		{
755 752
 			$offset = '';
756
-		}
757
-		else
753
+		} else
758 754
 		{
759 755
 			$offset .= ", ";
760 756
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/mysql/mysql_forge.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @access	private
31 31
 	 * @param	string	the database name
32
-	 * @return	bool
32
+	 * @return	string
33 33
 	 */
34 34
 	function _create_database($name)
35 35
 	{
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 *
44 44
 	 * @access	private
45 45
 	 * @param	string	the database name
46
-	 * @return	bool
46
+	 * @return	string
47 47
 	 */
48 48
 	function _drop_database($name)
49 49
 	{
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 * @param	mixed	primary key(s)
156 156
 	 * @param	mixed	key(s)
157 157
 	 * @param	boolean	should 'IF NOT EXISTS' be added to the SQL
158
-	 * @return	bool
158
+	 * @return	string
159 159
 	 */
160 160
 	function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
161 161
 	{
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 * @param	string	the column name
228 228
 	 * @param	array	fields
229 229
 	 * @param	string	the field after which we should add the new field
230
-	 * @return	object
230
+	 * @return	string
231 231
 	 */
232 232
 	function _alter_table($alter_type, $table, $fields, $after_field = '')
233 233
 	{
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
 				if (array_key_exists('TYPE', $attributes))
88 88
 				{
89
-					$sql .=  ' '.$attributes['TYPE'];
89
+					$sql .= ' '.$attributes['TYPE'];
90 90
 
91 91
 					if (array_key_exists('CONSTRAINT', $attributes))
92 92
 					{
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		{
175 175
 			$key_name = $this->db->_protect_identifiers(implode('_', $primary_keys));
176 176
 			$primary_keys = $this->db->_protect_identifiers($primary_keys);
177
-			$sql .= ",\n\tPRIMARY KEY ".$key_name." (" . implode(', ', $primary_keys) . ")";
177
+			$sql .= ",\n\tPRIMARY KEY ".$key_name." (".implode(', ', $primary_keys).")";
178 178
 		}
179 179
 
180 180
 		if (is_array($keys) && count($keys) > 0)
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 					$key = array($key_name);
193 193
 				}
194 194
 
195
-				$sql .= ",\n\tKEY {$key_name} (" . implode(', ', $key) . ")";
195
+				$sql .= ",\n\tKEY {$key_name} (".implode(', ', $key).")";
196 196
 			}
197 197
 		}
198 198
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
 		if ($after_field != '')
245 245
 		{
246
-			$sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field);
246
+			$sql .= ' AFTER '.$this->db->_protect_identifiers($after_field);
247 247
 		}
248 248
 
249 249
 		return $sql;
Please login to merge, or discard this patch.
Braces   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -72,8 +74,7 @@  discard block
 block discarded – undo
72 74
 			if (is_numeric($field))
73 75
 			{
74 76
 				$sql .= "\n\t$attributes";
75
-			}
76
-			else
77
+			} else
77 78
 			{
78 79
 				$attributes = array_change_key_case($attributes, CASE_UPPER);
79 80
 
@@ -122,8 +123,7 @@  discard block
 block discarded – undo
122 123
 				if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE)
123 124
 				{
124 125
 					$sql .= ' NULL';
125
-				}
126
-				else
126
+				} else
127 127
 				{
128 128
 					$sql .= ' NOT NULL';
129 129
 				}
@@ -185,8 +185,7 @@  discard block
 block discarded – undo
185 185
 				{
186 186
 					$key_name = $this->db->_protect_identifiers(implode('_', $key));
187 187
 					$key = $this->db->_protect_identifiers($key);
188
-				}
189
-				else
188
+				} else
190 189
 				{
191 190
 					$key_name = $this->db->_protect_identifiers($key);
192 191
 					$key = array($key_name);
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/mysql/mysql_result.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
 	 * result set starts at zero
131 131
 	 *
132 132
 	 * @access	private
133
-	 * @return	array
133
+	 * @return	boolean
134 134
 	 */
135 135
 	function _data_seek($n = 0)
136 136
 	{
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,9 +94,9 @@
 block discarded – undo
94 94
 			$F				= new stdClass();
95 95
 			$F->name		= $field->Field;
96 96
 			$F->type		= $type;
97
-			$F->default		= $field->Default;
98
-			$F->max_length	= $length;
99
-			$F->primary_key = ( $field->Key == 'PRI' ? 1 : 0 );
97
+			$F->default = $field->Default;
98
+			$F->max_length = $length;
99
+			$F->primary_key = ($field->Key == 'PRI' ? 1 : 0);
100 100
 
101 101
 			$retval[] = $F;
102 102
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/mysql/mysql_utility.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * List databases
29 29
 	 *
30 30
 	 * @access	private
31
-	 * @return	bool
31
+	 * @return	string
32 32
 	 */
33 33
 	function _list_databases()
34 34
 	{
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 *
45 45
 	 * @access	private
46 46
 	 * @param	string	the table name
47
-	 * @return	object
47
+	 * @return	string
48 48
 	 */
49 49
 	function _optimize_table($table)
50 50
 	{
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 *
61 61
 	 * @access	private
62 62
 	 * @param	string	the table name
63
-	 * @return	object
63
+	 * @return	string
64 64
 	 */
65 65
 	function _repair_table($table)
66 66
 	{
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 *
74 74
 	 * @access	private
75 75
 	 * @param	array	Preferences
76
-	 * @return	mixed
76
+	 * @return	false|string
77 77
 	 */
78 78
 	function _backup($params = array())
79 79
 	{
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 			}
159 159
 
160 160
 			// Trim off the end comma
161
-			$field_str = preg_replace( "/, $/" , "" , $field_str);
161
+			$field_str = preg_replace("/, $/", "", $field_str);
162 162
 
163 163
 
164 164
 			// Build the insert string
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 				}
194 194
 
195 195
 				// Remove the comma at the end of the string
196
-				$val_str = preg_replace( "/, $/" , "" , $val_str);
196
+				$val_str = preg_replace("/, $/", "", $val_str);
197 197
 
198 198
 				// Build the INSERT string
199 199
 				$output .= 'INSERT INTO '.$table.' ('.$field_str.') VALUES ('.$val_str.');'.$newline;
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -173,15 +175,13 @@  discard block
 block discarded – undo
173 175
 					if ($v === NULL)
174 176
 					{
175 177
 						$val_str .= 'NULL';
176
-					}
177
-					else
178
+					} else
178 179
 					{
179 180
 						// Escape the data if it's not an integer
180 181
 						if ($is_int[$i] == FALSE)
181 182
 						{
182 183
 							$val_str .= $this->db->escape($v);
183
-						}
184
-						else
184
+						} else
185 185
 						{
186 186
 							$val_str .= $v;
187 187
 						}
Please login to merge, or discard this patch.