Passed
Pull Request — v3.0 (#189)
by
unknown
10:51
created
astpp/application/modules/signup/views/view_signup_inactive.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	?>
17 17
 	Signup | <?php echo $invoiceconf['website_title']; ?>
18 18
 	<?php
19
-		}else{ 
19
+		} else{ 
20 20
 	?>
21 21
 	Signup | ASTPP - Open Source Voip Billing Solution
22 22
 	<?php
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 					  <?php
73 73
 						if(isset($this->session->userdata['user_logo']) && $this->session->userdata['user_logo'] != ""){
74 74
 						$logo = $this->session->userdata['user_logo'];
75
-						}else{
75
+						} else{
76 76
 						$logo = 'logo.png';
77 77
 						}
78 78
 
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/signup/views/view_signup_active.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	?>
17 17
 	Signup | <?php echo $invoiceconf['website_title']; ?>
18 18
 	<?php
19
-		}else{ 
19
+		} else{ 
20 20
 	?>
21 21
 	Signup | ASTPP - Open Source Voip Billing Solution
22 22
 	<?php
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 			<div class="col-md-4 col-md-offset-4">&nbsp;<span class="login_error">
56 56
                         <?php if (isset($astpp_notification)){ ?>
57 57
                         Login unsuccessful. Please make sure you entered the correct username and password, and that your account is active.
58
-                    <?php }else{
58
+                    <?php } else{
59 59
 						 echo "&nbsp;";
60 60
 					} 
61 61
 			$astpp_err_msg = $this->session->flashdata('astpp_signupmsg');
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                            	<?php
79 79
 							if(isset($this->session->userdata['user_logo']) && $this->session->userdata['user_logo'] != ""){
80 80
 							$logo = $this->session->userdata['user_logo'];
81
-							}else{
81
+							} else{
82 82
 							$logo = 'logo.png';
83 83
 							}
84 84
 
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/signup/views/view_signup.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	?>
17 17
 	Signup | <?php echo $invoiceconf['website_title']; ?>
18 18
 	<?php
19
-		}else{ 
19
+		} else{ 
20 20
 	?>
21 21
 	Signup | ASTPP - Open Source Voip Billing Solution
22 22
 	<?php
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 					<span class="login_error">
116 116
                         <?php if (isset($astpp_notification)){ ?>
117 117
                         Login unsuccessful. Please make sure you entered the correct username and password, and that your account is active.
118
-						<?php }else{
118
+						<?php } else{
119 119
 						 echo "&nbsp;";
120 120
 						} ?>
121 121
                     </span>
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 													 <?php
135 135
 														if(isset($this->session->userdata['user_logo']) && $this->session->userdata['user_logo'] != ""){
136 136
 															$logo = $this->session->userdata['user_logo'];
137
-														}else{
137
+														} else{
138 138
 															$logo = 'logo.png';
139 139
 														}
140 140
 														
Please login to merge, or discard this patch.
astpp/application/modules/signup/views/view_signup_success.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	?>
17 17
 	Signup | <?php echo $invoiceconf['website_title']; ?>
18 18
 	<?php
19
-		}else{ 
19
+		} else{ 
20 20
 	?>
21 21
 	Signup | ASTPP - Open Source Voip Billing Solution
22 22
 	<?php
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 			<div class="col-md-4 col-md-offset-4">&nbsp;<span class="login_error">
56 56
                         <?php if (isset($astpp_notification)){ ?>
57 57
                         Login unsuccessful. Please make sure you entered the correct username and password, and that your account is active.
58
-                    <?php }else{
58
+                    <?php } else{
59 59
 						 echo "&nbsp;";
60 60
 					} 
61 61
 			$astpp_err_msg = $this->session->flashdata('astpp_signupmsg');
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                             	<?php
78 78
 							if(isset($this->session->userdata['user_logo']) && $this->session->userdata['user_logo'] != ""){
79 79
 							$logo = $this->session->userdata['user_logo'];
80
-							}else{
80
+							} else{
81 81
 							$logo = 'logo.png';
82 82
 							}
83 83
 
Please login to merge, or discard this patch.
astpp/application/modules/signup/views/view_forgot_success.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	?>
17 17
 	Forgot Password | <?php echo $invoiceconf['website_title']; ?>
18 18
 	<?php
19
-		}else{ 
19
+		} else{ 
20 20
 	?>
21 21
 	Forgot Password | ASTPP - Open Source Voip Billing Solution
22 22
 	<?php
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 			<div class="col-md-4 col-md-offset-4">&nbsp;<span class="login_error">
58 58
                         <?php if (isset($astpp_notification)){ ?>
59 59
                         Login unsuccessful. Please make sure you entered the correct username and password, and that your account is active.
60
-                    <?php }else{
60
+                    <?php } else{
61 61
 						 echo "&nbsp;";
62 62
 					} 
63 63
 			$astpp_err_msg = $this->session->flashdata('astpp_signupmsg');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                             	<?php
77 77
 							if(isset($this->session->userdata['user_logo']) && $this->session->userdata['user_logo'] != ""){
78 78
 							$logo = $this->session->userdata['user_logo'];
79
-							}else{
79
+							} else{
80 80
 							$logo = 'logo.png';
81 81
 							}
82 82
 
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/rates/controllers/rates.php 1 patch
Braces   +36 added lines, -42 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@  discard block
 block discarded – undo
35 35
 		ini_set("memory_limit", "2048M");
36 36
 		ini_set("max_execution_time", "259200");
37 37
 		ini_set("upload_max_filesize", "200M");
38
-		if ($this->session->userdata('user_login') == FALSE)
39
-			redirect(base_url() . '/astpp/login');
38
+		if ($this->session->userdata('user_login') == FALSE) {
39
+					redirect(base_url() . '/astpp/login');
40
+		}
40 41
 	}
