Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- photos
- photoid
- caption
- filename
- date
- tags
- tagid
- tagname
- phototags
- photoid
- tagid
- public static void threadproc_tags(object obj)
- {
- System.Web.HttpApplicationState app = (System.Web.HttpApplicationState)obj;
- SortedDictionary<string,List<int>> tags = new SortedDictionary<string,List<int>>();
- // update the cache
- DbUtil dbutil = new DbUtil();
- DataSet ds = dbutil.get_dataset("select bg_id, bg_tags from bugs where isnull(bg_tags,'') <> ''");
- foreach (DataRow dr in ds.Tables[0].Rows)
- {
- string[] labels = btnet.Util.split_string_using_commas((string) dr[1]);
- // for each tag label, build a list of bugids that have that label
- for (int i = 0; i < labels.Length; i++)
- {
- string label = normalize_tag(labels[i]);
- if (label != "")
- {
- if (!tags.ContainsKey(label))
- {
- tags[label] = new List<int>();
- }
- tags[label].Add((int)dr[0]);
- }
- }
- }
- app["tags"] = tags;
- }
Add Comment
Please, Sign In to add comment