Changeset 1857


Ignore:
Timestamp:
27.07.2010 22:44:59 (6 weeks ago)
Author:
francois
Message:

[1.5][1.6] Fixed generated nested_set getter and setter when the level column is called "level" (closes #1051)

Location:
branches
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/generator/lib/behavior/nestedset/NestedSetBehaviorObjectBuilderModifier.php

    r1612 r1857  
    117117                $this->addProcessNestedSetQueries($script); 
    118118                 
    119                 $this->addGetLeft($script); 
    120                 $this->addGetRight($script); 
    121                 $this->addGetLevel($script); 
    122                 if ($this->getParameter('use_scope') == 'true') 
    123                 { 
     119                if ($this->getColumnPhpName('left_column') != 'LeftValue') { 
     120                        $this->addGetLeft($script); 
     121                } 
     122                if ($this->getColumnPhpName('right_column') != 'RightValue') { 
     123                        $this->addGetRight($script); 
     124                } 
     125                if ($this->getColumnPhpName('level_column') != 'Level') { 
     126                        $this->addGetLevel($script); 
     127                } 
     128                if ($this->getParameter('use_scope') == 'true') { 
    124129                        $this->addGetScope($script); 
    125130                } 
    126  
    127                 $this->addSetLeft($script); 
    128                 $this->addSetRight($script); 
    129                 $this->addSetLevel($script); 
    130                 if ($this->getParameter('use_scope') == 'true') 
    131                 { 
     131                 
     132                if ($this->getColumnPhpName('left_column') != 'LeftValue') { 
     133                        $this->addSetLeft($script); 
     134                } 
     135                if ($this->getColumnPhpName('right_column') != 'RightValue') { 
     136                        $this->addSetRight($script); 
     137                } 
     138                if ($this->getColumnPhpName('level_column') != 'Level') { 
     139                        $this->addSetLevel($script); 
     140                } 
     141                if ($this->getParameter('use_scope') == 'true') { 
    132142                        $this->addSetScope($script); 
    133143                } 
  • branches/1.6/generator/lib/behavior/nestedset/NestedSetBehaviorObjectBuilderModifier.php

    r1612 r1857  
    117117                $this->addProcessNestedSetQueries($script); 
    118118                 
    119                 $this->addGetLeft($script); 
    120                 $this->addGetRight($script); 
    121                 $this->addGetLevel($script); 
    122                 if ($this->getParameter('use_scope') == 'true') 
    123                 { 
     119                if ($this->getColumnPhpName('left_column') != 'LeftValue') { 
     120                        $this->addGetLeft($script); 
     121                } 
     122                if ($this->getColumnPhpName('right_column') != 'RightValue') { 
     123                        $this->addGetRight($script); 
     124                } 
     125                if ($this->getColumnPhpName('level_column') != 'Level') { 
     126                        $this->addGetLevel($script); 
     127                } 
     128                if ($this->getParameter('use_scope') == 'true') { 
    124129                        $this->addGetScope($script); 
    125130                } 
    126  
    127                 $this->addSetLeft($script); 
    128                 $this->addSetRight($script); 
    129                 $this->addSetLevel($script); 
    130                 if ($this->getParameter('use_scope') == 'true') 
    131                 { 
     131                 
     132                if ($this->getColumnPhpName('left_column') != 'LeftValue') { 
     133                        $this->addSetLeft($script); 
     134                } 
     135                if ($this->getColumnPhpName('right_column') != 'RightValue') { 
     136                        $this->addSetRight($script); 
     137                } 
     138                if ($this->getColumnPhpName('level_column') != 'Level') { 
     139                        $this->addSetLevel($script); 
     140                } 
     141                if ($this->getParameter('use_scope') == 'true') { 
    132142                        $this->addSetScope($script); 
    133143                } 
Note: See TracChangeset for help on using the changeset viewer.