41 42
 
42 43
 	function termination_rates_list() {
@@ -110,18 +111,17 @@  discard block
 block discarded – undo
110 111
 			  $data['check_header']=$check_header;
111 112
 			  $data['page_title'] = 'Termination Rates Preview';
112 113
 			  $this->session->set_userdata('import_termination_rate_csv',$actual_file_name);
113
-			}else{
114
+			} else{
114 115
 			  $data['error'] = "File Uploading Fail Please Try Again";
115 116
 			}
116 117
 					}
117
-				}
118
-				else{
118
+				} else{
119 119
 					$data['error']=="File Uploading Fail Please Try Again";
120 120
 				}
121
-			}else {
121
+			} else {
122 122
 				$data['error'] = "Invalid file format : Only CSV file allows to import records(Can't import empty file)";
123 123
 			}
124
-		}else{
124
+		} else{
125 125
 		$invalid_flag=true;
126 126
 		}
127 127
 		if ($invalid_flag) {
@@ -164,8 +164,7 @@  discard block
 block discarded – undo
164 164
 		if($str != ""){
165 165
 		  $invalid_array[$i]=$csv_data;
166 166
 		  $invalid_array[$i]['error'] = $str;
167
-		}
168
-		else{
167
+		} else{
169 168
 		  $csv_data['trunk_id']=$trunkID;
170 169
 		  $csv_data['pattern'] = "^" . $csv_data['pattern'] . ".*";
171 170
 		  $new_final_arr[$i]=$csv_data;
@@ -253,19 +252,17 @@  discard block
 block discarded – undo
253 252
 						$data['page_title'] = "Origination Rates Preview";
254 253
 						$data['check_header']=$check_header;
255 254
 						$this->session->set_userdata('import_origination_rate_csv',$actual_file_name);
256
-					}else{
255
+					} else{
257 256
 						$data['error'] = "File Uploading Fail Please Try Again";
258 257
 					}
259 258
 				}
260
-			 }   
261
-			else{
259
+			 } else{
262 260
 					$data['error']=="File Uploading Fail Please Try Again";
263 261
 				}
264
-		   }
265
-		   else {
262
+		   } else {
266 263
 				$data['error'] = "Invalid file format : Only CSV file allows to import records(Can't import empty file)";
267 264
 			}
268
-			}else{
265
+			} else{
269 266
 		$invalid_flag=true;
270 267
 			}
