Added OpenSSL is required Warning to LOTW pages if modules missing
这个提交包含在:
		
							父节点
							
								
									7f19c1b0a4
								
							
						
					
					
						当前提交
						8cfa51fa24
					
				
					共有  1 个文件被更改,包括 16 次插入 和 0 次删除
				
			
		|  | @ -38,6 +38,11 @@ class Lotw extends CI_Controller { | ||||||
| 		$this->load->model('user_model'); | 		$this->load->model('user_model'); | ||||||
| 		if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } | 		if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } | ||||||
| 
 | 
 | ||||||
|  | 		// Fire OpenSSL missing error if not found
 | ||||||
|  | 		if (!extension_loaded('openssl')) { | ||||||
|  | 			echo "You must install php OpenSSL for LoTW functions to work"; | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		// Load required models for page generation
 | 		// Load required models for page generation
 | ||||||
| 		$this->load->model('LotwCert'); | 		$this->load->model('LotwCert'); | ||||||
| 
 | 
 | ||||||
|  | @ -88,6 +93,11 @@ class Lotw extends CI_Controller { | ||||||
| 		$this->load->model('user_model'); | 		$this->load->model('user_model'); | ||||||
| 		if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } | 		if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } | ||||||
| 
 | 
 | ||||||
|  | 		// Fire OpenSSL missing error if not found
 | ||||||
|  | 		if (!extension_loaded('openssl')) { | ||||||
|  | 			echo "You must install php OpenSSL for LoTW functions to work"; | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|     	// create folder to store certs while processing
 |     	// create folder to store certs while processing
 | ||||||
|     	if (!file_exists('./uploads/lotw/certs')) { |     	if (!file_exists('./uploads/lotw/certs')) { | ||||||
| 		    mkdir('./uploads/lotw/certs', 0755, true); | 		    mkdir('./uploads/lotw/certs', 0755, true); | ||||||
|  | @ -175,6 +185,12 @@ class Lotw extends CI_Controller { | ||||||
| 	| | 	| | ||||||
| 	*/ | 	*/ | ||||||
| 	public function lotw_upload() { | 	public function lotw_upload() { | ||||||
|  | 
 | ||||||
|  | 		// Fire OpenSSL missing error if not found
 | ||||||
|  | 		if (!extension_loaded('openssl')) { | ||||||
|  | 			echo "You must install php OpenSSL for LoTW functions to work"; | ||||||
|  | 		} | ||||||
|  | 		 | ||||||
| 		// Get Station Profile Data
 | 		// Get Station Profile Data
 | ||||||
| 			$this->load->model('Stations'); | 			$this->load->model('Stations'); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用