Completed
Push — v3.0 ( e28df5...5be1a9 )
by Samir
13:00
created
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.
web_interface/astpp/system/helpers/date_helper.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -465,8 +465,7 @@  discard block
 block discarded – undo
465 465
 		if (isset($ex['2']) && preg_match('/[0-9]{1,2}/', $ex['2']))
466 466
 		{
467 467
 			$sec = (strlen($ex['2']) == 1) ? '0'.$ex['2'] : $ex['2'];
468
-		}
469
-		else
468
+		} else
470 469
 		{
471 470
 			// Unless specified, seconds get set to zero.
472 471
 			$sec = '00';
@@ -476,14 +475,17 @@  discard block
 block discarded – undo
476 475
 		{
477 476
 			$ampm = strtolower($split['2']);
478 477
 
479
-			if (substr($ampm, 0, 1) == 'p' AND $hour < 12)
480
-				$hour = $hour + 12;
478
+			if (substr($ampm, 0, 1) == 'p' AND $hour < 12) {
479
+							$hour = $hour + 12;
480
+			}
481 481
 
482
-			if (substr($ampm, 0, 1) == 'a' AND $hour == 12)
483
-				$hour = '00';
482
+			if (substr($ampm, 0, 1) == 'a' AND $hour == 12) {
483
+							$hour = '00';
484
+			}
484 485
 
485
-			if (strlen($hour) == 1)
486
-				$hour = '0'.$hour;
486
+			if (strlen($hour) == 1) {
487
+							$hour = '0'.$hour;
488
+			}
487 489
 		}
488 490
 
489 491
 		return mktime($hour, $min, $sec, $month, $day, $year);
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/captcha_helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,8 +207,7 @@
 block discarded – undo
207 207
 				$y = rand(0, $img_height / 2);
208 208
 				imagestring($im, $font_size, $x, $y, substr($word, $i, 1), $text_color);
209 209
 				$x += ($font_size * 2);
210
-			}
211
-			else
210
+			} else
212 211
 			{
213 212
 				$y = rand($img_height / 2, $img_height - 3);
214 213
 				imagettftext($im, $font_size, $angle, $x, $y, $text_color, $font_path, substr($word, $i, 1));
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/template_inheritance_helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -283,8 +283,7 @@
 block discarded – undo
283 283
 		//echo 'tttttttttttt';
284 284
 		if (isset($GLOBALS['CI'])) {
285 285
 			$GLOBALS['CI']->load->view($GLOBALS['TI_CURRENT_BASE_TEMPLATE']);
286
-		}
287
-		else {
286
+		} else {
288 287
 			include realpath( TI_VIEWS_DIR . $GLOBALS['TI_CURRENT_BASE_TEMPLATE']);
289 288
 		}
290 289
 	}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/form_helper.php 1 patch
Braces   +25 added lines, -18 removed lines patch added patch discarded remove patch
@@ -83,10 +83,11 @@  discard block
 block discarded – undo
83 83
 if(!function_exists('form_breadcrumb')){
84 84
 	function form_breadcrumb($info=''){
85 85
 	 $form=false;
86
-	 if(!empty($info))
87
- 	$form.="<div class='breadcrumb'>
86
+	 if(!empty($info)) {
87
+	  	$form.="<div class='breadcrumb'>
88 88
 	        <a href='".$info['url']."'>".$info['name']."</a>
89
-		</div>";
89
+		</div>";
90
+	 }
90 91
 	return $form;
91 92
 	}
92 93
 }
@@ -212,7 +213,7 @@  discard block
 block discarded – undo
212 213
                    		</span>
213 214
                    </div>
214 215
                </div>';
215
-		}else{
216
+		} else{
216 217
 			return "<div class='col-md-5 no-padding'><image "._parse_form_attributes($data, $defaults).$extra." /></div>";
217 218
 		}	
218 219
 		
@@ -375,22 +376,25 @@  discard block
 block discarded – undo
375 376
 			}
376 377
 		}
377 378
 
378
-		if ($extra != '') $extra = ' '.$extra;
379
+		if ($extra != '') {
380
+			$extra = ' '.$extra;
381
+		}
379 382
 		$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
380 383
 				if(is_array($name)){
381 384
 					 $str=null;
382 385
 					 foreach($name as $key=>$value){
383
-					  if($key !='class' && $key!='disabled')
384
-					  $str.=$key."='$value' ";
386
+					  if($key !='class' && $key!='disabled') {
387
+					  					  $str.=$key."='$value' ";
388
+					  }
385 389
 					 }
386 390
 					 if(isset($name['disabled']) && $name['disabled']== 'disabled'){
387 391
 					  $str.='disabled = "disabled"';
388 392
 					 }
389 393
 							   $form = '<select '.$str." class='col-md-5 form-control selectpicker ".$name['class'].$extra."' data-live-search='true'>\n";
390
-				}else{
394
+				} else{
391 395
 					if(!empty($extra)){
392 396
 						$form = '<select  name="'.$name.'"' .$multiple." class='col-md-5 form-control selectpicker ".$extra."' data-live-search='true'>\n";
393
-					}else{
397
+					} else{
394 398
 						$form = '<select  name="'.$name.'"' .$multiple." class='col-md-5 form-control selectpicker' data-live-search='true'>\n";
395 399
 					}
396 400
 				}
@@ -448,15 +452,16 @@  discard block
 block discarded – undo
448 452
 				$selected = array($_POST[$name]);
449 453
 			}
450 454
 		}
