Ignore:
Timestamp:
Sep 25, 2005, 8:31:55 PM (19 years ago)
Author:
plg
Message:
  • bug fixed: HTML error on nested UL in categories menu.
  • bug 161 fixed: guest_id not taken into account for history table insert.
  • bug 164 fixed: category inserted in history table becomes too long if HTML tags are kept.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_html.inc.php

    r862 r876  
    340340
    341341  $ref_level = 0;
    342   $menu = '
    343              <ul class="menu">';
     342  $menu = '';
    344343 
    345344  foreach ($categories as $category)
    346345  {
    347     $level = substr_count($category['global_rank'], '.');
     346    $level = substr_count($category['global_rank'], '.') + 1;
    348347    if ($level > $ref_level)
    349348    {
    350349      $menu.= '
    351              <ul class="menu">';
     350             <ul>';
     351    }
     352    else if ($level == $ref_level)
     353    {
     354      $menu.= '
     355             </li>';
    352356    }
    353357    else if ($level < $ref_level)
     
    355359      // we may have to close more than one level at the same time...
    356360      $menu.= str_repeat("\n</ul>",($ref_level-$level));
     361      $menu.= "\n</li>";
    357362    }
    358363    $ref_level = $level;
     
    383388      $menu.= get_icon($category['date_last']);
    384389    }
    385 
    386     $menu.= '
    387            </li>';
    388   }
    389  
    390   $menu.= '
     390  }
     391 
     392  $menu.= '</li>
    391393             </ul>';
    392394 
Note: See TracChangeset for help on using the changeset viewer.