271 268
 		if ($invalid_flag) {
@@ -309,8 +306,7 @@  discard block
 block discarded – undo
309 306
 		if($str != ""){
310 307
 		  $invalid_array[$i]=$csv_data;
311 308
 		  $invalid_array[$i]['error'] = $str;
312
-		}
313
-		else{
309
+		} else{
314 310
 		  $csv_data['pricelist_id']=$pricelistID;
315 311
 		  $csv_data['trunk_id']=$trunkid;
316 312
 		  $csv_data['pattern'] = "^" . $csv_data['pattern'] . ".*";
@@ -372,12 +368,10 @@  discard block
 block discarded – undo
372 368
 		$count = count($error_field);
373 369
 		$str.= $count > 1 ? ' are not valid' : ' is not Valid';
374 370
 		return $str;
375
-		  }
376
-		  else{
371
+		  } else{
377 372
 		  return false;
378 373
 		  }
379
-	  }
380
-	  else{
374
+	  } else{
381 375
 	  $str=rtrim($str,',');
382 376
 		$error_field=explode(',',$str);
383 377
 		$count = count($error_field);
@@ -618,13 +612,15 @@  discard block
 block discarded – undo
618 612
 		$where = array('accountid' => $accountid);
619 613
 		$instant_search=$this->session->userdata('left_panel_search_'.$accounttype.'_pattern'); 
620 614
 		$like_str=!empty($instant_search) ? "(blocked_patterns like '%$instant_search%'  OR  destination like '%$instant_search%' )" :null;
621
-		if(!empty($like_str))
622
-		$this->db->where($like_str);
615
+		if(!empty($like_str)) {
616
+				$this->db->where($like_str);
617
+		}
623 618
 		$count_all = $this->db_model->countQuery("*", "block_patterns", $where);
624 619
 		$paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
625 620
 		$json_data = $paging_data["json_paging"];
626
-		if(!empty($like_str))
627
-		$this->db->where($like_str);
621
+		if(!empty($like_str)) {
622
+				$this->db->where($like_str);
623
+		}
628 624
 		$pattern_data = $this->db_model->getSelect("*", "block_patterns", $where, "id", "ASC", $paging_data["paging"]["page_no"], $paging_data["paging"]["start"]);
629 625
 		$grid_fields = json_decode($this->rates_form->build_pattern_list_for_customer($accountid,$accounttype));
630 626
 		$json_data['rows'] = $this->form->build_grid($pattern_data, $grid_fields);
@@ -1059,15 +1055,20 @@  discard block
 block discarded – undo
1059 1055
 
1060 1056
 	function csv_to_array($filename = '', $delimiter = ',')
1061 1057
 	{
1062
-		if (!file_exists($filename) || !is_readable($filename)) return FALSE;
1058
+		if (!file_exists($filename) || !is_readable($filename)) {
1059
+			return FALSE;
1060
+		}
1063 1061
 		$header = NULL;
1064 1062
 		$data = array();
1065 1063
 		if (($handle = fopen($filename, 'r')) !== FALSE)
1066 1064
 		{
1067 1065
 			while (($row = fgetcsv($handle, 1000, $delimiter)) !== FALSE)
1068 1066
 			{
1069
-				if (!$header) $header = $row;
1070
-				else $data[] = array_combine($header, $row);
1067
+				if (!$header) {
1068
+					$header = $row;
1069
+				} else {
1070
+					$data[] = array_combine($header, $row);
1071
+				}
1071 1072
 			}
1072 1073
 
1073 1074
 			fclose($handle);
@@ -1131,25 +1132,21 @@  discard block
 block discarded – undo
1131 1132
 							$data['check_header'] = $check_header;
1132 1133
 							$data['page_title'] = 'Map CSV to Termination Rates';
1133 1134
 							$this->session->set_userdata('import_termination_rate_mapper_csv', $actual_file_name);
1134
-						}
1135
-						else
1135
+						} else
1136 1136
 						{
1137 1137
 							$data['error'] = "File Uploading Fail Please Try Again";
1138 1138
 						}
1139 1139
 					}
1140
-				}
1141
-				else
1140
+				} else
1142 1141
 				{
1143 1142
 					$data['error'] == "File Uploading Fail Please Try Again";
1144 1143
 				}
1145
-			}
1146
-			else
1144
+			} else
1147 1145
 			{
1148 1146
 				$data['error'] = "Invalid file format : Only CSV file allows to import records(Can't import empty file)";
1149 1147
 				$data['error'] = var_dump($_FILES);
1150 1148
 			}
1151
-		}
1152
-		else
1149
+		} else
1153 1150
 		{
1154 1151
 			$invalid_flag = true;
1155 1152
 		}
@@ -1229,8 +1226,7 @@  discard block
 block discarded – undo
1229 1226
 				{
1230 1227
 					$invalid_array[$i] = $csv_data;
1231 1228
 					$invalid_array[$i]['error'] = $str;
1232
-				}
1233
-				else
1229
+				} else
1234 1230
 				{
1235 1231
 					$new_final_arr[$i]['trunk_id'] = $trunkID;
1236 1232
 					$new_final_arr[$i]['pattern'] = "^" . $csv_data['pattern'] . ".*";
@@ -1252,8 +1248,7 @@  discard block
 block discarded – undo
1252 1248
 		if (!empty($new_final_arr))
1253 1249
 		{
1254 1250
 			$result = $this->rates_model->bulk_insert_termination_rate($new_final_arr);
1255
-		}
1256
-        		else
1251
+		} else
1257 1252
         {
1258 1253
 
1259 1254
            $this->session->set_flashdata('astpp_errormsg', 'Error - Nothing selected to import/process!');
@@ -1286,8 +1281,7 @@  discard block
 block discarded – undo
1286 1281
 			$data['failure_count'] = count($invalid_array) - 1;
1287 1282
 			$data['page_title'] = 'Termination Rates Import Error';
1288 1283
 			$this->load->view('view_import_error', $data);
1289
-		}
1290
-		else
1284
+		} else
1291 1285
 		{
1292 1286
 			$this->session->set_flashdata('astpp_errormsg', 'Total ' . count($new_final_arr) . ' Termination rates imported successfully!');
1293 1287
 			redirect(base_url() . "rates/termination_rate_list/");
Please login to merge, or discard this patch.
astpp/application/modules/accounts/libraries/accounts_form.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@  discard block
 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
 class Accounts_form {
28 29
 	function __construct($library_name = '') {
@@ -279,8 +280,7 @@  discard block
 block discarded – undo
279 280
 			array(gettext('Tax'), 'tax_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'taxes_description', 'taxes', 'build_dropdown', 'where_arr', array('status' => 0, 'reseller_id' => $loginid), 'multi'),
280 281
 		);
281 282
 
282
-}
283
-else{
283
+} else{
284 284
 			$form[gettext('Billing Information')] = array(
285 285
 			array(gettext('Rate Group'), 'pricelist_id', 'SELECT', '', array("name" => "pricelist_id", 'rules' => 'required'), 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0", "reseller_id" => "0")),
286 286
             
@@ -442,8 +442,7 @@  discard block
 block discarded – undo
442 442
 			array('', 'HIDDEN', 'advance_search', '1', '', '', '')
443 443
 		);
444 444
         
445
-		}
446
-		else
445
+		} else
447 446
 		{
448 447
 		
449 448
 		$form['forms'] = array("", array('id' => "account_search"));
@@ -603,8 +602,9 @@  discard block
 block discarded – undo
603 602
     function build_grid_buttons_customer() {
604 603
         $logintype = $this->CI->session->userdata('userlevel_logintype');
605 604
         $provider = null;
606
-        if ($logintype != 1)
607
-            $provider = array(gettext("Create Provider"), "btn btn-line-blue btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/provider_add/");
605
+        if ($logintype != 1) {
606
+                    $provider = array(gettext("Create Provider"), "btn btn-line-blue btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/provider_add/");
607
+        }
608 608
              // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name);
609 609
         $buttons_json = json_encode(array(
610 610
             array(gettext("Create Customer"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/customer_add/"),
Please login to merge, or discard this patch.
astpp/application/modules/rates/views/view_import_origination_rate.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 							foreach($csv_value as $field_name => $field_val){
105 105
 								if($csv_key == 0){
106 106
 									echo "<th>".ucfirst($field_name)."</th>";
107
-								}else{
107
+								} else{
108 108
 									echo "<td class='portlet-content'>".$field_val."</td>";   
109 109
 								}
110 110
 							}
Please login to merge, or discard this patch.
astpp/application/modules/accounts/views/view_reseller_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.