Changeset 16219 for gsdl


Ignore:
Timestamp:
2008-06-27T10:39:57+12:00 (16 years ago)
Author:
mdewsnip
Message:

Changed the ".pr" resolving code to use the hierarchy separator, so it works when a non-standard hierarchy separator has been specified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/recpt/dynamicclassifieraction.cpp

    r16216 r16219  
    159159
    160160  // Resolve any ".pr" bits at the end of the "dcn" argument
     161  text_t classifier_node_separator = classifier_options["-split_using_hierarchy_separator"];
    161162  if (ends_with (args["dcn"], ".pr"))
    162163  {
    163164    // Change the "dcn" argument to be the OID of the parent of the specified classifier node
    164     text_t::iterator parent_classifier_node_OID_end = findlastchar (args["dcn"].begin(), args["dcn"].end(), '|');
    165     if (parent_classifier_node_OID_end != args["dcn"].end())
    166     {
    167       args["dcn"] = substr (args["dcn"].begin(), parent_classifier_node_OID_end);
    168     }
    169     else
    170     {
    171       args["dcn"] = "";
    172     }
     165    text_tlist args_dcn_parts;
     166    splitword (args["dcn"].begin(), args["dcn"].end(), classifier_node_separator, args_dcn_parts);
     167    args_dcn_parts.pop_back();  // Remove the last part
     168    joinchar (args_dcn_parts, classifier_node_separator, args["dcn"]);
    173169  }
    174170
     
    176172  text_t current_classifier_node_OID = "";
    177173  text_t current_metadata_value_filter = "";
    178   text_t classifier_node_separator = classifier_options["-split_using_hierarchy_separator"];
    179174  int classifier_node_indent = 0;
    180175
Note: See TracChangeset for help on using the changeset viewer.