Passed
Push — v3.0 ( ee545b...afe0c2 )
by Samir
152:57 queued 117:51
created
web_interface/astpp/application/libraries/locale_menu.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@
 block discarded – undo
21 21
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 22
 ###############################################################################
23 23
 
24
-if (!defined('BASEPATH'))
24
+if (!defined('BASEPATH')) {
25 25
 	exit('No direct script access allowed');
26
+}
26 27
 
27 28
 /**
28 29
  * Dynamically build forms for display
Please login to merge, or discard this patch.
web_interface/astpp/application/libraries/astpp/permission.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
20 20
 # You should have received a copy of the GNU Affero General Public License
21 21
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 22
 ###############################################################################
23
-if (!defined('BASEPATH'))
23
+if (!defined('BASEPATH')) {
24 24
 	exit('No direct script access allowed');
25
+}
25 26
 
26 27
 class Permission {
27 28
 	function __construct($library_name = '') {
Please login to merge, or discard this patch.
web_interface/astpp/application/views/footer.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 	if($result->num_rows() > 0){
13 13
 		$result=$result->result_array();
14 14
 		$footer = $result[0]['website_footer'];
15
-	}else{
15
+	} else{
16 16
 		$footer = '';
17 17
 	}
18 18
   	if($footer != ''){ ?>
Please login to merge, or discard this patch.
astpp/application/modules/user/views/view_user_invoices_config.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@
 block discarded – undo
208 208
 <?php
209 209
 	if($account_data['logo']  != ''){
210 210
 		 $logo=$account_data['file'];
211
-	}else{
211
+	} else{
212 212
 		 $logo=$account_data['logo'];
213 213
 	}
214 214
 		  if($logo != ''){        
Please login to merge, or discard this patch.
web_interface/astpp/application/libraries/global_locale.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@
 block discarded – undo
21 21
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 22
 ###############################################################################
23 23
 
24
-if (!defined('BASEPATH'))
24
+if (!defined('BASEPATH')) {
25 25
 	exit('No direct script access allowed');
26
+}
26 27
 
27 28
 /**
28 29
  * Dynamically build forms for display
Please login to merge, or discard this patch.
web_interface/astpp/application/libraries/locale.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@
 block discarded – undo
21 21
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 22
 ###############################################################################
23 23
 
24
-if (!defined('BASEPATH'))
24
+if (!defined('BASEPATH')) {
25 25
 	exit('No direct script access allowed');
26
+}
26 27
 
27 28
 /**
28 29
  * Dynamically build forms for display
Please login to merge, or discard this patch.
web_interface/astpp/application/controllers/lowcreditlimit.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@
 block discarded – undo
25 25
 	function __construct()
26 26
 	{
27 27
 	parent::__construct();
28
-	if(!defined( 'CRON' ) )  
29
-	  exit();
28
+	if(!defined( 'CRON' ) ) {
29
+		  exit();
30
+	}
30 31
 		$this->load->model("db_model");
31 32
 		$this->load->library("astpp/common");
32 33
 	}
Please login to merge, or discard this patch.
freeswitch/fs/cdr.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     		{
72 72
 	     		process_cdr($data,$db,$logger,$decimal_points);
73 73
     		}
74
-    	}else{
74
+    	} else{
75 75
         	process_cdr($data,$db,$logger,$decimal_points);
76 76
     	}
77 77
 }
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/did/controllers/did.php 1 patch
Braces   +22 added lines, -18 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@  discard block
 block discarded – undo
34 34
 		$this->load->model('did_model');
35 35
 		$this->load->library('csvreader');
36 36
 
37
-		if ($this->session->userdata('user_login') == FALSE)
38
-			redirect(base_url() . '/astpp/login');
37
+		if ($this->session->userdata('user_login') == FALSE) {
38
+					redirect(base_url() . '/astpp/login');
39
+		}
39 40
 	}
40 41
 
41 42
 	function did_add() {
@@ -163,7 +164,7 @@  discard block
 block discarded – undo
163 164
 		$this->db->where('note',$did_info['number']);
164 165
 		$this->db->delete("reseller_pricing");
165 166
 	  }
166
-	  }else{
167
+	  } else{
167 168
 	  $reseller_ids=$this->common->get_subreseller_info($accountinfo['id']);
168 169
 	  $reseller_ids=rtrim($reseller_ids,",");
169 170
 	  $where="parent_id IN ($reseller_ids)";
@@ -172,7 +173,7 @@  discard block
 block discarded – undo
172 173
 	  }
173 174
 	  if($accountinfo['type']==1){
174 175
 		  $update_array = array('parent_id' => $accountinfo['id'], 'accountid' => 0, 'assign_date' => '0000-00-00 00:00:00', "charge_upto" => "0000-00-00 00:00:00","last_modified_date"=>gmdate("Y-m-d H:i:s"),'call_type'=>'-1','extensions'=>'');
175
-	  }else{
176
+	  } else{
176 177
     	  $update_array = array('parent_id' => 0, 'accountid' => 0, 'assign_date' => '0000-00-00 00:00:00', "charge_upto" => "0000-00-00 00:00:00","last_modified_date"=>gmdate("Y-m-d H:i:s"),'call_type'=>'-1','extensions'=>'');
177 178
 	  }
178 179
 	  $where = array('id' => $id);
@@ -181,7 +182,7 @@  discard block
 block discarded – undo
181 182
 	  $accountid=$did_info['accountid'] > 0 ? $did_info['accountid']:0;
182 183
 	  if($did_info['accountid'] > 0 ){
183 184
 	   $email_user_id=$did_info['accountid'];
184
-	  }elseif($did_info['parent_id'] > 0){
185
+	  } elseif($did_info['parent_id'] > 0){
185 186
 	$email_user_id=$did_info['parent_id'];
186 187
 	  }
187 188
 	  $accountinfo=(array)$this->db->get_where('accounts',array("id"=>$email_user_id))->first_row();
@@ -208,7 +209,7 @@  discard block
 block discarded – undo
208 209
 		$accountinfo = $this->session->userdata('accountinfo');
209 210
 		if($accountinfo['reseller_id'] > 0){
210 211
 		  $dids_array=$this->db->query("SELECT a.id AS id,a.number as number, b.monthlycost, b.setup FROM dids AS a, reseller_pricing AS b WHERE a.number = b.note AND b.reseller_id = ".$accountinfo['reseller_id']." AND a.parent_id =".$accountinfo['reseller_id'])->result_array();
211
-			}else{
212
+			} else{
212 213
 			  $this->db->select('id,monthlycost,setup,number');
213 214
 			  $this->db->where('accountid',0);
214 215
 			  $this->db->where('parent_id',0);
@@ -332,8 +333,9 @@  discard block
 block discarded – undo
332 333
 					OR  a.connectcost like '%$instant_search%'
333 334
 					    )" :null;
334 335
 		if ($account_arr['reseller_id'] != 0) {
335
-		if(!empty($like_str))
336
-			$this->db->where($like_str);
336
+		if(!empty($like_str)) {
337
+					$this->db->where($like_str);
338
+		}
337 339
 			if($accounttype=='reseller'){
338 340
 		  $this->db->where('a.note','b.number',false);
339 341
 		  $this->db->where('a.reseller_id',$account_arr['id']);
@@ -348,13 +350,13 @@  discard block
 block discarded – undo
348 350
 		  $this->db->select('a . * , b.id, a.reseller_id AS accountid,a.note as number,b.country_id as country_id');
349 351
 		  $this->db->limit($paging_data["paging"]["page_no"],$paging_data["paging"]["start"]);
350 352
 		  $query=$this->db->get('reseller_pricing as a,dids as b');
351
-		  }else{
353
+		  } else{
352 354
 		  $count_result=(array)$this->db->query('select count(id) as count from dids where accountid='.$accountid." AND parent_id =".$account_arr['reseller_id'])->first_row();
353 355
 			  $paging_data = $this->form->load_grid_config($count_result['count'], $_GET['rp'], $_GET['page']);
354 356
 		  $json_data = $paging_data["json_paging"];
355 357
 			  $query=$this->db->query("SELECT a . * ,a.note as number,b.country_id as country_id,b.id FROM reseller_pricing AS a, dids AS b WHERE b.accountid =".$account_arr['id']." AND a.note = b.number AND a.reseller_id =".$account_arr['reseller_id']);
356 358
 		  }
357
-		}else{
359
+		} else{
358 360
 						$like_str=!empty($instant_search) ? 
359 361
 												"(dids.number like '%$instant_search%'
360 362
                                                     OR dids.inc like '%$instant_search%'
@@ -364,14 +366,16 @@  discard block
 block discarded – undo
364 366
                                                     OR dids.monthlycost like '%$instant_search%'
365 367
                                                     OR dids.connectcost like '%$instant_search%'
366 368
                                                         )" :null;
367
-			if(!empty($like_str))
368
-			$this->db->where($like_str);
369
+			if(!empty($like_str)) {
370
+						$this->db->where($like_str);
371
+			}
369 372
 			$where = array($field_name => $accountid);
370 373
 			$count_all = $this->db_model->countQuery("*", "dids", $where);
371 374
 			$paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
372 375
 			$json_data = $paging_data["json_paging"];
373
-			if(!empty($like_str))
374
-			$this->db->where($like_str);
376
+			if(!empty($like_str)) {
377
+						$this->db->where($like_str);
378
+			}
375 379
 			$query = $this->db_model->select("*", "dids", $where, "id", "ASC", $paging_data["paging"]["page_no"], $paging_data["paging"]["start"]);
376 380
 		}
377 381
 		$did_grid_fields = json_decode($this->did_form->build_did_list_for_customer($accountid, $accounttype));
@@ -714,21 +718,21 @@  discard block
 block discarded – undo
714 718
 					 unset($reseller_array['number'],$csv_data['accountid'],$reseller_array['accountid'],$reseller_array['country_id'],$reseller_array['init_inc']);
715 719
 					 $csv_data['accountid']=0;
716 720
 					 $final_reseller_array[$i]=$reseller_array;
717
-					}else{
721
+					} else{
718 722
 					  $csv_data['parent_id']=0;
719 723
 					}
720 724
 					$csv_data['assign_date']=gmdate("Y-m-d H:i:s");
721 725
 					$new_final_arr[$i] = $csv_data;
722 726
 					$this->common->mail_to_users('email_add_did', $account_info);
723
-					  }else{
727
+					  } else{
724 728
 					$invalid_array[$i] = $csv_data;
725 729
 					$invalid_array[$i]['error'] = 'Account have not sufficient amount to purchase this DID.';
726 730
 					  }
727
-				  }else{
731
+				  } else{
728 732
 				$invalid_array[$i] = $csv_data;
729 733
 				$invalid_array[$i]['error'] = 'Account not found or assign to invalid account';
730 734
 				  }
731
-							}else{
735
+							} else{
732 736
 				  $csv_data['setup'] = $this->common_model->add_calculate_currency($csv_data['setup'], '', '', false, false);
733 737
 				  $csv_data['monthlycost'] = $this->common_model->add_calculate_currency($csv_data['monthlycost'], '', '', false, false);
734 738
 				  $csv_data['cost'] = $this->common_model->add_calculate_currency($csv_data['cost'], '', '', false, false);
Please login to merge, or discard this patch.