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/post.php

    r1417 r1421  
    295295     $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    296296     if (!$categories->isEmpty()) { 
    297           $l = $categories->level; 
    298           $full_name = array($categories->cat_title); 
    299  
    300297          while ($categories->fetch()) { 
    301                if ($categories->level < $l) { 
    302                     $full_name = array(); 
    303                } elseif ($categories->level == $l) { 
    304                     array_pop($full_name); 
    305                } 
    306                $full_name[] = html::escapeHTML($categories->cat_title); 
    307                $categories_combo[implode(' / ',$full_name)] = $categories->cat_id; 
    308                $l = $categories->level; 
     298               $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     299                    str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     300                    $categories->cat_id 
     301               ); 
    309302          } 
    310303     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map