Changeset 17656

Show
Ignore:
Timestamp:
09/22/08 15:59:40 (2 months ago)
Author:
flack
Message:

avoid duplicate privilege creation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.core/midcom/core/privilege.php

    r17610 r17656  
    962962                $object = $this->get_object(); 
    963963                $privilege = $this->get_privilege($object, $this->name, $this->assignee, $this->classname); 
    964                 if (!empty($privilege->guid)) 
     964                if (!empty($privilege->__guid)) 
    965965                { 
    966966                    if (! $privilege->drop()) 
     
    10021002            $object = $this->get_object(); 
    10031003            $privilege = $this->get_privilege($object, $this->name, $this->assignee, $this->classname); 
    1004             if (!empty($privilege->guid) 
    1005                 || $privilege->id != 0) 
     1004            if (!empty($privilege->__guid) 
     1005                || $privilege->__id != 0) 
    10061006            { 
    10071007                $privilege->value = $this->value; 
     
    10131013                    return false; 
    10141014                } 
    1015                 $this->__guid = $privilege->guid; 
    1016                 $this->__id = $privilege->id; 
     1015                $this->__guid = $privilege->__guid; 
     1016                $this->__id = $privilege->__id; 
    10171017                $this->objectguid = $privilege->objectguid; 
    10181018                $this->name = $privilege->name;