Skip to content

Commit

Permalink
Respect Tagger Null driver
Browse files Browse the repository at this point in the history
Signed-off-by: Michael M Slusarz <slusarz@horde.org>
  • Loading branch information
joaomachado authored and slusarz committed Feb 13, 2014
1 parent c03ac4f commit 9580868
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions turba/lib/Form/ContactBase.php
Expand Up @@ -14,7 +14,7 @@ abstract class Turba_Form_ContactBase extends Horde_Form
protected function _addFields(Turba_Object $contact, $useTabs = true)
{
// @TODO: inject this
global $attributes;
global $attributes, $injector;

// Run through once to see what form actions, if any, we need
// to set up.
Expand Down Expand Up @@ -85,7 +85,9 @@ protected function _addFields(Turba_Object $contact, $useTabs = true)
}

/* Add tags. */
if (isset($map['__uid'])) {
if (isset($map['__uid']) &&
($tagger = $injector->getInstance('Turba_Tagger')) &&
!($tagger instanceof Horde_Core_Tagger_Null)) {
$this->addVariable(
_("Tags"),
'object[__tags]',
Expand Down

0 comments on commit 9580868

Please sign in to comment.