Changeset 1106 for trunk/common


Ignore:
Timestamp:
03/14/10 18:30:11 (2 years ago)
Author:
gcosmin
Message:

You can now deselect all tags for a task
review url: http://reviewboard.infoarena.ro/r/133/

Location:
trunk/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/common/db/tags.php

    r1099 r1106  
    6161// Each parent id appears only once 
    6262function tag_get_parents($tag_ids) { 
     63    if (count($tag_ids) == 0) { 
     64        return array(); 
     65    } 
     66 
    6367    $query = sprintf("SELECT DISTINCT(`parent`) 
    6468            FROM ia_tags 
     
    103107// Get a list of tags from a list of tag ids 
    104108function tag_get_by_ids($tag_ids) { 
     109    if (count($tag_ids) == 0) { 
     110        return array(); 
     111    } 
     112 
    105113    $query = sprintf( 
    106114            "SELECT `id`, `name`, `type`, `parent` 
  • trunk/common/tags.php

    r1099 r1106  
    8383    foreach ($tags_by_id as &$tag) { 
    8484        if (!isset($has_parent[$tag["id"]])) { 
     85            // Set the array for the tags with no parents and no children 
     86            if (!isset($tag["sub_tags"])) { 
     87                $tag["sub_tags"] = array(); 
     88            } 
    8589            $roots[] = $tag; 
    8690        } 
Note: See TracChangeset for help on using the changeset viewer.