451
-		if ($extra != '') $extra = ' '.$extra;
455
+		if ($extra != '') {
456
+			$extra = ' '.$extra;
457
+		}
452 458
 				$class= isset($name['class']) && !empty($name['class']) ? "col-md-5 form-control selectpicker $name[class]" :"col-md-5 form-control selectpicker";
453 459
 		$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
454 460
 		if(is_array($name) && !isset($name["id"])){
455 461
 					$form = '<select name="'.$name['name'].'"'." class='$class' data-live-search='true'>\n";
456
-				}else if(is_array($name) && isset($name["id"])){
462
+				} else if(is_array($name) && isset($name["id"])){
457 463
 					$form = '<select name="'.$name['name'].'" id="'.$name['id'].'"'."class='$class' data-live-search='true'>\n";
458
-				}
459
-				else{
464
+				} else{
460 465
 					$form = '<select name="'.$name.'"' .$multiple." class='$class' data-live-search='true'>\n";
461 466
 				}   
462 467
 
@@ -517,7 +522,9 @@  discard block
 block discarded – undo
517 522
 		/*
518 523
 		  ASTPP  3.0  For Search Display In
519 524
 		*/
520
-		if ($extra != '' && !is_array($extra)) $extra = ' '.$extra;
525
+		if ($extra != '' && !is_array($extra)) {
526
+			$extra = ' '.$extra;
527
+		}
521 528
 			/**********************************************************/
522 529
 
523 530
 		$class= isset($name['class']) && !empty($name['class']) ? "col-md-5 form-control selectpicker $name[class]" :"col-md-5 form-control selectpicker";
@@ -530,15 +537,15 @@  discard block
 block discarded – undo
530 537
 				/*********************************/
531 538
 		if(is_array($name) && !isset($name["id"])){
532 539
 					$form = '<select name="'.$name['name'].'"'." class='col-md-5 form-control $class' style='margin-left:5px;' data-live-search='true'>\n";
533
-				}else if(is_array($name) && isset($name["id"])){
540
+				} else if(is_array($name) && isset($name["id"])){
534 541
 					$form = '<select name="'.$name['name'].'" id="'.$name['id'].'"'."class='col-md-5 form-control $class' style='margin-left:5px;' data-live-search='true'>\n";
535
-				}else{
542
+				} else{
536 543
 					$form = '<select name="'.$name.'"' .$multiple." class='col-md-5 form-control $class' style='margin-left:5px;' data-live-search='true'>\n";
537 544
 				}   
538 545
  /*
539 546
 		  ASTPP  3.0  For Search Display In
540 547
 		*/
541
-				}else{
548
+				} else{
542 549
 
543 550
 					$form = '<select name="'.$name['name'].'" id="'.$name['id'].'"'."class='".$extra['class']." $class' style='".$extra['style']."' data-live-search='true'>\n";
544 551
 				 }
@@ -690,7 +697,7 @@  discard block
 block discarded – undo
690 697
 //echo "<pre>".$value; print_r($extra); exit;
691 698
 		if(isset($extra[$value]) && !empty($extra) && $extra[$value] == '0'){
692 699
 		$class='onoffswitch-inner';
693
-		}else{
700
+		} else{
694 701
 		$class='onoffswitch-inner';
695 702
  		}
696 703
 /*            if(isset($extra) && $extra != ''){
Please login to merge, or discard this patch.
freeswitch/fs/lib/astpp.cdr.php 1 patch
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	if ($dataVariable['billsec'] == 0 && $dataVariable['hangup_cause'] == 'NORMAL_CLEARING')
48 48
 	{
49 49
 		$hangup_cause = isset($dataVariable['last_bridge_hangup_cause'])?$dataVariable['last_bridge_hangup_cause']:$dataVariable['hangup_cause'];
50
-	}else{
50
+	} else{
51 51
 		$hangup_cause = $dataVariable['hangup_cause'];
52 52
 	}   
53 53
 
@@ -86,10 +86,12 @@  discard block
 block discarded – undo
86 86
 	$actual_calltype = $dataVariable['calltype'];
87 87
 	
88 88
 	//Normalize origination and termination rates array 		   
89
-	if(isset($dataVariable['origination_rates']))
90
-	   $origination_rate = normalize_origination_rate($dataVariable['origination_rates']);
91
-	if(isset($dataVariable['termination_rates']))
92
-	   $termination_rate = normalize_rate($dataVariable['termination_rates']);
89
+	if(isset($dataVariable['origination_rates'])) {
90
+		   $origination_rate = normalize_origination_rate($dataVariable['origination_rates']);
91
+	}
92
+	if(isset($dataVariable['termination_rates'])) {
93
+		   $termination_rate = normalize_rate($dataVariable['termination_rates']);
94
+	}
93 95
 
94 96
 	//If receiver account id found then explicitly set call direction and call type 
95 97
 	if(isset($dataVariable['receiver_accid']))
@@ -441,11 +443,12 @@  discard block
 block discarded – undo
441 443
 	$query_counter = "SELECT id,seconds FROM counters  WHERE  accountid = ".$accountid." AND package_id = ".$package_id." AND status=1 LIMIT 1";
442 444
 	$counter = $db->run($query_counter);
443 445
 	$logger->log("GET Counters  : " . $query_counter);
444
-	if($counter)
445
-		return $counter[0];	
446
-	else
447
-		return "";
448
-}
446
+	if($counter) {
447
+			return $counter[0];
448
+	} else {
449
+			return "";
450
+	}
451
+	}
449 452
 
450 453
 //Get user info
451 454
 function get_accounts($parent_id,$logger, $db) {
Please login to merge, or discard this patch.