Completed
Push — v3.0 ( 23635d...e28df5 )
by Samir
23s
created
web_interface/astpp/system/database/drivers/pdo/pdo_driver.php 1 patch
Braces   +10 added lines, -15 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
  *
@@ -66,13 +68,11 @@  discard block
 block discarded – undo
66 68
 			
67 69
 			//Set the charset with the connection options
68 70
 			$this->options['PDO::MYSQL_ATTR_INIT_COMMAND'] = "SET NAMES {$this->char_set}";
69
-		}
70
-		else if (strpos($this->hostname, 'odbc') !== FALSE)
71
+		} else if (strpos($this->hostname, 'odbc') !== FALSE)
71 72
 		{
72 73
 			$this->_like_escape_str = " {escape '%s'} ";
73 74
 			$this->_like_escape_chr = '!';
74
-		}
75
-		else
75
+		} else
76 76
 		{
77 77
 			$this->_like_escape_str = " ESCAPE '%s' ";
78 78
 			$this->_like_escape_chr = '!';
@@ -194,8 +194,7 @@  discard block
 block discarded – undo
194 194
 		if (is_object($result_id))
195 195
 		{
196 196
 			$this->affect_rows = $result_id->rowCount();
197
-		}
198
-		else
197
+		} else
199 198
 		{
200 199
 			$this->affect_rows = 0;
201 200
 		}
@@ -377,8 +376,7 @@  discard block
 block discarded – undo
377 376
 			$query = $this->query($sql);
378 377
 			$row = $query->row();
379 378
 			return $row->ins_id;
380
-		}
381
-		else
379
+		} else
382 380
 		{
383 381
 			return $this->conn_id->lastInsertId($name);
384 382
 		}
@@ -531,8 +529,7 @@  discard block
 block discarded – undo
531 529
 		{
532 530
 			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
533 531
 			
534
-		}
535
-		else
532
+		} else
536 533
 		{
537 534
 			$str = $this->_escape_char.$item.$this->_escape_char;
538 535
 		}
@@ -759,15 +756,13 @@  discard block
 block discarded – undo
759 756
 			if ($offset == 0)
760 757
 			{
761 758
 				$offset = '';
762
-			}
763
-			else
759
+			} else
764 760
 			{
765 761
 				$offset .= ", ";
766 762
 			}
767 763
 
768 764
 			return $sql."LIMIT ".$offset.$limit;
769
-		}
770
-		else
765
+		} else
771 766
 		{
772 767
 			$sql .= "LIMIT ".$limit;
773 768
 
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/pdo/pdo_result.php 1 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
  *
@@ -91,8 +93,7 @@  discard block
 block discarded – undo
91 93
 			}
92 94
 			
93 95
 			return $data;
94
-		}
95
-		catch (Exception $e)
96
+		} catch (Exception $e)
96 97
 		{
97 98
 			if ($this->db->db_debug)
98 99
 			{
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/cubrid/cubrid_forge.php 1 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
  *
@@ -76,8 +78,7 @@  discard block
 block discarded – undo
76 78
 			if (is_numeric($field))
77 79
 			{
78 80
 				$sql .= "\n\t$attributes";
79
-			}
80
-			else
81
+			} else
81 82
 			{
82 83
 				$attributes = array_change_key_case($attributes, CASE_UPPER);
83 84
 
@@ -128,8 +129,7 @@  discard block
 block discarded – undo
128 129
 				if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE)
129 130
 				{
130 131
 					$sql .= ' NULL';
131
-				}
132
-				else
132
+				} else
133 133
 				{
134 134
 					$sql .= ' NOT NULL';
135 135
 				}
@@ -200,8 +200,7 @@  discard block
 block discarded – undo
200 200
 				{
201 201
 					$key_name = $this->db->_protect_identifiers(implode('_', $key));
202 202
 					$key = $this->db->_protect_identifiers($key);
203
-				}
204
-				else
203
+				} else
205 204
 				{
206 205
 					$key_name = $this->db->_protect_identifiers($key);
207 206
 					$key = array($key_name);
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/cubrid/cubrid_result.php 1 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
  *
@@ -112,8 +114,7 @@  discard block
 block discarded – undo
112 114
 			{
113 115
 				$row = cubrid_fetch_array($res, CUBRID_NUM);
114 116
 				$F->primary_key = ($row[0] > 0 ? 1 : null);
115
-			}
116
-			else
117
+			} else
117 118
 			{
118 119
 				$F->primary_key = null;
119 120
 			}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/cubrid/cubrid_driver.php 1 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
  *
@@ -74,8 +76,7 @@  discard block
 block discarded – undo
74 76
 			if (isset($this->auto_commit) && ! $this->auto_commit)
75 77
 			{
76 78
 				cubrid_set_autocommit($conn, CUBRID_AUTOCOMMIT_FALSE);
77
-			}
78
-			else
79
+			} else
79 80
 			{
80 81
 				cubrid_set_autocommit($conn, CUBRID_AUTOCOMMIT_TRUE);
81 82
 				$this->auto_commit = TRUE;
@@ -330,8 +331,7 @@  discard block
 block discarded – undo
330 331
 		if (function_exists('cubrid_real_escape_string') AND is_resource($this->conn_id))
331 332
 		{
332 333
 			$str = cubrid_real_escape_string($str, $this->conn_id);
333
-		}
334
-		else
334
+		} else
335 335
 		{
336 336
 			$str = addslashes($str);
337 337
 		}
@@ -515,8 +515,7 @@  discard block
 block discarded – undo
