|
@@ -87,8 +87,8 @@ class Certificate extends Model
|
|
|
$this->html_file = $this->certification_user_path.basename($this->certificate_data['path_certificate']);
|
|
|
$this->qr_file = $this->certification_user_path.$pathinfo['filename'].'_qr.png';
|
|
|
} else {
|
|
|
- $value = api_get_configuration_value('allow_general_certificate');
|
|
|
- if ($value === true) {
|
|
|
+ $this->check_certificate_path();
|
|
|
+ if (api_get_configuration_value('allow_general_certificate')) {
|
|
|
// General certificate
|
|
|
$name = md5($this->user_id).'.html';
|
|
|
$my_path_certificate = $this->certification_user_path.$name;
|
|
@@ -125,13 +125,6 @@ class Certificate extends Model
|
|
|
$updateCertificateData
|
|
|
);
|
|
|
$this->certificate_data['path_certificate'] = $path_certificate;
|
|
|
-
|
|
|
- if ($this->isHtmlFileGenerated()) {
|
|
|
- if (!empty($file_info)) {
|
|
|
- //$text = $this->parse_certificate_variables($new_content_html['variables']);
|
|
|
- //$this->generate_qr($text, $qr_code_filename);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -332,6 +325,8 @@ class Certificate extends Model
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
+ $this->check_certificate_path();
|
|
|
+
|
|
|
// General certificate
|
|
|
$name = md5($this->user_id).'.html';
|
|
|
$my_path_certificate = $this->certification_user_path.$name;
|
|
@@ -366,13 +361,6 @@ class Certificate extends Model
|
|
|
$path_certificate
|
|
|
);
|
|
|
$this->certificate_data['path_certificate'] = $path_certificate;
|
|
|
-
|
|
|
- if ($this->isHtmlFileGenerated()) {
|
|
|
- if (!empty($file_info)) {
|
|
|
- //$text = $this->parse_certificate_variables($new_content_html['variables']);
|
|
|
- //$this->generate_qr($text, $qr_code_filename);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
return $result;
|