Changeset 614 for trunk/admin/include


Ignore:
Timestamp:
Nov 23, 2004, 11:31:24 PM (20 years ago)
Author:
plg
Message:
  • global categories' options : instead of N horizontal tabs on a single page, N options in the left menu (but the same backend)
  • categories.global_rank : new calculated field. It gives a global rank of the category among all others (updated during ordering)
  • category.php page : menu is generated faster thanks to categories.global_rank, recursivity becomes useless :-)
  • new function to display select box with a set of categories : display_select_cat_wrapper
  • cat_options : instead of using 1 multiselect for true/false items, using 1 multiselect for true, and another one for false. The form provides buttons with arrows to switch categories from one multiselect to another
  • deletion of obsolete function display_categories (working with the old template system)
  • deletion of obsolete functions get_user_plain_structure, create_user_structure, get_user_subcat_ids, update_structure, count_images : useless thanks to global_rank
Location:
trunk/admin/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r610 r614  
    581581}
    582582
    583 function display_categories( $categories, $indent,
    584                              $selected = -1, $forbidden = -1 )
    585 {
    586   global $vtp,$sub;
    587 
    588   foreach ( $categories as $category ) {
    589     if ( $category['id'] != $forbidden )
    590     {
    591       $vtp->addSession( $sub, 'associate_cat' );
    592       $vtp->setVar( $sub, 'associate_cat.value',   $category['id'] );
    593       $content = $indent.'- '.$category['name'];
    594       $vtp->setVar( $sub, 'associate_cat.content', $content );
    595       if ( $category['id'] == $selected )
    596         $vtp->setVar( $sub, 'associate_cat.selected', ' selected="selected"' );
    597       $vtp->closeSession( $sub, 'associate_cat' );
    598       display_categories( $category['subcats'], $indent.str_repeat(' ',3),
    599                           $selected, $forbidden );
    600     }
    601   }
    602 }
    603 
    604583/**
    605584 * returns an array with the ids of the restricted categories for the user
  • trunk/admin/include/functions_metadata.php

    r600 r614  
    4141    if (in_array($pwg_key, $datefields))
    4242    {
    43       if ( preg_match('/(\d{4})(\d{2})(\d{2})/', $value, $matches))
     43      if (preg_match('/(\d{4})(\d{2})(\d{2})/', $value, $matches))
    4444      {
    4545        $iptc[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3];
Note: See TracChangeset for help on using the changeset viewer.