Fixed license expired and license trial
This commit is contained in:
parent
2046689b00
commit
ea0e229951
|
@ -148,7 +148,8 @@ if ($initial && users_is_admin()) {
|
|||
config_wiz_modal(
|
||||
false,
|
||||
true,
|
||||
(($registration === true) ? 'show_registration_wizard()' : null)
|
||||
(($registration === true) ? 'show_registration_wizard()' : null),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -159,7 +160,8 @@ if (!$config['disabled_newsletter']) {
|
|||
false,
|
||||
// Launch only if not being launch from 'initial'.
|
||||
!$initial,
|
||||
(($show_newsletter === true) ? 'force_run_newsletter()' : null)
|
||||
(($show_newsletter === false) ? 'force_run_newsletter()' : null),
|
||||
true
|
||||
);
|
||||
} else {
|
||||
if ($show_newsletter) {
|
||||
|
@ -167,7 +169,8 @@ if (!$config['disabled_newsletter']) {
|
|||
newsletter_wiz_modal(
|
||||
false,
|
||||
// Launch only if not being call from 'registration'.
|
||||
!$registration && !$initial
|
||||
!$registration && !$initial,
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,13 @@ if (! check_acl($config['id_user'], 0, 'PM')
|
|||
return;
|
||||
}
|
||||
|
||||
if (update_manager_verify_license_expired()) {
|
||||
ui_print_error_message(
|
||||
__('The license has expired. Please contact Artica at info@artica.es')
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
$baseurl = ui_get_full_url(false, false, false, false);
|
||||
|
||||
$current_package = db_get_value(
|
||||
|
|
|
@ -94,6 +94,13 @@ if ($upload_max_filesize < $PHPupload_max_filesize_min) {
|
|||
$php_settings_fine++;
|
||||
}
|
||||
|
||||
if (update_manager_verify_license_expired()) {
|
||||
ui_print_error_message(
|
||||
__('The license has expired. Please contact Artica at info@artica.es')
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Verify registry.
|
||||
if (update_manager_verify_registration() === false) {
|
||||
ui_require_css_file('register');
|
||||
|
|
|
@ -73,6 +73,24 @@ function update_manager_verify_trial()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if the trial license is not expired.
|
||||
*
|
||||
* @return boolean true if the trial license is expired, false otherwise.
|
||||
*/
|
||||
function update_manager_verify_license_expired()
|
||||
{
|
||||
global $config;
|
||||
|
||||
$current_date = date('Ymd');
|
||||
if (isset($config['license_expiry_date']) && $current_date >= $config['license_expiry_date']) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parses responses from configuration wizard.
|
||||
*
|
||||
|
@ -454,13 +472,20 @@ function registration_wiz_process()
|
|||
function registration_wiz_modal(
|
||||
$return=false,
|
||||
$launch=true,
|
||||
$callback=false
|
||||
$callback=false,
|
||||
$return_message=false
|
||||
) {
|
||||
global $config;
|
||||
$output = '';
|
||||
|
||||
// Do not show the wizard for trial licenses.
|
||||
if (update_manager_verify_trial()) {
|
||||
ui_print_info_message('Your license is trial. Please contact Artica at info@artica.es for a valid license', '', $return_message);
|
||||
return '';
|
||||
}
|
||||
|
||||
if (update_manager_verify_license_expired()) {
|
||||
ui_print_error_message('The license has expired. Please contact Artica at info@artica.es', '', $return_message);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue