Changeset 1106 for trunk/common
- Timestamp:
- 03/14/10 18:30:11 (2 years ago)
- Location:
- trunk/common
- Files:
-
- 2 edited
-
db/tags.php (modified) (2 diffs)
-
tags.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/db/tags.php
r1099 r1106 61 61 // Each parent id appears only once 62 62 function tag_get_parents($tag_ids) { 63 if (count($tag_ids) == 0) { 64 return array(); 65 } 66 63 67 $query = sprintf("SELECT DISTINCT(`parent`) 64 68 FROM ia_tags … … 103 107 // Get a list of tags from a list of tag ids 104 108 function tag_get_by_ids($tag_ids) { 109 if (count($tag_ids) == 0) { 110 return array(); 111 } 112 105 113 $query = sprintf( 106 114 "SELECT `id`, `name`, `type`, `parent` -
trunk/common/tags.php
r1099 r1106 83 83 foreach ($tags_by_id as &$tag) { 84 84 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 } 85 89 $roots[] = $tag; 86 90 }
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)