Completed
Push — v3.0 ( 23635d...e28df5 )
by Samir
23s
created
web_interface/astpp/system/database/drivers/cubrid/cubrid_driver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 			return 0;
391 391
 		}
392 392
 		
393
-		$query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
393
+		$query = $this->query($this->_count_string.$this->_protect_identifiers('numrows')." FROM ".$this->_protect_identifiers($table, TRUE, NULL, FALSE));
394 394
 
395 395
 		if ($query->num_rows() == 0)
396 396
 		{
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 
400 400
 		$row = $query->row();
401 401
 		$this->_reset_select();
402
-		return (int) $row->numrows;
402
+		return (int)$row->numrows;
403 403
 	}
404 404
 
405 405
 	// --------------------------------------------------------------------
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 		{
506 506
 			if (strpos($item, '.'.$id) !== FALSE)
507 507
 			{
508
-				$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
508
+				$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.', $item);
509 509
 
510 510
 				// remove duplicates if the user already included the escape
511 511
 				return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
@@ -627,11 +627,11 @@  discard block
 block discarded – undo
627 627
 
628 628
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
629 629
 
630
-		$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
630
+		$orderby = (count($orderby) >= 1) ? ' ORDER BY '.implode(", ", $orderby) : '';
631 631
 
632 632
 		$sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
633 633
 
634
-		$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
634
+		$sql .= ($where != '' AND count($where) >= 1) ? " WHERE ".implode(" ", $where) : '';
635 635
 
636 636
 		$sql .= $orderby.$limit;
637 637
 
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 	function _update_batch($table, $values, $index, $where = NULL)
656 656
 	{
657 657
 		$ids = array();
658
-		$where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : '';
658
+		$where = ($where != '' AND count($where) >= 1) ? implode(" ", $where).' AND ' : '';
659 659
 
660 660
 		foreach ($values as $key => $val)
661 661
 		{
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/cubrid/cubrid_utility.php 1 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.
web_interface/astpp/system/database/drivers/odbc/odbc_result.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		$field_names = array();
66 66
 		for ($i = 0; $i < $this->num_fields(); $i++)
67 67
 		{
68
-			$field_names[]	= odbc_field_name($this->result_id, $i);
68
+			$field_names[] = odbc_field_name($this->result_id, $i);
69 69
 		}
70 70
 
71 71
 		return $field_names;
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
 		$retval = array();
87 87
 		for ($i = 0; $i < $this->num_fields(); $i++)
88 88
 		{
89
-			$F				= new stdClass();
89
+			$F = new stdClass();
90 90
 			$F->name		= odbc_field_name($this->result_id, $i);
91 91
 			$F->type		= odbc_field_type($this->result_id, $i);
92
-			$F->max_length	= odbc_field_len($this->result_id, $i);
92
+			$F->max_length = odbc_field_len($this->result_id, $i);
93 93
 			$F->primary_key = 0;
94
-			$F->default		= '';
94
+			$F->default = '';
95 95
 
96 96
 			$retval[] = $F;
97 97
 		}
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 		$rs_obj = FALSE;
192 192
 		if (odbc_fetch_into($odbc_result, $rs)) {
193 193
 			foreach ($rs as $k=>$v) {
194
-				$field_name= odbc_field_name($odbc_result, $k+1);
194
+				$field_name = odbc_field_name($odbc_result, $k + 1);
195 195
 				$rs_obj->$field_name = $v;
196 196
 			}
197 197
 		}
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
 		$rs = array();
213 213
 		$rs_assoc = FALSE;
214 214
 		if (odbc_fetch_into($odbc_result, $rs)) {
215
-			$rs_assoc=array();
215
+			$rs_assoc = array();
216 216
 			foreach ($rs as $k=>$v) {
217
-				$field_name= odbc_field_name($odbc_result, $k+1);
217
+				$field_name = odbc_field_name($odbc_result, $k + 1);
218 218
 				$rs_assoc[$field_name] = $v;
219 219
 			}
220 220
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/postgre/postgre_driver.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 		// escape LIKE condition wildcards
297 297
 		if ($like === TRUE)
298 298
 		{
299
-			$str = str_replace(	array('%', '_', $this->_like_escape_chr),
299
+			$str = str_replace(array('%', '_', $this->_like_escape_chr),
300 300
 								array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr),
301 301
 								$str);
302 302
 		}
@@ -330,12 +330,12 @@  discard block
 block discarded – undo
330 330
 		$v = $this->_version();
331 331
 		$v = $v['server'];
332 332
 
333
-		$table	= func_num_args() > 0 ? func_get_arg(0) : NULL;
334
-		$column	= func_num_args() > 1 ? func_get_arg(1) : NULL;
333
+		$table = func_num_args() > 0 ? func_get_arg(0) : NULL;
334
+		$column = func_num_args() > 1 ? func_get_arg(1) : NULL;
335 335
 
336 336
 		if ($table == NULL && $v >= '8.1')
337 337
 		{
338
-			$sql='SELECT LASTVAL() as ins_id';
338
+			$sql = 'SELECT LASTVAL() as ins_id';
339 339
 		}
340 340
 		elseif ($table != NULL && $column != NULL && $v >= '8.0')
341 341
 		{
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 			return 0;
378 378
 		}
379 379
 
380
-		$query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
380
+		$query = $this->query($this->_count_string.$this->_protect_identifiers('numrows')." FROM ".$this->_protect_identifiers($table, TRUE, NULL, FALSE));
381 381
 
382 382
 		if ($query->num_rows() == 0)
383 383
 		{
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 
387 387
 		$row = $query->row();
388 388
 		$this->_reset_select();
389
-		return (int) $row->numrows;
389
+		return (int)$row->numrows;
390 390
 	}
391 391
 
392 392
 	// --------------------------------------------------------------------
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 		{
493 493
 			if (strpos($item, '.'.$id) !== FALSE)
494 494
 			{
495
-				$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
495
+				$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.', $item);
496 496
 
497 497
 				// remove duplicates if the user already included the escape
498 498
 				return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
@@ -594,11 +594,11 @@  discard block
 block discarded – undo
594 594
 
595 595
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
596 596
 
597
-		$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
597
+		$orderby = (count($orderby) >= 1) ? ' ORDER BY '.implode(", ", $orderby) : '';
598 598
 
599 599
 		$sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
600 600
 
601
-		$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
601
+		$sql .= ($where != '' AND count($where) >= 1) ? " WHERE ".implode(" ", $where) : '';
602 602
 
603 603
 		$sql .= $orderby.$limit;
604 604
 
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/postgre/postgre_forge.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 				}
136 136
 				else
137 137
 				{
138
-					$sql .=  ' '.$attributes['TYPE'];
138
+					$sql .= ' '.$attributes['TYPE'];
139 139
 				}
140 140
 
141 141
 				// Modified to prevent constraints with integer data types
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 				$primary_keys[$index] = $this->db->_protect_identifiers($key);
181 181
 			}
182 182
 
183
-			$sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")";
183
+			$sql .= ",\n\tPRIMARY KEY (".implode(', ', $primary_keys).")";
184 184
 		}
185 185
 
186 186
 		$sql .= "\n);";
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
 				foreach ($key as $field)
202 202
 				{
203
-					$sql .= "CREATE INDEX " . $table . "_" . str_replace(array('"', "'"), '', $field) . "_index ON $table ($field); ";
203
+					$sql .= "CREATE INDEX ".$table."_".str_replace(array('"', "'"), '', $field)."_index ON $table ($field); ";
204 204
 				}
205 205
 			}
206 206
 		}
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
 		if ($after_field != '')
269 269
 		{
270
-			$sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field);
270
+			$sql .= ' AFTER '.$this->db->_protect_identifiers($after_field);
271 271
 		}
272 272
 
273 273
 		return $sql;
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/postgre/postgre_result.php 1 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
 		for ($i = 0; $i < $this->num_fields(); $i++)
88 88
 		{
89
-			$F				= new stdClass();
89
+			$F = new stdClass();
90 90
 			$F->name		= pg_field_name($this->result_id, $i);
91 91
 			$F->type		= pg_field_type($this->result_id, $i);
92
-			$F->max_length	= pg_field_size($this->result_id, $i);
92
+			$F->max_length = pg_field_size($this->result_id, $i);
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.
web_interface/astpp/system/database/drivers/mssql/mssql_result.php 1 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.
web_interface/astpp/system/database/drivers/mssql/mssql_driver.php 1 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.
web_interface/astpp/system/database/drivers/oci8/oci8_driver.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -255,14 +255,14 @@  discard block
 block discarded – undo
255 255
 		$have_cursor = FALSE;
256 256
 		foreach ($params as $param)
257 257
 		{
258
-			$sql .= $param['name'] . ",";
258
+			$sql .= $param['name'].",";
259 259
 
260 260
 			if (array_key_exists('type', $param) && ($param['type'] === OCI_B_CURSOR))
261 261
 			{
262 262
 				$have_cursor = TRUE;
263 263
 			}
264 264
 		}
265
-		$sql = trim($sql, ",") . "); end;";
265
+		$sql = trim($sql, ",")."); end;";
266 266
 
267 267
 		$this->stmt_id = FALSE;
268 268
 		$this->_set_stmt_id($sql);
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 		// escape LIKE condition wildcards
409 409
 		if ($like === TRUE)
410 410
 		{
411
-			$str = str_replace(	array('%', '_', $this->_like_escape_chr),
411
+			$str = str_replace(array('%', '_', $this->_like_escape_chr),
412 412
 								array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr),
413 413
 								$str);
414 414
 		}
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 			return 0;
463 463
 		}
464 464
 
465
-		$query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
465
+		$query = $this->query($this->_count_string.$this->_protect_identifiers('numrows')." FROM ".$this->_protect_identifiers($table, TRUE, NULL, FALSE));
466 466
 
467 467
 		if ($query == FALSE)
468 468
 		{
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 
472 472
 		$row = $query->row();
473 473
 		$this->_reset_select();
474
-		return (int) $row->numrows;
474
+		return (int)$row->numrows;
475 475
 	}
476 476
 
477 477
 	// --------------------------------------------------------------------
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 		{
582 582
 			if (strpos($item, '.'.$id) !== FALSE)
583 583
 			{
584
-				$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
584
+				$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.', $item);
585 585
 
586 586
 				// remove duplicates if the user already included the escape
587 587
 				return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 
662 662
 		for ($i = 0, $c = count($values); $i < $c; $i++)
663 663
 		{
664
-			$sql .= '	INTO ' . $table . ' (' . $keys . ') VALUES ' . $values[$i] . "\n";
664
+			$sql .= '	INTO '.$table.' ('.$keys.') VALUES '.$values[$i]."\n";
665 665
 		}
666 666
 
667 667
 		$sql .= 'SELECT * FROM dual';
@@ -693,11 +693,11 @@  discard block
 block discarded – undo
693 693
 
694 694
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
695 695
 
696
-		$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
696
+		$orderby = (count($orderby) >= 1) ? ' ORDER BY '.implode(", ", $orderby) : '';
697 697
 
698 698
 		$sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
699 699
 
700
-		$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
700
+		$sql .= ($where != '' AND count($where) >= 1) ? " WHERE ".implode(" ", $where) : '';
701 701
 
702 702
 		$sql .= $orderby.$limit;
703 703
 
Please login to merge, or discard this patch.