Merge remote-tracking branch 'origin/develop' into ent-3595-discovery-fase-2
Conflicts: pandora_console/include/class/ConsoleSupervisor.php Former-commit-id: d734637dea22b18b1d30a3d8575cd45500558e29
This commit is contained in:
commit
5504741a9d
|
@ -234,6 +234,7 @@ class ConsoleSupervisor
|
|||
/*
|
||||
* Check license.
|
||||
* NOTIF.LICENSE.EXPIRATION
|
||||
* NOTIF.LICENSE.LIMITED
|
||||
*/
|
||||
|
||||
$this->checkLicense();
|
||||
|
@ -537,6 +538,10 @@ class ConsoleSupervisor
|
|||
}
|
||||
|
||||
switch ($data['type']) {
|
||||
case 'NOTIF.LICENSE.LIMITED':
|
||||
$max_age = 0;
|
||||
break;
|
||||
|
||||
case 'NOTIF.LICENSE.EXPIRATION':
|
||||
case 'NOTIF.FILES.ATTACHMENT':
|
||||
case 'NOTIF.FILES.DATAIN':
|
||||
|
@ -684,12 +689,28 @@ class ConsoleSupervisor
|
|||
|
||||
$days_to_expiry = ((strtotime($license['expiry_date']) - time()) / (60 * 60 * 24));
|
||||
|
||||
// Limited mode.
|
||||
if (isset($config['limited_mode'])) {
|
||||
// Warn user if license is going to expire in 15 days or less.
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.LICENSE.LIMITED',
|
||||
'title' => __('Limited mode.'),
|
||||
'message' => io_safe_output($config['limited_mode']),
|
||||
'url' => 'index.php?sec=gsetup&sec2=godmode/setup/license',
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->cleanNotifications('NOTIF.LICENSE.LIMITED');
|
||||
}
|
||||
|
||||
// Expiry.
|
||||
if (($days_to_expiry <= 15) && ($days_to_expiry > 0)) {
|
||||
// Warn user if license is going to expire in 15 days or less.
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.LICENSE_EXPIRATION',
|
||||
'title' => __('License is about to expire'),
|
||||
'type' => 'NOTIF.LICENSE.EXPIRATION',
|
||||
'title' => __('License is going to expire.'),
|
||||
'message' => __(
|
||||
'Your license will expire in %d days. Please, contact our sales department.',
|
||||
$days_to_expiry
|
||||
|
|
|
@ -1438,7 +1438,13 @@ function enterprise_include($filename)
|
|||
global $config;
|
||||
|
||||
// Load enterprise extensions
|
||||
$filepath = realpath($config['homedir'].'/'.ENTERPRISE_DIR.'/'.$filename);
|
||||
if (defined('DESTDIR')) {
|
||||
$destdir = DESTDIR;
|
||||
} else {
|
||||
$destdir = '';
|
||||
}
|
||||
|
||||
$filepath = realpath($destdir.$config['homedir'].'/'.ENTERPRISE_DIR.'/'.$filename);
|
||||
|
||||
if ($filepath === false) {
|
||||
return ENTERPRISE_NOT_HOOK;
|
||||
|
|
|
@ -380,7 +380,18 @@ function extensions_load_extensions($process_login)
|
|||
// ~ }
|
||||
// ~ }
|
||||
// ~ else {
|
||||
try {
|
||||
include_once $path_extension;
|
||||
}
|
||||
|
||||
// PHP 7
|
||||
catch (Throwable $e) {
|
||||
}
|
||||
|
||||
// PHP 5
|
||||
catch (Exception $e) {
|
||||
}
|
||||
|
||||
// ~ }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,12 +163,21 @@ $(document).ready (function () {
|
|||
background: "black"
|
||||
},
|
||||
open: function() {
|
||||
setTimeout(function(){
|
||||
$("#spinner_ok").hide();
|
||||
var remaining = 30;
|
||||
|
||||
// Timeout counter.
|
||||
var count = function() {
|
||||
if (remaining > 0) {
|
||||
$("#license_error_remaining").text(remaining);
|
||||
remaining -= 1;
|
||||
} else {
|
||||
$("#license_error_remaining").hide();
|
||||
$("#ok_buttom").show();
|
||||
},
|
||||
30000
|
||||
);
|
||||
clearInterval(count);
|
||||
}
|
||||
}
|
||||
|
||||
setInterval(count, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -244,6 +244,10 @@ if (strlen($search) > 0) {
|
|||
|
||||
// Login process
|
||||
if (! isset($config['id_user'])) {
|
||||
// Clear error messages.
|
||||
unset($_COOKIE['errormsg']);
|
||||
setcookie('errormsg', null, -1);
|
||||
|
||||
if (isset($_GET['login'])) {
|
||||
include_once 'include/functions_db.php';
|
||||
// Include it to use escape_string_sql function
|
||||
|
@ -1026,10 +1030,11 @@ if ($config['pure'] == 0) {
|
|||
echo '<div id="container"><div id="head">';
|
||||
include 'general/header.php';
|
||||
|
||||
if ($_SESSION['menu_type']=='classic')
|
||||
if ($_SESSION['menu_type'] == 'classic') {
|
||||
echo '</div><div id="page" class="page_classic"><div id="menu">';
|
||||
else
|
||||
} else {
|
||||
echo '</div><div id="page" class="page_collapsed"><div id="menu">';
|
||||
}
|
||||
|
||||
include 'general/main_menu.php';
|
||||
echo '</div>';
|
||||
|
|
Loading…
Reference in New Issue