Completed
Push — v3.0 ( 495b61...be1e07 )
by Samir
24:09 queued 10:48
created
web_interface/astpp/system/libraries/Profiler.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -274,8 +274,7 @@  discard block
 block discarded – undo
274 274
 				if (is_array($val))
275 275
 				{
276 276
 					$output .= "<pre>".htmlspecialchars(stripslashes(print_r($val, true)))."</pre>";
277
-				}
278
-				else
277
+				} else
279 278
 				{
280 279
 					$output .= htmlspecialchars(stripslashes($val));
281 280
 				}
@@ -322,8 +321,7 @@  discard block
 block discarded – undo
322 321
 				if (is_array($val))
323 322
 				{
324 323
 					$output .= "<pre>".htmlspecialchars(stripslashes(print_r($val, TRUE)))."</pre>";
325
-				}
326
-				else
324
+				} else
327 325
 				{
328 326
 					$output .= htmlspecialchars(stripslashes($val));
329 327
 				}
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/pdf.php 2 patches
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -11,25 +11,25 @@  discard block
 block discarded – undo
11 11
   
12 12
   
13 13
 	$this->page++;
14
-	if(!isset($this->pages[$this->page])) // solves the problem of overwriting a page if it already exists
14
+	if ( ! isset($this->pages[$this->page])) // solves the problem of overwriting a page if it already exists
15 15
 		$this->pages[$this->page] = '';
16
-	$this->state  =2;
16
+	$this->state = 2;
17 17
 	$this->x = $this->lMargin;
18 18
 	$this->y = $this->tMargin;
19 19
 	$this->FontFamily = '';
20 20
 	// Check page size and orientation
21
-	if($orientation=='')
21
+	if ($orientation == '')
22 22
 		$orientation = $this->DefOrientation;
23 23
 	else
24 24
 		$orientation = strtoupper($orientation[0]);
25
-	if($size=='')
25
+	if ($size == '')
26 26
 		$size = $this->DefPageSize;
27 27
 	else
28 28
 		$size = $this->_getpagesize($size);
29
-	if($orientation!=$this->CurOrientation || $size[0]!=$this->CurPageSize[0] || $size[1]!=$this->CurPageSize[1])
29
+	if ($orientation != $this->CurOrientation || $size[0] != $this->CurPageSize[0] || $size[1] != $this->CurPageSize[1])
30 30
 	{
31 31
 		// New size or orientation
32
-		if($orientation=='P')
32
+		if ($orientation == 'P')
33 33
 		{
34 34
 			$this->w = $size[0];
35 35
 			$this->h = $size[1];
@@ -39,28 +39,28 @@  discard block
 block discarded – undo
39 39
 			$this->w = $size[1];
40 40
 			$this->h = $size[0];
41 41
 		}
42
-		$this->wPt = $this->w*$this->k;
43
-		$this->hPt = $this->h*$this->k;
44
-		$this->PageBreakTrigger = $this->h-$this->bMargin;
42
+		$this->wPt = $this->w * $this->k;
43
+		$this->hPt = $this->h * $this->k;
44
+		$this->PageBreakTrigger = $this->h - $this->bMargin;
45 45
 		$this->CurOrientation = $orientation;
46 46
 		$this->CurPageSize = $size;
47 47
 	}
48
-	if($orientation!=$this->DefOrientation || $size[0]!=$this->DefPageSize[0] || $size[1]!=$this->DefPageSize[1])
48
+	if ($orientation != $this->DefOrientation || $size[0] != $this->DefPageSize[0] || $size[1] != $this->DefPageSize[1])
49 49
 		$this->PageSizes[$this->page] = array($this->wPt, $this->hPt);
50 50
 }
51 51
 
52 52
 function Footer() {
53 53
 	// Check if Footer for this page already exists (do the same for Header())
54
-	if(!isset($this->footerset[$this->page])) {
54
+	if ( ! isset($this->footerset[$this->page])) {
55 55
 		$this->SetY(-15);
56 56
 		// Page number
57
-		$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
57
+		$this->Cell(0, 10, 'Page '.$this->PageNo().'/{nb}', 0, 0, 'C');
58 58
 		// set footerset
59 59
 		$this->footerset[$this->page] = true;
60 60
 	}
61 61
 }
62 62
 
63
-function morepagestable($datas, $lineheight=8) {
63
+function morepagestable($datas, $lineheight = 8) {
64 64
 	// some things to set and 'remember'
65 65
 	$l = $this->lMargin;
66 66
 	$startheight = $h = $this->GetY();
@@ -68,32 +68,32 @@  discard block
 block discarded – undo
68 68
 
69 69
 	// calculate the whole width
70 70
 	$fullwidth = 0;
71
-	foreach($this->tablewidths AS $width) {
71
+	foreach ($this->tablewidths AS $width) {
72 72
 		$fullwidth += $width;
73 73
 	}
74 74
 
75 75
 	// Now let's start to write the table
76
-	foreach($datas AS $row => $data) {
76
+	foreach ($datas AS $row => $data) {
77 77
 		$this->page = $currpage;
78 78
 		// write the horizontal borders
79 79
 	 
80 80
 		// write the content and remember the height of the highest col
81
-		foreach($data AS $col => $txt) {
81
+		foreach ($data AS $col => $txt) {
82 82
 			$this->page = $currpage;
83
-			$this->SetXY($l,$h);
83
+			$this->SetXY($l, $h);
84 84
 
85
-		if($col == 5)
86
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,"R");
85
+		if ($col == 5)
86
+		  $this->MultiCell($this->tablewidths[$col], $lineheight, $txt, 0, "R");
87 87
 			else
88
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt);
88
+		  $this->MultiCell($this->tablewidths[$col], $lineheight, $txt);
89 89
 			$l += $this->tablewidths[$col];
90 90
 
91
-			if(!isset($tmpheight[$row.'-'.$this->page]))
91
+			if ( ! isset($tmpheight[$row.'-'.$this->page]))
92 92
 				$tmpheight[$row.'-'.$this->page] = 0;
93
-			if($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
93
+			if ($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
94 94
 				$tmpheight[$row.'-'.$this->page] = $this->GetY();
95 95
 			}
96
-			if($this->page > $maxpage)
96
+			if ($this->page > $maxpage)
97 97
 				$maxpage = $this->page;
98 98
 		}
99 99
 
@@ -107,17 +107,17 @@  discard block
 block discarded – undo
107 107
 	// draw the borders
108 108
 	// we start adding a horizontal line on the last page
109 109
 	$this->page = $maxpage;
110
-	$this->Line($l,$h,$fullwidth+$l,$h);
110
+	$this->Line($l, $h, $fullwidth + $l, $h);
111 111
 	// now we start at the top of the document and walk down
112
-	for($i = $startpage; $i <= $maxpage; $i++) {
112
+	for ($i = $startpage; $i <= $maxpage; $i++) {
113 113
 		$this->page = $i;
114 114
 		$l = $this->lMargin;
115 115
 		$t  = ($i == $startpage) ? $startheight : $this->tMargin;
116
-		$lh = ($i == $maxpage)   ? $h : $this->h-$this->bMargin;
117
-		$this->Line($l,$t,$l,$lh);
118
-		foreach($this->tablewidths AS $width) {
116
+		$lh = ($i == $maxpage) ? $h : $this->h - $this->bMargin;
117
+		$this->Line($l, $t, $l, $lh);
118
+		foreach ($this->tablewidths AS $width) {
119 119
 			$l += $width;
120
-			$this->Line($l,$t,$l,$lh);
120
+			$this->Line($l, $t, $l, $lh);
121 121
 		}
122 122
 	}
123 123
 	// set it to the last page, if not it'll cause some problems
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
 
128 128
 
129
-function table_total($datas, $lineheight=8) {
129
+function table_total($datas, $lineheight = 8) {
130 130
 	// some things to set and 'remember'
131 131
 	$l = $this->lMargin;
132 132
 	$startheight = $h = $this->GetY();
@@ -134,37 +134,37 @@  discard block
 block discarded – undo
134 134
 
135 135
 	// calculate the whole width
136 136
 	$fullwidth = 0;
137
-	foreach($this->tablewidths AS $width) {
137
+	foreach ($this->tablewidths AS $width) {
138 138
 		$fullwidth += $width;
139 139
 	}
140 140
 
141 141
 	// Now let's start to write the table
142
-	foreach($datas AS $row => $data) {
142
+	foreach ($datas AS $row => $data) {
143 143
 		$this->page = $currpage;
144 144
 		// write the horizontal borders
145
-	if($data != "")
146
-		$this->Line(100,$h,200,$h);
145
+	if ($data != "")
146
+		$this->Line(100, $h, 200, $h);
147 147
 		// write the content and remember the height of the highest col
148
-		foreach($data AS $col => $txt) {
148
+		foreach ($data AS $col => $txt) {
149 149
 			$this->page = $currpage;
150
-			$this->SetXY($l,$h);
150
+			$this->SetXY($l, $h);
151 151
             
152
-			if($col == 3)
152
+			if ($col == 3)
153 153
 		  $this->SetFont('Arial', 'B', 8);
154 154
 		else
155 155
 		  $this->SetFont('Arial', '', 8);
156
-		if($col == 5)
157
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,"R");
156
+		if ($col == 5)
157
+		  $this->MultiCell($this->tablewidths[$col], $lineheight, $txt, 0, "R");
158 158
 			else
159
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt);
159
+		  $this->MultiCell($this->tablewidths[$col], $lineheight, $txt);
160 160
 			$l += $this->tablewidths[$col];
161 161
 
162
-			if(!isset($tmpheight[$row.'-'.$this->page]))
162
+			if ( ! isset($tmpheight[$row.'-'.$this->page]))
163 163
 				$tmpheight[$row.'-'.$this->page] = 0;
164
-			if($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
164
+			if ($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
165 165
 				$tmpheight[$row.'-'.$this->page] = $this->GetY();
166 166
 			}
167
-			if($this->page > $maxpage)
167
+			if ($this->page > $maxpage)
168 168
 				$maxpage = $this->page;
169 169
 		}
170 170
 
@@ -179,21 +179,21 @@  discard block
 block discarded – undo
179 179
 	// we start adding a horizontal line on the last page
180 180
 	$this->page = $maxpage;
181 181
     
182
-	$this->Line(100,$h,200,$h);
182
+	$this->Line(100, $h, 200, $h);
183 183
 
184 184
 	// now we start at the top of the document and walk down
185
-	for($i = $startpage; $i <= $maxpage; $i++) {
185
+	for ($i = $startpage; $i <= $maxpage; $i++) {
186 186
 		$this->page = $i;
187 187
 		$l = $this->lMargin;
188 188
 		$t  = ($i == $startpage) ? $startheight : $this->tMargin;
189
-		$lh = ($i == $maxpage)   ? $h : $this->h-$this->bMargin;
189
+		$lh = ($i == $maxpage) ? $h : $this->h - $this->bMargin;
190 190
 
191
-		foreach($this->tablewidths AS $width) {
191
+		foreach ($this->tablewidths AS $width) {
192 192
 		$l += $width;
193
-		if($width != '30')
193
+		if ($width != '30')
194 194
 		{
195
-		  $this->Line(100,$t,100,$lh);
196
-		  $this->Line($l,$t,$l,$lh);
195
+		  $this->Line(100, $t, 100, $lh);
196
+		  $this->Line($l, $t, $l, $lh);
197 197
 		}
198 198
 		}
199 199
 	}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 }
203 203
 
204 204
 
205
-function export_pdf($datas, $lineheight=8) {
205
+function export_pdf($datas, $lineheight = 8) {
206 206
 	// some things to set and 'remember'
207 207
 	$l = $this->lMargin;
208 208
 	$startheight = $h = $this->GetY();
@@ -210,32 +210,32 @@  discard block
 block discarded – undo
210 210
 
211 211
 	// calculate the whole width
212 212
 	$fullwidth = 0;
213
-	foreach($this->tablewidths AS $width) {
213
+	foreach ($this->tablewidths AS $width) {
214 214
 		$fullwidth += $width;
215 215
 	}
216 216
 
217 217
 	// Now let's start to write the table
218
-	foreach($datas AS $row => $data) {
218
+	foreach ($datas AS $row => $data) {
219 219
 		$this->page = $currpage;
220 220
 		// write the horizontal borders
221
-	 $this->Line($l,$h,$fullwidth+$l,$h); 
221
+	 $this->Line($l, $h, $fullwidth + $l, $h); 
222 222
 		// write the content and remember the height of the highest col
223
-		foreach($data AS $col => $txt) {
223
+		foreach ($data AS $col => $txt) {
224 224
 			$this->page = $currpage;
225
-			$this->SetXY($l,$h);
225
+			$this->SetXY($l, $h);
226 226
 
227
-		if($col == 5)
228
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,"R");
227
+		if ($col == 5)
228
+		  $this->MultiCell($this->tablewidths[$col], $lineheight, $txt, 0, "R");
229 229
 			else
230
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt);
230
+		  $this->MultiCell($this->tablewidths[$col], $lineheight, $txt);
231 231
 			$l += $this->tablewidths[$col];
232 232
 
233
-			if(!isset($tmpheight[$row.'-'.$this->page]))
233
+			if ( ! isset($tmpheight[$row.'-'.$this->page]))
234 234
 				$tmpheight[$row.'-'.$this->page] = 0;
235
-			if($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
235
+			if ($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
236 236
 				$tmpheight[$row.'-'.$this->page] = $this->GetY();
237 237
 			}
238
-			if($this->page > $maxpage)
238
+			if ($this->page > $maxpage)
239 239
 				$maxpage = $this->page;
240 240
 		}
241 241
 
@@ -249,17 +249,17 @@  discard block
 block discarded – undo
249 249
 	// draw the borders
250 250
 	// we start adding a horizontal line on the last page
251 251
 	$this->page = $maxpage;
252
-	$this->Line($l,$h,$fullwidth+$l,$h);
252
+	$this->Line($l, $h, $fullwidth + $l, $h);
253 253
 	// now we start at the top of the document and walk down
254
-	for($i = $startpage; $i <= $maxpage; $i++) {
254
+	for ($i = $startpage; $i <= $maxpage; $i++) {
255 255
 		$this->page = $i;
256 256
 		$l = $this->lMargin;
257 257
 		$t  = ($i == $startpage) ? $startheight : $this->tMargin;
258
-		$lh = ($i == $maxpage)   ? $h : $this->h-$this->bMargin;
259
-		$this->Line($l,$t,$l,$lh);
260
-		foreach($this->tablewidths AS $width) {
258
+		$lh = ($i == $maxpage) ? $h : $this->h - $this->bMargin;
259
+		$this->Line($l, $t, $l, $lh);
260
+		foreach ($this->tablewidths AS $width) {
261 261
 			$l += $width;
262
-			$this->Line($l,$t,$l,$lh);
262
+			$this->Line($l, $t, $l, $lh);
263 263
 		}
264 264
 	}
265 265
 	// set it to the last page, if not it'll cause some problems
Please login to merge, or discard this patch.
Braces   +59 added lines, -44 removed lines patch added patch discarded remove patch
@@ -11,21 +11,25 @@  discard block
 block discarded – undo
11 11
   
12 12
   
13 13
 	$this->page++;
14
-	if(!isset($this->pages[$this->page])) // solves the problem of overwriting a page if it already exists
14
+	if(!isset($this->pages[$this->page])) {
15
+		// solves the problem of overwriting a page if it already exists
15 16
 		$this->pages[$this->page] = '';
17
+	}
16 18
 	$this->state  =2;
17 19
 	$this->x = $this->lMargin;
18 20
 	$this->y = $this->tMargin;
19 21
 	$this->FontFamily = '';
20 22
 	// Check page size and orientation
21
-	if($orientation=='')
22
-		$orientation = $this->DefOrientation;
23
-	else
24
-		$orientation = strtoupper($orientation[0]);
25
-	if($size=='')
26
-		$size = $this->DefPageSize;
27
-	else
28
-		$size = $this->_getpagesize($size);
23
+	if($orientation=='') {
24
+			$orientation = $this->DefOrientation;
25
+	} else {
26
+			$orientation = strtoupper($orientation[0]);
27
+	}
28
+	if($size=='') {
29
+			$size = $this->DefPageSize;
30
+	} else {
31
+			$size = $this->_getpagesize($size);
32
+	}
29 33
 	if($orientation!=$this->CurOrientation || $size[0]!=$this->CurPageSize[0] || $size[1]!=$this->CurPageSize[1])
30 34
 	{
31 35
 		// New size or orientation
@@ -33,8 +37,7 @@  discard block
 block discarded – undo
33 37
 		{
34 38
 			$this->w = $size[0];
35 39
 			$this->h = $size[1];
36
-		}
37
-		else
40
+		} else
38 41
 		{
39 42
 			$this->w = $size[1];
40 43
 			$this->h = $size[0];
@@ -45,9 +48,10 @@  discard block
 block discarded – undo
45 48
 		$this->CurOrientation = $orientation;
46 49
 		$this->CurPageSize = $size;
47 50
 	}
48
-	if($orientation!=$this->DefOrientation || $size[0]!=$this->DefPageSize[0] || $size[1]!=$this->DefPageSize[1])
49
-		$this->PageSizes[$this->page] = array($this->wPt, $this->hPt);
50
-}
51
+	if($orientation!=$this->DefOrientation || $size[0]!=$this->DefPageSize[0] || $size[1]!=$this->DefPageSize[1]) {
52
+			$this->PageSizes[$this->page] = array($this->wPt, $this->hPt);
53
+	}
54
+	}
51 55
 
52 56
 function Footer() {
53 57
 	// Check if Footer for this page already exists (do the same for Header())
@@ -82,19 +86,22 @@  discard block
 block discarded – undo
82 86
 			$this->page = $currpage;
83 87
 			$this->SetXY($l,$h);
84 88
 
85
-		if($col == 5)
86
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,"R");
87
-			else
88
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt);
89
+		if($col == 5) {
90
+				  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,"R");
91
+		} else {
92
+					  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt);
93
+			}
89 94
 			$l += $this->tablewidths[$col];
90 95
 
91
-			if(!isset($tmpheight[$row.'-'.$this->page]))
92
-				$tmpheight[$row.'-'.$this->page] = 0;
96
+			if(!isset($tmpheight[$row.'-'.$this->page])) {
97
+							$tmpheight[$row.'-'.$this->page] = 0;
98
+			}
93 99
 			if($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
94 100
 				$tmpheight[$row.'-'.$this->page] = $this->GetY();
95 101
 			}
96
-			if($this->page > $maxpage)
97
-				$maxpage = $this->page;
102
+			if($this->page > $maxpage) {
103
+							$maxpage = $this->page;
104
+			}
98 105
 		}
99 106
 
100 107
 		// get the height we were in the last used page
@@ -142,30 +149,35 @@  discard block
 block discarded – undo
142 149
 	foreach($datas AS $row => $data) {
143 150
 		$this->page = $currpage;
144 151
 		// write the horizontal borders
145
-	if($data != "")
146
-		$this->Line(100,$h,200,$h);
152
+	if($data != "") {
153
+			$this->Line(100,$h,200,$h);
154
+	}
147 155
 		// write the content and remember the height of the highest col
148 156
 		foreach($data AS $col => $txt) {
149 157
 			$this->page = $currpage;
150 158
 			$this->SetXY($l,$h);
151 159
             
152
-			if($col == 3)
153
-		  $this->SetFont('Arial', 'B', 8);
154
-		else
155
-		  $this->SetFont('Arial', '', 8);
156
-		if($col == 5)
157
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,"R");
158
-			else
159
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt);
160
+			if($col == 3) {
161
+					  $this->SetFont('Arial', 'B', 8);
162
+			} else {
163
+				  $this->SetFont('Arial', '', 8);
164
+		}
165
+		if($col == 5) {
166
+				  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,"R");
167
+		} else {
168
+					  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt);
169
+			}
160 170
 			$l += $this->tablewidths[$col];
161 171
 
162
-			if(!isset($tmpheight[$row.'-'.$this->page]))
163
-				$tmpheight[$row.'-'.$this->page] = 0;
172
+			if(!isset($tmpheight[$row.'-'.$this->page])) {
173
+							$tmpheight[$row.'-'.$this->page] = 0;
174
+			}
164 175
 			if($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
165 176
 				$tmpheight[$row.'-'.$this->page] = $this->GetY();
166 177
 			}
167
-			if($this->page > $maxpage)
168
-				$maxpage = $this->page;
178
+			if($this->page > $maxpage) {
179
+							$maxpage = $this->page;
180
+			}
169 181
 		}
170 182
 
171 183
 		// get the height we were in the last used page
@@ -224,19 +236,22 @@  discard block
 block discarded – undo
224 236
 			$this->page = $currpage;
225 237
 			$this->SetXY($l,$h);
226 238
 
227
-		if($col == 5)
228
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,"R");
229
-			else
230
-		  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt);
239
+		if($col == 5) {
240
+				  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,"R");
241
+		} else {
242
+					  $this->MultiCell($this->tablewidths[$col],$lineheight,$txt);
243
+			}
231 244
 			$l += $this->tablewidths[$col];
232 245
 
233
-			if(!isset($tmpheight[$row.'-'.$this->page]))
234
-				$tmpheight[$row.'-'.$this->page] = 0;
246
+			if(!isset($tmpheight[$row.'-'.$this->page])) {
247
+							$tmpheight[$row.'-'.$this->page] = 0;
248
+			}
235 249
 			if($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
236 250
 				$tmpheight[$row.'-'.$this->page] = $this->GetY();
237 251
 			}
238
-			if($this->page > $maxpage)
239
-				$maxpage = $this->page;
252
+			if($this->page > $maxpage) {
253
+							$maxpage = $this->page;
254
+			}
240 255
 		}
241 256
 
242 257
 		// get the height we were in the last used page
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Calendar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
 	{
102 102
 		// Set and validate the supplied month/year
103 103
 		if ($year == '') {
104
-					$year  = date("Y", $this->local_time);
104
+					$year = date("Y", $this->local_time);
105 105
 		}
106 106
 
107 107
 		if ($month == '') {
Please login to merge, or discard this patch.
web_interface/astpp/system/database/DB_active_rec.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2132,7 +2132,7 @@
 block discarded – undo
2132 2132
 	 */
2133 2133
 		 function _insert_on_duplicate_update_batch($table, $keys, $values)
2134 2134
 		 {
2135
-				  foreach($keys as $key)
2135
+				  foreach ($keys as $key)
2136 2136
 				  $update_fields[] = $key.'=VALUES('.$key.')';
2137 2137
            
2138 2138
 				  return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values)." ON DUPLICATE KEY UPDATE ".implode(', ', $update_fields);
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1121,8 +1121,7 @@  discard block
 block discarded – undo
1121 1121
 			if ($escape === FALSE)
1122 1122
 			{
1123 1123
 				$this->ar_set[] = '('.implode(',', $row).')';
1124
-			}
1125
-			else
1124
+			} else
1126 1125
 			{
1127 1126
 				$clean = array();
1128 1127
 
@@ -2132,8 +2131,9 @@  discard block
 block discarded – undo
2132 2131
 	 */
2133 2132
 		 function _insert_on_duplicate_update_batch($table, $keys, $values)
2134 2133
 		 {
2135
-				  foreach($keys as $key)
2136
-				  $update_fields[] = $key.'=VALUES('.$key.')';
2134
+				  foreach($keys as $key) {
2135
+				  				  $update_fields[] = $key.'=VALUES('.$key.')';
2136
+				  }
2137 2137
            
2138 2138
 				  return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values)." ON DUPLICATE KEY UPDATE ".implode(', ', $update_fields);
2139 2139
 		 } 
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/postgre/postgre_driver.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -338,20 +338,17 @@
 block discarded – undo
338 338
 		if ($table == NULL && $v >= '8.1')
339 339
 		{
340 340
 			$sql = 'SELECT LASTVAL() as ins_id';
341
-		}
342
-		elseif ($table != NULL && $column != NULL && $v >= '8.0')
341
+		} elseif ($table != NULL && $column != NULL && $v >= '8.0')
343 342
 		{
344 343
 			$sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column);
345 344
 			$query = $this->query($sql);
346 345
 			$row = $query->row();
347 346
 			$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $row->seq);
348
-		}
349
-		elseif ($table != NULL)
347
+		} elseif ($table != NULL)
350 348
 		{
351 349
 			// seq_name passed in table parameter
352 350
 			$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $table);
353
-		}
354
-		else
351
+		} else
355 352
 		{
356 353
 			return pg_last_oid($this->result_id);
357 354
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/cubrid/cubrid_utility.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 		if ($this->conn_id)
43 43
 		{
44 44
 			return "SELECT '".$this->database."'";
45
-		}
46
-		else
45
+		} else
47 46
 		{
48 47
 			return FALSE;
49 48
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/html_helper.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -318,31 +318,26 @@
 block discarded – undo
318 318
 					if ($index_page === TRUE)
319 319
 					{
320 320
 						$link .= 'href="'.$CI->config->site_url($v).'" ';
321
-					}
322
-					else
321
+					} else
323 322
 					{
324 323
 						$link .= 'href="'.$CI->config->slash_item('base_url').$v.'" ';
325 324
 					}
326
-				}
327
-				else
325
+				} else
328 326
 				{
329 327
 					$link .= "$k=\"$v\" ";
330 328
 				}
331 329
 			}
