mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-10 02:33:02 +02:00
fixes #1913 hide/show newsletter subscribe link based on user_prefs
This commit is contained in:
+13
-12
@@ -414,18 +414,6 @@ INSERT INTO '.$prefixeTable.'config (param,value,comment)
|
||||
array_keys($datas[0]),
|
||||
$datas
|
||||
);
|
||||
|
||||
if ($is_newsletter_subscribe)
|
||||
{
|
||||
fetchRemote(
|
||||
get_newsletter_subscribe_base_url($language).$admin_mail,
|
||||
$result,
|
||||
array(),
|
||||
array('origin' => 'installation')
|
||||
);
|
||||
|
||||
conf_update_param('show_newsletter_subscription', 'false');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,6 +481,19 @@ else
|
||||
$user = build_user(1, true);
|
||||
log_user($user['id'], false);
|
||||
|
||||
// newsletter subscription
|
||||
if ($is_newsletter_subscribe)
|
||||
{
|
||||
fetchRemote(
|
||||
get_newsletter_subscribe_base_url($language).$admin_mail,
|
||||
$result,
|
||||
array(),
|
||||
array('origin' => 'installation')
|
||||
);
|
||||
|
||||
userprefs_update_param('show_newsletter_subscription', false);
|
||||
}
|
||||
|
||||
// email notification
|
||||
if (isset($_POST['send_credentials_by_mail']))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user