Skip to content
Permalink
Browse files

Only link if o.o.contacts is available

  • Loading branch information
flack committed Nov 14, 2019
1 parent a857307 commit f8fd822b888f71c3ff9a6d089ac1cb199e5eeaea
Showing with 7 additions and 4 deletions.
  1. +7 −4 lib/org/openpsa/directmarketing/handler/campaign/campaign.php
@@ -63,17 +63,20 @@ public function get_qb($field = null, $direction = 'ASC', array $search = []) :
public function get_row(midcom_core_dbaobject $person)
{
$template = '%s';
$siteconfig = org_openpsa_core_siteconfig::get_instance();
$url = $siteconfig->get_node_full_url('org.openpsa.contacts') . 'person/';
if ($url = $siteconfig->get_node_full_url('org.openpsa.contacts') . 'person/') {
$template = '<a target="_blank" href="' . $url . $person->guid . '">%s</a>';
}
$row = [
'id' => $person->id,
'index_firstname' => $person->firstname,
'firstname' => '<a target="_blank" href="' . $url . $person->guid . '/">' . $person->firstname . '</a>',
'firstname' => sprintf($template, $person->firstname),
'index_lastname' => $person->lastname,
'lastname' => '<a target="_blank" href="' . $url . $person->guid . '/">' . $person->lastname . '</a>',
'lastname' => sprintf($template, $person->lastname),
'index_email' => $person->email,
'email' => '<a target="_blank" href="' . $url . $person->guid . '/">' . $person->email . '</a>'
'email' => sprintf($template, $person->email)
];
$delete_string = sprintf($this->_l10n->get('remove %s from campaign'), $person->name);

0 comments on commit f8fd822

Please sign in to comment.
You can’t perform that action at this time.