332 330
 
333 331
 			$link .= "/>";
334
-		}
335
-		else
332
+		} else
336 333
 		{
337 334
 			if (strpos($href, '://') !== FALSE)
338 335
 			{
339 336
 				$link .= 'href="'.$href.'" ';
340
-			}
341
-			elseif ($index_page === TRUE)
337
+			} elseif ($index_page === TRUE)
342 338
 			{
343 339
 				$link .= 'href="'.$CI->config->site_url($href).'" ';
344
-			}
345
-			else
340
+			} else
346 341
 			{
347 342
 				$link .= 'href="'.$CI->config->slash_item('base_url').$href.'" ';
348 343
 			}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/smiley_helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -232,8 +232,7 @@
 block discarded – undo
232 232
 		if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys.php'))
233 233
 		{
234 234
 			include(APPPATH.'config/'.ENVIRONMENT.'/smileys.php');
235
-		}
236
-		elseif (file_exists(APPPATH.'config/smileys.php'))
235
+		} elseif (file_exists(APPPATH.'config/smileys.php'))
237 236
 		{
238 237
 			include(APPPATH.'config/smileys.php');
239 238
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/url_helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -584,8 +584,7 @@
 block discarded – undo
584 584
 			if ($javascript == TRUE)
585 585
 			{
586 586
 				$att .= $key.'='.$val.',';
587
-			}
588
-			else
587
+			} else
589 588
 			{
590 589
 				$att .= ' '.$key.'="'.$val.'"';
591 590
 			}
Please login to merge, or discard this patch.