Changeset 1083 for trunk/common


Ignore:
Timestamp:
12/21/09 14:03:40 (2 years ago)
Author:
bogdan2412
Message:

Many small fixes from live.

  • Moved admin/task_tags to admin/task-tags because that's apparently how we do urls.
  • Fixed autocomplete showing up only under the first tag form in the page.
  • Added "number of tasks" column to admin/task-tags page and made it and "Operations" column fixed width.
  • Disabled deletion of algorithm tags that are in use.
  • Allow ( and ) in algorithm tags. (for Sortare O(NlogN))
  • Made age_group no longer depend on the contest.

REVIEW URL: http://reviewboard.infoarena.ro/r/123/

Location:
trunk/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/common/common.php

    r1079 r1083  
    4747define("IA_RE_ROUND_ID", '[a-z0-9][a-z0-9_\-\.]*'); 
    4848define("IA_RE_TASK_ID", '(?-i:[a-z0-9][a-z0-9_\-\.]*)'); 
    49 define("IA_RE_TAG_NAME", '[a-z0-9\-\.\ \@]+'); 
     49define("IA_RE_TAG_NAME", '[a-z0-9\-\.\ \@\(\)]+'); 
    5050define("IA_RE_SCORE_NAME", '[a-z0-9][a-z0-9_\-\.]*'); 
    5151define("IA_RE_USER_NAME", '[_@a-z0-9][a-z0-9_\-\.\@]*'); 
  • trunk/common/tags.php

    r1081 r1083  
    6262    foreach ($parent_tags as $key => $tag) { 
    6363        $parent_tags[$key]['sub_tags'] = Array(); 
    64         $parent_tags_key[ $tag['tag_id'] ] = $key; 
     64        $parent_tags_key[$tag['tag_id']] = $key; 
    6565    } 
    6666 
    6767    foreach ($sub_tags as $tag) { 
    68         log_assert(isset($parent_tags_key[ $tag['tag_parent'] ]), "Child tag doesn't have a parent"); 
    69         $parent_tag_key = $parent_tags_key[ $tag['tag_parent'] ]; 
    70         $parent_tags[ $parent_tag_key ]['sub_tags'][] = $tag; 
     68        log_assert(isset($parent_tags_key[$tag['tag_parent']]), "Child tag doesn't have a parent"); 
     69        $parent_tag_key = $parent_tags_key[$tag['tag_parent']]; 
     70        $parent_tags[$parent_tag_key]['sub_tags'][] = $tag; 
    7171    } 
    7272 
Note: See TracChangeset for help on using the changeset viewer.