Dotclear


Ignore:
Timestamp:
08/16/13 21:40:57 (12 years ago)
Author:
Denis Jean-Christian <contact@…>
Branch:
2.5
Children:
1429:edca6a120928, 1430:3b3bd51f7a9d, 1432:49b08f56b462
Message:

Added creation of category on the fly. And under heavy pressure, revert to the other list style, fixes #1424

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/posts_actions.php

    r1419 r1421  
    271271          $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    272272          if (!$categories->isEmpty()) { 
    273                $l = $categories->level; 
    274                $full_name = array($categories->cat_title); 
    275  
    276273               while ($categories->fetch()) { 
    277                     if ($categories->level < $l) { 
    278                          $full_name = array(); 
    279                     } elseif ($categories->level == $l) { 
    280                          array_pop($full_name); 
    281                     } 
    282                     $full_name[] = html::escapeHTML($categories->cat_title); 
    283                     $categories_combo[implode(' / ',$full_name)] = $categories->cat_id; 
    284                     $l = $categories->level; 
     274                    $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     275                         str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     276                         $categories->cat_id 
     277                    ); 
    285278               } 
    286279          } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map