Changeset 408 for branches


Ignore:
Timestamp:
02/13/14 16:39:28 (6 years ago)
Author:
jls17
Message:
  • little fix of previous commit r405 in DocCharMenuDetails?.cpp (menus schema name should be displayed, even if the schema doesn't exist)
  • removed some code duplicates in DocAlDetails?.cpp
Location:
branches/work_304
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/work_304/ARInside.cpp

    r405 r408  
    11811181string CARInside::LinkToSchema(int insideId, int fromRootLevel) 
    11821182{ 
    1183         CARSchema schema(insideId); 
    1184         if(schema.Exists()) 
    1185         { 
    1186                 return schema.GetURL(fromRootLevel); 
    1187         } 
    1188         return EmptyValue; 
     1183        return LinkToSchema(insideId, EmptyValue, fromRootLevel); 
    11891184} 
    11901185 
     
    11971192        } 
    11981193        return schemaName; 
     1194} 
     1195 
     1196string CARInside::LinkToSchema(int schemaInsideId, const string &nameToUseIfSchemaNotExists, int fromRootLevel) 
     1197{ 
     1198        CARSchema schema(schemaInsideId); 
     1199        if (schema.Exists()) 
     1200        { 
     1201                return schema.GetURL(fromRootLevel); 
     1202        } 
     1203        return nameToUseIfSchemaNotExists; 
    11991204} 
    12001205 
  • branches/work_304/ARInside.h

    r404 r408  
    144144        string LinkToSchema(const string& schemaName, int fromRootLevel); 
    145145        string LinkToSchema(int insideId, int fromRootLevel); 
     146        string LinkToSchema(int schemaInsideId, const string &nameToUseIfSchemaNotExists, int rootLevel); 
    146147        string LinkToSchemaIndex(string indexName, int schemaInsideId, int fromRootLevel);       
    147148        string LinkToEscalation(const string& escalationName, int fromRootLevel); 
  • branches/work_304/doc/DocAlDetails.cpp

    r307 r408  
    238238        stringstream pgStrm; 
    239239        pgStrm.str(""); 
    240         int schemaInsideId = -2; 
     240        CARSchema schema(schemaName); 
     241        int schemaInsideId = schema.GetInsideId(); 
    241242 
    242243        try 
     
    248249                if(this->al.GetControlField() > 0) 
    249250                { 
    250                         if (schemaInsideId == -2) 
    251                                 schemaInsideId = this->pInside->SchemaGetInsideId(schemaName); 
    252  
    253251                        pgStrm << "Control Field: " << this->pInside->LinkToField(schemaInsideId, this->al.GetControlField(), rootLevel) << "<br/><br/>" << endl; 
    254252                        CRefItem refItem(this->al, REFM_CONTROLFIELD); 
     
    259257                if(this->al.GetFocusField() > 0) 
    260258                { 
    261                         if (schemaInsideId == -2) 
    262                                 schemaInsideId = this->pInside->SchemaGetInsideId(schemaName); 
    263  
    264259                        pgStrm << "Focus Field: " << this->pInside->LinkToField(schemaInsideId, this->al.GetFocusField(), rootLevel) << "<br/><br/>" << endl; 
    265260                        CRefItem refItem(this->al, REFM_FOCUSFIELD); 
     
    271266                if(this->al.GetRunIf().operation != AR_COND_OP_NONE) 
    272267                {                
    273                         if (schemaInsideId == -2) 
    274                                 schemaInsideId = this->pInside->SchemaGetInsideId(schemaName); 
    275  
    276268                        CRefItem refItem(this->al, REFM_RUNIF); 
    277269 
    278270                        CARQualification arQual(*this->pInside); 
    279                         int pFormId = schemaInsideId; 
    280                         int sFormId = schemaInsideId; 
    281                         arQual.CheckQuery(&this->al.GetRunIf(), refItem, 0, pFormId, sFormId, strmTmp, rootLevel); 
     271                        arQual.CheckQuery(&this->al.GetRunIf(), refItem, 0, schemaInsideId, schemaInsideId, strmTmp, rootLevel); 
    282272                } 
    283273                else 
  • branches/work_304/doc/DocCharMenuDetails.cpp

    r405 r408  
    362362 
    363363                        strm << "Server: " << this->pInside->LinkToServerInfo(menu.server, rootLevel) << "<br/>" << endl; 
    364                         strm << "Schema: " << this->pInside->LinkToSchema(querySchema.GetInsideId(), rootLevel) << "<br/>" << endl;      
     364                        strm << "Schema: " << this->pInside->LinkToSchema(querySchema.GetInsideId(), menu.schema, rootLevel) << "<br/>" << endl;         
    365365 
    366366                        //Label Fields 
Note: See TracChangeset for help on using the changeset viewer.