Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!in_array($context, $allowed_contexts))
- {
- return true;
- }
- // Return if we don't have valid params or don't link the author
- if (!($params instanceof Registry) || !$params->get('link_author'))
- {
- return true;
- }
- // Return if we don't have a valid article id
- if (!isset($row->id) || !(int) $row->id)
- {
- return true;
- }
- //$row->contactid = $this->getContactId($row->created_by);
- if (!empty($text)) {
- $text = $row->text;
- }
- if ($row->contactid)
- {
- $needle = 'index.php?option=com_contact&view=contact&id=' . $row->contactid;
- $menu = JFactory::getApplication()->getMenu();
- $item = $menu->getItems('link', $needle, true);
- $link = $item ? $needle . '&Itemid=' . $item->id : $needle;
- $row->contact_link = JRoute::_($link);
- }
- else
- {
- $row->contact_link = '';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement