Added OpenSSL is required Warning to LOTW pages if modules missing

这个提交包含在:
Peter Goodhall 2020-09-05 21:42:07 +01:00
父节点 7f19c1b0a4
当前提交 8cfa51fa24

查看文件

@ -38,6 +38,11 @@ class Lotw extends CI_Controller {
$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'); }
// 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
$this->load->model('LotwCert');
@ -88,6 +93,11 @@ class Lotw extends CI_Controller {
$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'); }
// 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
if (!file_exists('./uploads/lotw/certs')) {
mkdir('./uploads/lotw/certs', 0755, true);
@ -175,6 +185,12 @@ class Lotw extends CI_Controller {
|
*/
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
$this->load->model('Stations');