Changeset 17610

Show
Ignore:
Timestamp:
09/19/08 14:47:42 (3 months ago)
Author:
piotras
Message:

Added protected guid and id properties.
Replaced all guid and id properties usage.

Files:

Legend:

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

    r17580 r17610  
    4747class midcom_core_privilege extends midcom_core_privilege_db 
    4848{ 
    49     var $guid = ''; 
    50     var $id = 0; 
     49    protected $__guid = ''; 
     50    protected $__id = 0; 
    5151 
    5252    /** 
     
    112112        { 
    113113            // Explicity manual listing for performance reasons. 
    114             $this->guid = $src['guid']; 
    115             $this->id = $src['id']; 
     114            $this->__guid = $src['guid']; 
     115            $this->__id = $src['id']; 
    116116            $this->objectguid = $src['objectguid']; 
    117117            $this->name = $src['name']; 
     
    331331        { 
    332332            debug_push_class(__CLASS__, __FUNCTION__); 
    333             debug_add("Insufficient privileges on the content object with the GUID '{$this->guid}', midgard:update and midgard:privileges required.", 
     333            debug_add("Insufficient privileges on the content object with the GUID '{$this->__guid}', midgard:update and midgard:privileges required.", 
    334334                MIDCOM_LOG_INFO); 
    335335            debug_pop(); 
     
    945945        if ($this->value == MIDCOM_PRIVILEGE_INHERIT) 
    946946        { 
    947             if (   $this->guid 
    948                 || $this->id) 
     947            if (   $this->__guid 
     948                || $this->__id) 
    949949            { 
    950950                // Already a persistent record, drop it. 
     
    978978        } 
    979979 
    980         if (   $this->guid 
    981             || $this->id) 
    982         { 
    983             if ($this->guid) 
    984             { 
    985                 $privilege = new midcom_core_privilege_db($this->guid); 
     980        if (   $this->__guid 
     981            || $this->__id) 
     982        { 
     983            if ($this->__guid) 
     984            { 
     985                $privilege = new midcom_core_privilege_db($this->__guid); 
    986986            } 
    987987            else 
    988988            { 
    989989                $privilege = new midcom_core_privilege_db(); 
    990                 $privilege->get_by_id($this->id); 
     990                $privilege->get_by_id($this->__id); 
    991991            } 
    992992            $this->_copy_to_object($privilege); 
     
    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; 
     
    10591059    function drop() 
    10601060    { 
    1061         if (   !$this->guid 
    1062             && !$this->id) 
     1061        if (   !$this->__guid 
     1062            && !$this->__id) 
    10631063        { 
    10641064            debug_push_class(__CLASS__, __FUNCTION__); 
     
    10771077        } 
    10781078 
    1079         if ($this->guid) 
    1080         { 
    1081             $privilege = new midcom_core_privilege_db($this->guid); 
     1079        if ($this->__guid) 
     1080        { 
     1081            $privilege = new midcom_core_privilege_db($this->__guid); 
    10821082        } 
    10831083        else 
     
    10851085            // Unserialized objects have only ID in 8.09 
    10861086            $privilege = new midcom_core_privilege_db(); 
    1087             $privilege->get_by_id($this->id); 
     1087            $privilege->get_by_id($this->__id); 
    10881088        } 
    10891089