Dotclear

Changeset 1261:797b03c6a9ef


Ignore:
Timestamp:
08/03/13 08:02:34 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.5
Children:
1262:ec1e7bef6c1f, 1362:81f2407cdfd9, 1370:23e28bfd47a7, 1439:b232226a3a37
Message:

Fix category cursor before corresponding behaviour, fixes #1365, thanks sogos/sogox for patch and tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.blog.php

    r1228 r1261  
    505505          $this->core->callBehavior('coreBeforeCategoryCreate',$this,$cur); 
    506506           
    507           $this->categories()->addNode($cur,$parent); 
     507          $id = $this->categories()->addNode($cur,$parent); 
     508          # Update category's cursor 
     509          $rs = $this->getCategory($id); 
     510          if (!$rs->isEmpty()) { 
     511               $cur->cat_lft = $rs->cat_lft; 
     512               $cur->cat_rgt = $rs->cat_rgt; 
     513          } 
    508514           
    509515          # --BEHAVIOR-- coreAfterCategoryCreate 
Note: See TracChangeset for help on using the changeset viewer.

Sites map