515 515
 		if (strpos($item, '.') !== FALSE)
516 516
 		{
517 517
 			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
518
-		}
519
-		else
518
+		} else
520 519
 		{
521 520
 			$str = $this->_escape_char.$item.$this->_escape_char;
522 521
 		}
@@ -762,8 +761,7 @@  discard block
 block discarded – undo
762 761
 		if ($offset == 0)
763 762
 		{
764 763
 			$offset = '';
765
-		}
766
-		else
764
+		} else
767 765
 		{
768 766
 			$offset .= ", ";
769 767
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/cubrid/cubrid_utility.php 1 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/postgre/postgre_driver.php 1 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
  *
@@ -336,20 +338,17 @@  discard block
 block discarded – undo
336 338
 		if ($table == NULL && $v >= '8.1')
337 339
 		{
338 340
 			$sql='SELECT LASTVAL() as ins_id';
339
-		}
340
-		elseif ($table != NULL && $column != NULL && $v >= '8.0')
341
+		} elseif ($table != NULL && $column != NULL && $v >= '8.0')
341 342
 		{
342 343
 			$sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column);
343 344
 			$query = $this->query($sql);
344 345
 			$row = $query->row();
345 346
 			$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $row->seq);
346
-		}
347
-		elseif ($table != NULL)
347
+		} elseif ($table != NULL)
348 348
 		{
349 349
 			// seq_name passed in table parameter
350 350
 			$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $table);
351
-		}
352
-		else
351
+		} else
353 352
 		{
354 353
 			return pg_last_oid($this->result_id);
355 354
 		}
@@ -502,8 +501,7 @@  discard block
 block discarded – undo
502 501
 		if (strpos($item, '.') !== FALSE)
503 502
 		{
504 503
 			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
505
-		}
506
-		else
504
+		} else
507 505
 		{
508 506
 			$str = $this->_escape_char.$item.$this->_escape_char;
509 507
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/postgre/postgre_forge.php 1 patch
Braces   +8 added lines, -11 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
  *
@@ -86,8 +88,7 @@  discard block
 block discarded – undo
86 88
 			if (is_numeric($field))
87 89
 			{
88 90
 				$sql .= "\n\t$attributes";
89
-			}
90
-			else
91
+			} else
91 92
 			{
92 93
 				$attributes = array_change_key_case($attributes, CASE_UPPER);
93 94
 
@@ -132,8 +133,7 @@  discard block
 block discarded – undo
132 133
 					&& $attributes['AUTO_INCREMENT'] === TRUE)
133 134
 				{
134 135
 					$sql .= ' SERIAL';
135
-				}
136
-				else
136
+				} else
137 137
 				{
138 138
 					$sql .=  ' '.$attributes['TYPE'];
139 139
 				}
@@ -152,8 +152,7 @@  discard block
 block discarded – undo
152 152
 				if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE)
153 153
 				{
154 154
 					$sql .= ' NULL';
155
-				}
156
-				else
155
+				} else
157 156
 				{
158 157
 					$sql .= ' NOT NULL';
159 158
 				}
@@ -192,8 +191,7 @@  discard block
 block discarded – undo
192 191
 				if (is_array($key))
193 192
 				{
194 193
 					$key = $this->db->_protect_identifiers($key);
195
-				}
196
-				else
194
+				} else
197 195
 				{
198 196
 					$key = array($this->db->_protect_identifiers($key));
199 197
 				}
@@ -259,8 +257,7 @@  discard block
 block discarded – undo
259 257
 		if ($null === NULL)
260 258
 		{
261 259
 			$sql .= ' NULL';
262
-		}
263
-		else
260
+		} else
264 261
 		{
265 262
 			$sql .= ' NOT NULL';
266 263
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/mysqli/mysqli_driver.php 1 patch
Braces   +8 added lines, -11 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
  *
@@ -70,8 +72,7 @@  discard block
 block discarded – undo
70 72
 		if ($this->port != '')
71 73
 		{
72 74
 			return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database, $this->port);
73
-		}
74
-		else
75
+		} else
75 76
 		{
76 77
 			return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database);
77 78
 		}
@@ -144,8 +145,7 @@  discard block
 block discarded – undo
144 145
 		if ($this->use_set_names === TRUE)
145 146
 		{
146 147
 			return @mysqli_query($this->conn_id, "SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'");
147
-		}
148
-		else
148
+		} else
149 149
 		{
150 150
 			return @mysqli_set_charset($this->conn_id, $charset);
151 151
 		}
@@ -314,12 +314,10 @@  discard block
 block discarded – undo
314 314
 		if (function_exists('mysqli_real_escape_string') AND is_object($this->conn_id))
315 315
 		{
316 316
 			$str = mysqli_real_escape_string($this->conn_id, $str);
317
-		}
318
-		elseif (function_exists('mysql_escape_string'))
317
+		} elseif (function_exists('mysql_escape_string'))
319 318
 		{
320 319
 			$str = mysql_escape_string($str);
321
-		}
322
-		else
320
+		} else
323 321
 		{
324 322
 			$str = addslashes($str);
325 323
 		}
@@ -503,8 +501,7 @@  discard block
 block discarded – undo
503 501
 		if (strpos($item, '.') !== FALSE)
504 502
 		{
505 503
 			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
506
-		}
507
-		else
504
+		} else
508 505
 		{
509 506
 			$str = $this->_escape_char.$item.$this->_escape_char;
510 507
 		}
Please login to merge, or discard this patch.