mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-22 16:33:48 +01:00
- LSldapObject :: updateRelationsCache()
-> Utilisation d'un nouvel objet pour faire le cache plutot que $this. Cela posait des problèmes dans la mise à jour de relation sinon
This commit is contained in:
parent
0e84f7d284
commit
ff1a020630
1 changed files with 5 additions and 2 deletions
|
@ -1036,15 +1036,18 @@ class LSldapObject {
|
|||
function updateRelationsCache() {
|
||||
$this -> _relationsCache=array();
|
||||
if (is_array($this->config['relations'])) {
|
||||
$type = $this -> getType();
|
||||
$me = new $type();
|
||||
$me -> loadData($this -> getDn());
|
||||
foreach($this->config['relations'] as $relation_name => $relation_conf) {
|
||||
if ( isset($relation_conf['list_function']) ) {
|
||||
if ($GLOBALS['LSsession'] -> loadLSobject($relation_conf['LSobject'])) {
|
||||
$obj = new $relation_conf['LSobject']();
|
||||
if ((method_exists($obj,$relation_conf['list_function']))&&(method_exists($obj,$relation_conf['getkeyvalue_function']))) {
|
||||
$list = $obj -> $relation_conf['list_function']($this);
|
||||
$list = $obj -> $relation_conf['list_function']($me);
|
||||
if (is_array($list)) {
|
||||
// Key Value
|
||||
$key = $obj -> $relation_conf['getkeyvalue_function']($this);
|
||||
$key = $obj -> $relation_conf['getkeyvalue_function']($me);
|
||||
|
||||
$this -> _relationsCache[$relation_name] = array(
|
||||
'list' => $list,
|
||||
|
|
Loading…
Reference in a new issue