Merge branch 'ent-5162-9263-Notificaciones-infinitas' into 'develop'

removed newsletter notification from messages list

See merge request artica/pandorafms!2978
This commit is contained in:
Alejandro Fraguas 2019-12-23 10:49:04 +01:00
commit 935d246a0d
1 changed files with 0 additions and 43 deletions

View File

@ -391,13 +391,6 @@ class ConsoleSupervisor
$this->checkDefaultPassword(); $this->checkDefaultPassword();
/*
* Check if there's an active subscription.
* NOTIF.NEWSLETTER.SUBSCRIPTION
*/
$this->checkNewsletterSubscription();
/* /*
* Check if there're new updates. * Check if there're new updates.
* NOTIF.UPDATEMANAGER.OPENSETUP * NOTIF.UPDATEMANAGER.OPENSETUP
@ -608,7 +601,6 @@ class ConsoleSupervisor
case 'NOTIF.MISC.DEVELOPBYPASS': case 'NOTIF.MISC.DEVELOPBYPASS':
case 'NOTIF.MISC.FONTPATH': case 'NOTIF.MISC.FONTPATH':
case 'NOTIF.SECURITY.DEFAULT_PASSWORD': case 'NOTIF.SECURITY.DEFAULT_PASSWORD':
case 'NOTIF.NEWSLETTER.SUBSCRIPTION':
case 'NOTIF.UPDATEMANAGER.OPENSETUP': case 'NOTIF.UPDATEMANAGER.OPENSETUP':
case 'NOTIF.UPDATEMANAGER.UPDATE': case 'NOTIF.UPDATEMANAGER.UPDATE':
case 'NOTIF.UPDATEMANAGER.MINOR': case 'NOTIF.UPDATEMANAGER.MINOR':
@ -2000,41 +1992,6 @@ class ConsoleSupervisor
} }
/**
* Check if instance is subscribed to newsletter.
*
* @return void
*/
public function checkNewsletterSubscription()
{
global $config;
$login = get_parameter('login', false);
// Newsletter advice.
$newsletter = db_get_value(
'middlename',
'tusuario',
'id_user',
$config['id_user']
);
if (!$config['disabled_newsletter']
&& $newsletter != 1
&& $login === false
) {
$this->notify(
[
'type' => 'NOTIF.NEWSLETTER.SUBSCRIPTION',
'title' => __('Not subscribed to the newsletter'),
'message' => __('Click <a style="font-weight:bold; text-decoration:underline" href="javascript: force_run_newsletter();"> here</a> to subscribe to the newsletter'),
'url' => 'javascript: force_run_newsletter();',
]
);
} else {
$this->cleanNotifications('NOTIF.NEWSLETTER.SUBSCRIPTION');
}
}
/** /**
* Check if user 'admin' is enabled and using default password. * Check if user 'admin' is enabled and using default password.
* *