Ticket #310: template_name_in_omega_config.diff

File template_name_in_omega_config.diff, 1.5 KB (added by marco, 16 years ago)

Patch for setting template name in omega.config

  • omega.conf

     
    99
    1010# Directory containing any cdb files for the $lookup OmegaScript command:
    1111cdb_dir /var/lib/omega/cdb
     12
     13#Template which is used:
     14fmt_name query
  • omega.h

     
    4343extern string query_string;
    4444
    4545extern string dbname;
    46 extern string fmtname;
    4746extern string filters;
    4847
    4948extern Xapian::Database db;
  • configfile.h

     
    3030extern string template_dir;
    3131extern string log_dir;
    3232extern string cdb_dir;
     33extern string fmtname;
    3334
    3435void read_config_file();
    3536
  • omega.cc

     
    5555const string default_dbname = "default";
    5656
    5757string dbname;
    58 string fmtname = "query";
     58string fmtname;
    5959string filters;
    6060
    6161Xapian::docid topdoc = 0;
  • configfile.cc

     
    9494            log_dir = value + "/";
    9595        } else if (name == "cdb_dir") {
    9696            cdb_dir = value + "/";
     97        } else if (name == "fmt_name"){
     98            fmtname = value;
    9799        }
    98100    }
    99101