Changeset 7421
- Timestamp:
- 2004-05-25T12:16:24+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/receptionist.cpp
r7420 r7421 113 113 ainfo.multiplechar = true; 114 114 ainfo.defaultstatus = cgiarginfo::good; 115 ainfo.argdefault = "";115 ainfo.argdefault = g_EmptyText; 116 116 ainfo.savedarginfo = cgiarginfo::mustnot; 117 117 argsinfo.addarginfo (NULL, ainfo); … … 121 121 ainfo.multiplechar = true; 122 122 ainfo.defaultstatus = cgiarginfo::none; 123 ainfo.argdefault = "";123 ainfo.argdefault = g_EmptyText; 124 124 ainfo.savedarginfo = cgiarginfo::must; 125 125 argsinfo.addarginfo (NULL, ainfo); … … 130 130 ainfo.multiplechar = true; 131 131 ainfo.defaultstatus = cgiarginfo::none; 132 ainfo.argdefault = "";132 ainfo.argdefault = g_EmptyText; 133 133 ainfo.savedarginfo = cgiarginfo::must; 134 134 argsinfo.addarginfo (NULL, ainfo); … … 138 138 ainfo.multiplechar = true; 139 139 ainfo.defaultstatus = cgiarginfo::none; 140 ainfo.argdefault = "";140 ainfo.argdefault = g_EmptyText; 141 141 ainfo.savedarginfo = cgiarginfo::mustnot; 142 142 argsinfo.addarginfo (NULL, ainfo); … … 146 146 ainfo.multiplechar = true; 147 147 ainfo.defaultstatus = cgiarginfo::none; 148 ainfo.argdefault = "";148 ainfo.argdefault = g_EmptyText; 149 149 ainfo.savedarginfo = cgiarginfo::must; 150 150 argsinfo.addarginfo (NULL, ainfo); … … 173 173 ainfo.multiplechar = true; 174 174 ainfo.defaultstatus = cgiarginfo::none; 175 ainfo.argdefault = "";175 ainfo.argdefault = g_EmptyText; 176 176 ainfo.savedarginfo = cgiarginfo::mustnot; 177 177 argsinfo.addarginfo (NULL, ainfo); … … 380 380 (*actionhere).second.a->configure(key, cfgline); 381 381 382 actionhere++;382 ++actionhere; 383 383 } 384 384 … … 496 496 if (((*actionhere).second.a == NULL) || 497 497 !(*actionhere).second.a->init(logout)) return false; 498 actionhere++;498 ++actionhere; 499 499 } 500 500 … … 611 611 return false; 612 612 } 613 actionhere++;613 ++actionhere; 614 614 } 615 615 … … 723 723 if (fd == -1) { 724 724 logout << "Error: Couldn't open file " << lfile << "\n"; 725 delete lfile;725 delete []lfile; 726 726 return false; 727 727 } … … 740 740 write(fd, buffer, num_chars); 741 741 GSDL_UNLOCK_FILE (fd); 742 delete buffer;742 delete []buffer; 743 743 } else { 744 744 logout << "Error: Couldn't lock file " << lfile << "\n"; 745 745 close(fd); 746 delete lfile;746 delete []lfile; 747 747 return false; 748 748 } … … 750 750 close(fd); 751 751 752 delete lfile;752 delete []lfile; 753 753 return true; 754 754 } … … 761 761 action *a = actions.getaction (args["a"]); 762 762 prepare_page (a, args, text_t2ascii, logout); 763 disp.expandstring ( "Global", astring, outstring);763 disp.expandstring (displayclass::defaultpackage, astring, outstring); 764 764 return outstring; 765 765 } … … 832 832 if (latest<file_info.st_mtime) latest=file_info.st_mtime; 833 833 } 834 delete buildcfg_ptr;835 delete collectcfg_ptr;834 delete []buildcfg_ptr; 835 delete []collectcfg_ptr; 836 836 837 837 if (latest>0) { … … 1051 1051 return compressed_args; 1052 1052 1053 return "";1053 return g_EmptyText; 1054 1054 } 1055 1055 … … 1084 1084 maindirs.insert (gsdlmacrodir); 1085 1085 } 1086 colhere ++;1086 ++colhere; 1087 1087 } 1088 1088 … … 1116 1116 foundfile = true; 1117 1117 } 1118 dirhere ++;1118 ++dirhere; 1119 1119 } 1120 1120 } … … 1140 1140 return false; 1141 1141 } 1142 arrhere++;1142 ++arrhere; 1143 1143 } 1144 1144 … … 1182 1182 } 1183 1183 1184 arrhere++;1184 ++arrhere; 1185 1185 } 1186 1186 } … … 1249 1249 first = false; 1250 1250 } 1251 col_here ++;1251 ++col_here; 1252 1252 } 1253 1253 } … … 1334 1334 } 1335 1335 1336 params_here++;1336 ++params_here; 1337 1337 } 1338 1338 … … 1350 1350 (*actionhere).second.a->define_external_macros (disp, args, &protocols, logout); 1351 1351 } 1352 actionhere++;1352 ++actionhere; 1353 1353 } 1354 1354 … … 1371 1371 text_t &collection = args["c"]; 1372 1372 1373 disp.setmacro ("gsdlhome", "Global", dm_safe(configinfo.gsdlhome));1374 disp.setmacro ("gwcgi", "Global", configinfo.gwcgi);1375 disp.setmacro ("httpimg", "Global", configinfo.httpimg);1376 disp.setmacro ("httpprefix", "Global", configinfo.httpprefix);1373 disp.setmacro ("gsdlhome", displayclass::defaultpackage, dm_safe(configinfo.gsdlhome)); 1374 disp.setmacro ("gwcgi", displayclass::defaultpackage, configinfo.gwcgi); 1375 disp.setmacro ("httpimg", displayclass::defaultpackage, configinfo.httpimg); 1376 disp.setmacro ("httpprefix", displayclass::defaultpackage, configinfo.httpprefix); 1377 1377 1378 1378 if (!collection.empty()) { … … 1385 1385 if (!cinfo.httpdomain.empty()) httpcollection = "http://"; 1386 1386 httpcollection += cinfo.httpdomain + cinfo.httpprefix + "/collect/" + collection; 1387 disp.setmacro ("httpcollection", "Global", httpcollection);1387 disp.setmacro ("httpcollection", displayclass::defaultpackage, httpcollection); 1388 1388 } 1389 1389 } 1390 1390 1391 1391 text_t compressedoptions = get_compressed_arg(args, logout); 1392 disp.setmacro ("compressedoptions", "Global", dm_safe(compressedoptions));1392 disp.setmacro ("compressedoptions", displayclass::defaultpackage, dm_safe(compressedoptions)); 1393 1393 // need a decoded version of compressedoptions for use within forms 1394 1394 // as browsers encode values from forms before sending to server 1395 1395 // (e.g. %25 becomes %2525) 1396 1396 decode_cgi_arg (compressedoptions); 1397 disp.setmacro ("decodedcompressedoptions", "Global", dm_safe(compressedoptions));1397 disp.setmacro ("decodedcompressedoptions", displayclass::defaultpackage, dm_safe(compressedoptions)); 1398 1398 1399 1399 #if defined (__WIN32__) 1400 disp.setmacro ("win32", "Global", "1");1400 disp.setmacro ("win32", displayclass::defaultpackage, "1"); 1401 1401 #endif 1402 1402 … … 1415 1415 // need to escape special characters from query string 1416 1416 disp.setmacro ("cgiarg" + (*argshere).first, 1417 "Global", html_safe((*argshere).second.value));1417 displayclass::defaultpackage, html_safe((*argshere).second.value)); 1418 1418 else if ((*argshere).first == "hp") { 1419 disp.setmacro ("cgiarg" + (*argshere).first, "Global", (*argshere).second.value);1419 disp.setmacro ("cgiarg" + (*argshere).first, displayclass::defaultpackage, (*argshere).second.value); 1420 1420 } else { 1421 disp.setmacro ("cgiarg" + (*argshere).first, "Global", dm_safe((*argshere).second.value));1422 } 1423 argshere ++;1421 disp.setmacro ("cgiarg" + (*argshere).first, displayclass::defaultpackage, dm_safe((*argshere).second.value)); 1422 } 1423 ++argshere; 1424 1424 } 1425 1425 1426 1426 // display text right to left if language is arabic/farsi (and if browser can support it) 1427 1427 if (args["l"] == "ar" || args["l"] == "fa") 1428 disp.setmacro ("htmlextra", "Global", " dir=rtl");1428 disp.setmacro ("htmlextra", displayclass::defaultpackage, " dir=rtl"); 1429 1429 1430 1430 // set collection specific macros … … 1444 1444 ((*here).first != "hasprevious")) { 1445 1445 // check for args in form name:lang 1446 text_t name = "";1447 text_t lang = "";1446 text_t name = g_EmptyText; 1447 text_t lang = g_EmptyText; 1448 1448 bool colonfound=false; 1449 1449 text_t::const_iterator a = (*here).first.begin(); … … 1458 1458 else name.push_back(*a); 1459 1459 } 1460 a++;1460 ++a; 1461 1461 } 1462 1462 if (!lang.empty()) { 1463 1463 if (args["l"]==lang) { 1464 disp.setmacro (name, "Global", (*here).second.values[0]);1464 disp.setmacro (name, displayclass::defaultpackage, (*here).second.values[0]); 1465 1465 } 1466 1466 } 1467 1467 else { // the default one 1468 disp.setmacro ((*here).first, "Global", (*here).second.values[0]);1468 disp.setmacro ((*here).first, displayclass::defaultpackage, (*here).second.values[0]); 1469 1469 } 1470 1470 } 1471 here ++;1471 ++here; 1472 1472 } 1473 1473 } 1474 1474 1475 1475 text_t iconcollection; 1476 disp.expandstring ( "Global", "_iconcollection_", iconcollection);1476 disp.expandstring (displayclass::defaultpackage, "_iconcollection_", iconcollection); 1477 1477 if (!iconcollection.empty()) 1478 1478 { … … 1484 1484 // local but with full path 1485 1485 iconcollection = "http://" + cinfo.httpdomain + iconcollection; 1486 disp.setmacro("iconcollection", "Global", iconcollection);1486 disp.setmacro("iconcollection", displayclass::defaultpackage, iconcollection); 1487 1487 } 1488 1488 }
Note:
See TracChangeset
for help on using the changeset viewer.