Skip to content

Commit

Permalink
Issue #451 todyup
Browse files Browse the repository at this point in the history
  • Loading branch information
tbar0970 committed Mar 13, 2018
1 parent e662b74 commit bbe8adb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions db_objects/person_query.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ class="select-rule-toggle"
</td>
</tr>
<?php
if (strlen(ifdef('MAILCHIMP_API_KEY'))) {
if (strlen(ifdef('MAILCHIMP_API_KEY')) && $GLOBALS['user_system']->havePerm(PERM_SYSADMIN)) {
?>
<tr>
<td>Mailchimp List ID</td>
Expand All @@ -648,12 +648,16 @@ function processForm($prefix='', $fields=NULL)
case 'new':
$this->populate(0, Array());
$this->processFieldInterface('name');
$this->processFieldInterface('mailchimp_list_id');
if ($GLOBALS['user_system']->havePerm(PERM_SYSADMIN)) {
$this->processFieldInterface('mailchimp_list_id');
}
$this->setValue('owner', $_POST['is_private'] ? $GLOBALS['user_system']->getCurrentUser('id') : NULL);
break;
case 'replace':
$this->processFieldInterface('name');
$this->processFieldInterface('mailchimp_list_id');
if ($GLOBALS['user_system']->havePerm(PERM_SYSADMIN)) {
$this->processFieldInterface('mailchimp_list_id');
}
$this->setValue('owner', $_POST['is_private'] ? $GLOBALS['user_system']->getCurrentUser('id') : NULL);
break;
case 'temp':
Expand Down
2 changes: 1 addition & 1 deletion views/view_3_persons__3_reports.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function printView()
<?php
if (strlen($details['mailchimp_list_id'])) {
?>
<a href="?view=_send_mc_campaign&reportid=<?php echo (int)$id; ?>"><i class="icon-envelope"></i>Send campaign</a>
<a href="?view=_send_mc_campaign&reportid=<?php echo (int)$id; ?>"><i class="icon-email">@</i>Send campaign</a>
<?php
} else {
?>
Expand Down

0 comments on commit bbe8adb

Please sign in to comment.