Commit c9048474 authored by Antoine Gallavardin's avatar Antoine Gallavardin
Browse files

Change attribute for identifying unique terms

parent 0c0c7338
......@@ -32,7 +32,7 @@ class term extends simplePlugin
'name' => _('Terms Lists'),
'icon' => 'geticon.php?context=applications&icon=term&size=16',
'ou' => get_ou('fdTaxonomyTermsRDN'),
'mainAttr' => 'fdTaxonomyTermCode',
'mainAttr' => 'fdTaxonomyTermCompleteCode',
]],
'plSearchAttrs' => ['description'],
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo(), TRUE)
......@@ -59,6 +59,7 @@ class term extends simplePlugin
_('Term Long Label'), _('Long Label of Term code'),
'fdTaxonomyTermLongLabel', FALSE
),
new HiddenAttribute('fdTaxonomyTermCompleteCode'),
new HiddenArrayAttribute('fdTaxonomyReferentiel',FALSE,[] ),
new HiddenArrayAttribute('fdTaxonomyName',FALSE,[]),
new TextAreaAttribute(
......@@ -104,6 +105,9 @@ class term extends simplePlugin
$this->fdTaxonomyReferentiel = $hRefAndTex[0];
$this->fdTaxonomyName = $hRefAndTex[1];
$this->ReferentielAndTaxonomy='';
$this->fdTaxonomyTermCompleteCode=$this->fdTaxonomyReferentiel."-".$this->fdTaxonomyName."-".$this->fdTaxonomyTermCode;
this->attributesAccess['fdTaxonomyTermCompleteCode'][0]=$this->fdTaxonomyReferentiel."-".$this->fdTaxonomyName."-".$this->fdTaxonomyTermCode;
var_dump($this->fdTaxonomyReferentiel."-".$this->fdTaxonomyName."-".$this->fdTaxonomyTermCode);
return parent::prepare_save();
}
}
......@@ -40,10 +40,16 @@ attributetype ( 1.3.6.1.4.1.38414.81.10.6 NAME 'fdTaxonomyTermEndDate'
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
attributetype ( 1.3.6.1.4.1.38414.81.10.7 NAME 'fdTaxonomyTermCompleteCode'
DESC 'FusionDirectory - Taxonomy Term complete Code with referentiel and taxonomy'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
# Object Class
objectclass ( 1.3.6.1.4.1.38414.81.20.1 NAME 'fdTaxonomyTerms'
DESC 'FusionDirectory Taxonomy Terms Management'
MUST ( fdTaxonomyTermCode )
MAY (
fdTaxonomyTermLongLabel $ fdTaxonomyReferentiel $ fdTaxonomyName $ fdTaxonomyTermStartDate $ fdTaxonomyTermEndDate $ description
fdTaxonomyTermLongLabel $ fdTaxonomyReferentiel $ fdTaxonomyName $ fdTaxonomyTermStartDate $ fdTaxonomyTermEndDate $ description $ fdTaxonomyTermCompleteCode
) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment