Merge pull request #179 from teabreakninja/master
Bug updates to fix php 5.3 support and check freq is there on import.
这个提交包含在:
		
						当前提交
						d047682478
					
				
					共有  2 个文件被更改,包括 17 次插入 和 6 次删除
				
			
		|  | @ -47,14 +47,17 @@ class QSO extends CI_Controller { | ||||||
|       // This solves the problem of CI dumping out the session
 |       // This solves the problem of CI dumping out the session
 | ||||||
|       // cookie each time set_userdata is called.
 |       // cookie each time set_userdata is called.
 | ||||||
|       // For more info, see http://bizhole.com/codeigniter-nginx-error-502-bad-gateway/
 |       // For more info, see http://bizhole.com/codeigniter-nginx-error-502-bad-gateway/
 | ||||||
|       $qso_data = [ |       // $qso_data = [
 | ||||||
|  |       // 18-Jan-2016 - make php v5.3 friendly!
 | ||||||
|  |       $sqo_data = array( | ||||||
|         'band' => $this->input->post('band'), |         'band' => $this->input->post('band'), | ||||||
|         'freq' => $this->input->post('freq'), |         'freq' => $this->input->post('freq'), | ||||||
|         'mode' => $this->input->post('mode'), |         'mode' => $this->input->post('mode'), | ||||||
|         'sat_name' => $this->input->post('sat_name'), |         'sat_name' => $this->input->post('sat_name'), | ||||||
|         'sat_mode' => $this->input->post('sat_mode'), |         'sat_mode' => $this->input->post('sat_mode'), | ||||||
|         'radio' => $this->input->post('radio') |         'radio' => $this->input->post('radio') | ||||||
|       ]; |       ); | ||||||
|  |       // ];
 | ||||||
| 
 | 
 | ||||||
|       $this->session->set_userdata($qso_data); |       $this->session->set_userdata($qso_data); | ||||||
| 			 | 			 | ||||||
|  | @ -111,14 +114,17 @@ class QSO extends CI_Controller { | ||||||
| 			$this->logbook_model->create_qso(); | 			$this->logbook_model->create_qso(); | ||||||
| 			 | 			 | ||||||
| 			// Store Basic QSO Info for reuse
 | 			// Store Basic QSO Info for reuse
 | ||||||
|       $qso_data = [ |       //$qso_data = [
 | ||||||
|  |       // 18-Jan-2016 - make php v5.3 friendly!
 | ||||||
|  |       $qso_data = array( | ||||||
|         'band' => $this->input->post('band'), |         'band' => $this->input->post('band'), | ||||||
|         'freq' => $this->input->post('freq'), |         'freq' => $this->input->post('freq'), | ||||||
|         'mode' => $this->input->post('mode'), |         'mode' => $this->input->post('mode'), | ||||||
|         'sat_name' => $this->input->post('sat_name'), |         'sat_name' => $this->input->post('sat_name'), | ||||||
|         'sat_mode' => $this->input->post('sat_mode'), |         'sat_mode' => $this->input->post('sat_mode'), | ||||||
|         'radio' => $this->input->post('radio') |         'radio' => $this->input->post('radio') | ||||||
|       ]; |       ); | ||||||
|  |       //];
 | ||||||
| 
 | 
 | ||||||
|       $this->session->set_userdata($qso_data); |       $this->session->set_userdata($qso_data); | ||||||
| 			 | 			 | ||||||
|  |  | ||||||
|  | @ -695,8 +695,13 @@ class Logbook_model extends CI_Model { | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // Store Freq
 |         // Store Freq
 | ||||||
|  |         // Check if 'freq' is defined in the import?
 | ||||||
|  |         if (isset($record['freq'])){ | ||||||
|             $cleanfreq = preg_replace('#\W#', '', $record['freq']); |             $cleanfreq = preg_replace('#\W#', '', $record['freq']); | ||||||
|             $freqlng = strlen($cleanfreq); |             $freqlng = strlen($cleanfreq); | ||||||
|  |         }else{ | ||||||
|  |             $freqlng = 0; | ||||||
|  |         } | ||||||
|         if(isset($record['freq']) && $freqlng < 7 ) { |         if(isset($record['freq']) && $freqlng < 7 ) { | ||||||
|             $cleansedstring = preg_replace('#\W#', '', $record['freq']); |             $cleansedstring = preg_replace('#\W#', '', $record['freq']); | ||||||
|             $freq = $cleansedstring."000"; |             $freq = $cleansedstring."000"; | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用