Changeset 4123
- Timestamp:
- 2003-04-11T09:39:17+12:00 (21 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/langaction.cpp
r4116 r4123 24 24 *********************************************************************/ 25 25 26 26 27 #include <ctype.h> 27 28 #include <stdio.h> 28 29 #include <fstream.h> 30 #include <unistd.h> 29 31 #include "langaction.h" 30 32 #include "fileutil.h" 33 #include "gsdltimes.h" 31 34 #include "gsdltools.h" 32 35 #include "gsdlunicode.h" … … 35 38 #include "errno.h" 36 39 #include <sys/utsname.h> 40 37 41 38 42 /*====================* … … 41 45 42 46 // text file reading buffer 43 const int BUFFSIZE = 1024; 44 char temp[BUFFSIZE]; 45 47 const int LINESIZE = 1024; 46 48 47 49 … … 49 51 * LOCAL UTILITY ROUTINES * 50 52 *========================*/ 51 52 // gets the list of packages/files that contain the content of the web-forms53 text_tarray get_pagenos(text_t dir, text_t lang, ostream &logout)54 {55 text_tarray pagenos;56 57 // file 'logfile' contains all the page numbers, one number per line58 // text_t logfile = filename_cat(dir, "package_forms", lang, "pageno.log");59 text_t logfile = filename_cat(dir, "pageno.log");60 61 //open the file as a read only file62 ifstream readfile(logfile.getcstr(), ios::in);63 64 // if file isn't opened, print error and return65 if (!readfile) {66 logout << "File " << logfile << " could not be found.\n";67 return pagenos;68 }69 70 // go through file, pushing each page number on to the end of a text_tarray71 while (readfile.getline(temp, BUFFSIZE-1)) {72 text_t t_temp = temp;73 pagenos.push_back(temp);74 }75 readfile.close();76 77 //returns the array of page numbers78 return pagenos;79 }80 53 81 54 bool text_t_substring (text_t &text, text_t &substr) … … 101 74 102 75 76 /*====================* 77 * CLASS DEFINITIONS * 78 *====================*/ 79 80 langaction::langaction () { 81 82 package = ""; 83 84 cgiarginfo arg_ainfo; 85 86 arg_ainfo.shortname = "l"; 87 arg_ainfo.longname = "interface language"; 88 arg_ainfo.multiplechar = true; 89 arg_ainfo.defaultstatus = cgiarginfo::weak; 90 arg_ainfo.argdefault = "en"; 91 arg_ainfo.savedarginfo = cgiarginfo::must; 92 argsinfo.addarginfo (&cerr, arg_ainfo); 93 94 arg_ainfo.shortname = "bl"; 95 arg_ainfo.longname = "base language"; 96 arg_ainfo.multiplechar = true; 97 arg_ainfo.defaultstatus = cgiarginfo::weak; 98 arg_ainfo.argdefault = "english"; 99 arg_ainfo.savedarginfo = cgiarginfo::must; 100 argsinfo.addarginfo (&cerr, arg_ainfo); 101 102 arg_ainfo.shortname = "tlng"; 103 arg_ainfo.longname = "translation language"; 104 arg_ainfo.multiplechar = true; 105 arg_ainfo.defaultstatus = cgiarginfo::weak; 106 arg_ainfo.argdefault = "french"; 107 arg_ainfo.savedarginfo = cgiarginfo::must; 108 argsinfo.addarginfo (&cerr, arg_ainfo); 109 } 110 111 112 langaction::~langaction () { 113 // Nothing to do in destructor 114 } 115 116 103 117 // set_navbarmacros sets _navigationbar_ and _httpbrowseXXX_ macros 104 118 // reponse contains 1 metadata field (Title) 105 106 bool langaction::init (ostream & /*logout*/) { 107 119 bool langaction::init (ostream & /*logout*/) 120 { 108 121 // set up GSDLOS, GSDLHOME and PATH environment variables 109 122 text_t gsdlos, path; … … 148 161 return true; 149 162 } 150 /*====================* 151 * CLASS DEFINITIONS * 152 *====================*/ 153 154 langaction::langaction () { 155 156 package = ""; 157 158 cgiarginfo arg_ainfo; 159 160 arg_ainfo.shortname = "l"; 161 arg_ainfo.longname = "interface language"; 162 arg_ainfo.multiplechar = true; 163 arg_ainfo.defaultstatus = cgiarginfo::weak; 164 arg_ainfo.argdefault = "en"; 165 arg_ainfo.savedarginfo = cgiarginfo::must; 166 argsinfo.addarginfo (&cerr, arg_ainfo); 167 168 arg_ainfo.shortname = "bl"; 169 arg_ainfo.longname = "base language"; 170 arg_ainfo.multiplechar = true; 171 arg_ainfo.defaultstatus = cgiarginfo::weak; 172 arg_ainfo.argdefault = "english"; 173 arg_ainfo.savedarginfo = cgiarginfo::must; 174 argsinfo.addarginfo (&cerr, arg_ainfo); 175 176 arg_ainfo.shortname = "tlng"; 177 arg_ainfo.longname = "translation language"; 178 arg_ainfo.multiplechar = true; 179 arg_ainfo.defaultstatus = cgiarginfo::weak; 180 arg_ainfo.argdefault = "french"; 181 arg_ainfo.savedarginfo = cgiarginfo::must; 182 argsinfo.addarginfo (&cerr, arg_ainfo); 183 } 184 185 langaction::~langaction () { 186 } 187 188 bool langaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &args, 189 recptprotolistclass *protos, ostream &logout) { 190 // authenticate the user before allowing modifications (if authentication is available) 163 164 165 bool langaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &args, 166 recptprotolistclass* /*protos*/, ostream &logout) 167 { 168 // Authenticate the user before allowing modifications 191 169 args["uan"] = 1; 192 170 args["ug"] = "langadmin"; … … 194 172 } 195 173 196 void langaction::get_cgihead_info (cgiargsclass &/*args*/, recptprotolistclass * /*protos*/, 197 response_t &response,text_t &response_data, 198 ostream & logout) { 174 175 void langaction::get_cgihead_info (cgiargsclass &/*args*/, recptprotolistclass* /*protos*/, 176 response_t &response, text_t &response_data, 177 ostream &logout) 178 { 199 179 response = content; 200 180 response_data = "text/html"; 201 181 } 202 182 183 203 184 void langaction::define_internal_macros (displayclass &disp, cgiargsclass &args, 204 recptprotolistclass *protos, ostream &logout) {205 185 recptprotolistclass *protos, ostream &logout) 186 { 206 187 text_t text = ""; 207 188 text_t cmd = ""; 208 text_t &arg_p = args["p"];209 text_tarray pagenos;210 189 text_t dir = filename_cat(gsdlhome, "tmp", "lang"); 211 text_t pageno =""; 212 text_t lang = ""; 213 text_t baselanguage = ""; 214 215 //sets the current foreign language 190 text_t page = ""; 191 text_t sourcelang = ""; 192 text_t targetlang = ""; 193 194 // Get the source language from the CGI arguments 195 if (args["bl"] != "") { 196 sourcelang = args["bl"]; 197 } 198 199 // Get the target language from the CGI arguments 216 200 if (args["ownchoice"] != "") { 217 lang = args["ownchoice"];201 targetlang = args["ownchoice"]; 218 202 } 219 203 else if (args["language"] != "") { 220 lang = args["language"];204 targetlang = args["language"]; 221 205 } 222 206 else if (args["tlng"] != "") { 223 lang = args["tlng"]; 224 } 225 226 if (args["bl"] != "") { 227 baselanguage = args["bl"]; 228 } 229 230 // Case fold the target language 231 for (int i = 0; i < strlen(lang.getcstr()); i++) { 232 lang[i] = tolower(lang[i]); 207 targetlang = args["tlng"]; 208 } 209 210 // Case fold both languages 211 for (int i = 0; i < strlen(sourcelang.getcstr()); i++) { 212 sourcelang[i] = tolower(sourcelang[i]); 213 } 214 for (int i = 0; i < strlen(targetlang.getcstr()); i++) { 215 targetlang[i] = tolower(targetlang[i]); 233 216 } 234 217 235 218 // Make sure the source and target languages are different! 236 if (s trcmp(baselanguage.getcstr(), lang.getcstr()) == 0) {219 if (sourcelang == targetlang) { 237 220 logout << "Same language!" << endl; 238 221 args["p"] = "translang"; 239 page no= "picklanguage";240 define_webpage(disp, protos, logout, pageno, lang, dir, pagenos, text, baselanguage, true);222 page = "picklanguage"; 223 define_webpage(disp, sourcelang, targetlang, dir, page, -1, true, logout); 241 224 return; 242 225 } 243 226 244 // logout << " Lang: " << lang << " Baselanguage: " << baselanguage<< endl;245 text_t translation = baselanguage + "-" +lang;227 // logout << "Source lang: " << sourcelang << " Target lang: " << targetlang << endl; 228 text_t translation = sourcelang + "-" + targetlang; 246 229 logout << "Translation: " << translation << endl; 247 230 text_t trans_dir = filename_cat(dir, translation); … … 249 232 // argument for page is of the form 'macrofile_pageno' so 250 233 // we need to split the argument to get the proper page content 234 text_t &arg_p = args["p"]; 251 235 text_tarray splitarray; 252 236 splitchar(arg_p.begin(), arg_p.end(), '_', splitarray); 253 237 254 238 arg_p = splitarray[0]; 255 239 if (splitarray.size() > 1) 256 page no= splitarray[splitarray.size()-1];240 page = splitarray[splitarray.size()-1]; 257 241 258 242 //if are entering page from macro search 259 243 if (args["macroname"] != "") { 260 244 text_t macroname = args["macroname"]; 261 262 // calls the translator file to create HTML files263 cmd = "perl " + filename_cat(gsdlhome, "bin", "script", "fromsearch.pl") + " " + macroname + " " + lang + " " + baselanguage;245 246 // !! TO DO !! 247 cmd = "perl " + filename_cat(gsdlhome, "bin", "script", "fromsearch.pl") + " " + sourcelang + " " + targetlang + " " + macroname; 264 248 logout << "COMMAND: " << cmd <<endl; 265 249 266 250 if ((gsdl_system(cmd, true, logout)) != 0) { 267 251 logout << "Process " << cmd << " did not execute.../;-D\n"; 268 252 return; 269 253 } 270 271 define_webpage(disp, protos, logout, pageno, lang, trans_dir, pagenos, text, baselanguage, false);254 255 define_webpage(disp, sourcelang, targetlang, trans_dir, page, -1, false, logout); 272 256 return; 273 257 } 274 258 275 if (page no== "fromsearch")276 page no= "thankyou";277 278 if (page no== "picklanguage") {279 page no= "1";280 259 if (page == "fromsearch") 260 page = "thankyou"; 261 262 if (page == "picklanguage") { 263 page = "1"; 264 281 265 //calls the translator file to create HTML files 282 cmd = "perl " + filename_cat(gsdlhome, "bin", "script", "translator.pl") + " " + baselanguage + " " +lang;266 cmd = "perl " + filename_cat(gsdlhome, "bin", "script", "translator.pl") + " " + sourcelang + " " + targetlang; 283 267 if ((gsdl_system(cmd, true, logout)) != 0) { 284 268 logout << "Process " << cmd << " did not execute.../;-D\n"; 285 269 return; 286 270 } 271 272 const recptconf &rcinfo = recpt->get_configinfo(); 273 274 // Use sendmail.pl perl script to send email events 275 text_t tmpmailfile = filename_cat (gsdlhome, "tmp", "lang", "email.txt"); 276 char *tmpmailfilec = tmpmailfile.getcstr(); 277 ofstream tmpfile (tmpmailfilec); 278 if (tmpfile) { 279 tmpfile << "[Translator Event]\n" 280 << "Date: " << get_date (true) << "\n" 281 << "Greenstone Username: " << args["un"] << "\n"; 282 tmpfile << "The " << targetlang << " language translation was entered.\n"; 283 tmpfile.close(); 284 285 text_t sendmail_cmd = "perl -S sendmail.pl"; 286 sendmail_cmd += " -to \"" + rcinfo.maintainer + "\""; 287 sendmail_cmd += " -from \"[email protected]\""; 288 sendmail_cmd += " -smtp \"" + rcinfo.MailServer + "\""; 289 sendmail_cmd += " -subject \"Greenstone Translator Event\""; 290 sendmail_cmd += " -msgfile \"" + tmpmailfile + "\""; 291 // logout << "Sendmail command: " << sendmail_cmd << endl; 292 gsdl_system (sendmail_cmd, true, logout); 293 unlink(tmpmailfilec); 294 } 295 else { 296 logout << "translatoraction:: ERROR: Couldn't open " 297 << "temporary event log file " << tmpmailfile << " for email event.\n"; 298 } 299 delete tmpmailfilec; 287 300 } 288 301 289 302 //generates the picklanguage page 290 if (pageno.empty()) { 291 pageno = "picklanguage"; 292 logout << "@ the 1st pg\n"; 303 if (page.empty()) { 304 page = "picklanguage"; 293 305 cmd = "perl " + filename_cat(gsdlhome, "bin", "script", "picklanguage.pl"); 294 306 logout << cmd << endl; 295 307 if(gsdl_system(cmd,true,logout) != 0) 296 308 return; 297 define_webpage(disp, protos, logout, pageno, lang, dir, pagenos, text, baselanguage, false); 298 309 define_webpage(disp, sourcelang, targetlang, dir, page, -1, false, logout); 299 310 return; 300 311 } 301 312 302 //if no more pages will set pageno to thankyou script 303 pagenos = get_pagenos(trans_dir, lang, logout); 304 305 if (pagenos.empty() && pageno == "") 306 pageno = "thankyou"; 307 308 text_t &submitargs = args[pageno]; 313 // Read the number of translation pages from numpages.log 314 text_t numpagesfilepath = filename_cat(trans_dir, "numpages.log"); 315 ifstream numpagesfile(numpagesfilepath.getcstr(), ios::in); 316 317 // Check file opened OK 318 if (!numpagesfile) { 319 logout << "Error: File " << numpagesfilepath << " could not be opened." << endl; 320 return; 321 } 322 323 // Read the number of pages from the file 324 int numpages; 325 char line[LINESIZE]; 326 if (numpagesfile.getline(line, LINESIZE-1)) { 327 numpages = atoi(line); 328 } 329 numpagesfile.close(); 330 331 // if (pagenos.empty() && pageno == "") 332 if (numpages == 0) 333 page = "thankyou"; 334 335 text_t &submitargs = args[page]; 309 336 text_t submit = "SUBMIT TRANSLATION"; 310 337 311 338 //if the SUBMIT TRANSLATION >> button has been pushed 312 339 if (text_t_substring(submitargs,submit)) { … … 318 345 //create the command line for submitting the translation 319 346 cmd = "perl " + filename_cat(gsdlhome, "bin", "script", "submit_translation.pl") + " "; 320 cmd += ( baselanguage + " " +lang + " " + "arguments.arg");347 cmd += (sourcelang + " " + targetlang + " " + "arguments.arg"); 321 348 322 349 //give command to system to execute submission of translation … … 325 352 326 353 //increments which page is displayed when translation is submitted 327 for (text_tarray::iterator page_itr = pagenos.begin(); 328 page_itr != pagenos.end(); 329 page_itr++) { 330 if (*page_itr == pageno) { 331 page_itr++; 332 if (page_itr != pagenos.end()) 333 pageno = *page_itr; 334 else 335 pageno = "thankyou"; 336 337 break; 338 } 339 } 340 } 341 342 pagenos = get_pagenos(trans_dir, lang, logout); 343 define_webpage(disp, protos, logout, pageno, lang, trans_dir, pagenos, text, baselanguage, false); 354 int pageno = atoi(page.getcstr()); 355 if (pageno >= numpages) 356 page = "thankyou"; 357 else 358 page = (pageno + 1); 359 } 360 361 define_webpage(disp, sourcelang, targetlang, trans_dir, page, numpages, false, logout); 344 362 } 345 363 … … 349 367 ofstream argsout(argsfile.getcstr(), ios::out); 350 368 351 // informs user and returns if output stream not opened352 if (!argsout) {353 logout << " File " << argsfile << " could not be opened\n";369 // Informs user and returns if output stream not opened 370 if (!argsout) { 371 logout << "Error: File " << argsfile << " could not be opened." << endl; 354 372 return; 355 373 } 356 374 357 //ensures access permissions make the file world writable 358 text_t changemode = "chmod a+w "; 359 changemode += argsfile; 375 // Make the file world writable 376 text_t changemode = "chmod a+w " + argsfile; 360 377 gsdl_system(changemode, false, logout); 361 378 362 // write out the cgiargsclass passes as a parameter to the subroutine to the argsout file379 // Write out the cgiargsclass variable to the argsout file 363 380 argsout << args; 364 //close the argsout output stream365 381 argsout.close(); 366 382 } 367 383 368 384 369 void langaction::define_webpage (displayclass &disp, 370 recptprotolistclass *protos, ostream &logout, 371 text_t pageno, text_t &lang, text_t dir, 372 text_tarray &pagenos, text_t &text, text_t &baselanguage, 373 bool error) { 374 385 void langaction::define_webpage (displayclass &disp, text_t sourcelang, text_t targetlang, 386 text_t dir, text_t page, int numpages, bool error, 387 ostream &logout) 388 { 375 389 // produces HTML page with the current pages contents 376 390 // formfile is the file that contains web-form for the 377 391 // current package whose name is stored in 'package' 378 392 379 text_t formfile = filename_cat(dir, page no+ ".lang");393 text_t formfile = filename_cat(dir, page + ".lang"); 380 394 ifstream readfile(formfile.getcstr(), ios::in); 381 395 if (!readfile) { … … 386 400 387 401 /* ============================ START WEB-FORM HTML CODE ============================ */ 388 text += "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body>"; 389 390 text += "\n<input type=hidden name=\"a\" value=\"lang\">"; 391 text += "\n<input type=hidden name=\"p\" value=\"translang_"; 392 text += pageno; 393 text += "\">"; 394 text += "\n<input type=hidden name=\"e\" value=\"_decodedcompressedoptions_\">"; 395 396 text += "_texttranshead_"; 397 398 //if not a special case page display translation info 399 if ((pageno != "thankyou") && (pageno !="picklanguage") && (pageno != "fromsearch")) { 400 401 text += "<center><strong> _textcurrpage_ "; 402 text += pageno; 403 text += " _textof_ "; 404 text += pagenos.size(); 405 text += "</strong></center>\n"; 406 407 for (text_tarray::iterator page_itr = pagenos.begin(); 408 page_itr != pagenos.end(); 409 page_itr++) { 410 411 if (*page_itr == pageno) { 412 page_itr++; 413 text_t temp2; 414 if (page_itr != pagenos.end()) 415 temp2 = *page_itr; 416 else 417 temp2 = "thankyou"; 418 419 text += "<a href=\"_gwcgi_?e=_compressedoptions_&a=lang&p=translang_"; 420 text += temp2; 421 text += "&baselanguage="; 422 text += baselanguage; 423 text += "&language="; 424 text += lang; 425 text += "\"><strong>"; 426 text += "NEXT>>"; 427 text += "</strong></a>\n"; 428 429 break; 430 } 431 else { 432 text += "<a href=\"_gwcgi_?e=_compressedoptions_&a=lang&p=translang_"; 433 text += *page_itr; 434 text += "&baselanguage="; 435 text += baselanguage; 436 text += "&language="; 437 text += lang; 438 text += "\"><strong>"; 439 text += *page_itr; 440 text += "</strong></a>\n"; 441 } 442 } 443 } 444 445 //read in HTML from file 446 while(readfile.getline(temp, BUFFSIZE-1)) { 447 text_t t_temp = temp; 448 text += t_temp; 449 text += "\n"; 402 text_t text = ""; 403 text += "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body>\n"; 404 405 text += "<input type=hidden name=\"a\" value=\"lang\">\n"; 406 text += "<input type=hidden name=\"p\" value=\"translang_" + page + "\">\n"; 407 text += "<input type=hidden name=\"e\" value=\"_decodedcompressedoptions_\">\n"; 408 409 text += "_texttranshead_"; 410 411 // If not a special case page display "Page x of y" and Next button 412 if ((page != "thankyou") && (page != "picklanguage") && (page != "fromsearch")) { 413 text += "<center><strong>"; 414 text += " _textcurrpage_ " + page + " _textof_ " + numpages; 415 text += "</strong>"; 416 417 int pageno = atoi(page.getcstr()); 418 text += " <a href=\"_gwcgi_?e=_compressedoptions_&a=lang&p=translang_"; 419 if (pageno >= numpages) 420 text += "thankyou"; 421 else 422 text += (pageno + 1); 423 text += "&baselanguage=" + sourcelang; 424 text += "&language=" + targetlang; 425 text += "\">"; 426 text += "<strong>NEXT>></strong></a></center>\n"; 427 } 428 429 // Read in HTML from file 430 char line[LINESIZE]; 431 while (readfile.getline(line, LINESIZE-1)) { 432 text_t temp = line; 433 text += temp + "\n"; 450 434 } 451 435 readfile.close(); 452 if (pageno == "picklanguage" && error) { 453 text += "<center><strong>Please choose different source and target languages!</strong></center>"; 454 } 455 456 //if not a special case page display translation info 457 if ((pageno != "thankyou") && (pageno != "picklanguage") && (pageno != "fromsearch")) { 458 text += "<center><strong> _textcurrpage_ "; 459 text += pageno; 460 text += " _textof_ "; 461 text += pagenos.size(); 462 text += "</strong><br>\n"; 463 464 for (text_tarray::iterator page_itr = pagenos.begin(); 465 page_itr != pagenos.end(); 466 page_itr++) { 467 468 if (*page_itr == pageno) { 469 page_itr++; 470 text_t temp2; 471 if (page_itr != pagenos.end()) 472 temp2 = *page_itr; 473 else 474 temp2 = "thankyou"; 475 476 text += "<a href=\"_gwcgi_?e=_compressedoptions_&a=lang&p=translang_"; 477 text += temp2; 478 text += "&baselanguage="; 479 text += baselanguage; 480 text += "&language="; 481 text += lang; 482 text += "\"><strong>"; 483 text += "NEXT>>"; 484 text += "</strong></a>\n"; 485 486 break; 487 } 488 else { 489 text += "<a href=\"_gwcgi_?e=_compressedoptions_&a=lang&p=translang_"; 490 text += *page_itr; 491 text += "&baselanguage="; 492 text += baselanguage; 493 text += "&language="; 494 text += lang; 495 text += "\"><strong>"; 496 text += *page_itr; 497 text += "</strong></a>\n"; 498 } 499 } 500 } 501 502 if (pageno == "fromsearch") 436 437 if (page == "picklanguage" && error) { 438 text += "<center><strong>_textchoosedifferent_</strong></center>"; 439 } 440 441 // If not a special case page display "Page x of y" and Next button 442 if ((page != "thankyou") && (page != "picklanguage") && (page != "fromsearch")) { 443 text += "<center><strong>"; 444 text += " _textcurrpage_ " + page + " _textof_ " + numpages; 445 text += "</strong>"; 446 447 int pageno = atoi(page.getcstr()); 448 text += " <a href=\"_gwcgi_?e=_compressedoptions_&a=lang&p=translang_"; 449 if (pageno >= numpages) 450 text += "thankyou"; 451 else 452 text += (pageno + 1); 453 text += "&baselanguage=" + sourcelang; 454 text += "&language=" + targetlang; 455 text += "\">"; 456 text += "<strong>NEXT>></strong></a></center>\n"; 457 } 458 459 if (page == "fromsearch") 503 460 text += "<center><strong> _textcurrpage_ 1 _textof_ 1</strong><br>\n"; 504 461 … … 511 468 // THE FOLLOWING MACROS ARE DEFINED IN translang.dm MACRO FILE 512 469 // set the formcontent as the content of the form-page 513 514 // logout << "Text: " << text;515 470 516 471 disp.setmacro("formcontent", "translang", text); … … 524 479 navigationbar += "<td align=right>_javalinks_</td><td>"; 525 480 526 if (page no!= "picklanguage") {481 if (page != "picklanguage") { 527 482 navigationbar += "_imageserch_"; 528 483 } … … 530 485 navigationbar += "<!-- End of Navigation Bar -->\n"; 531 486 disp.setmacro ("navigationbar", "translang", navigationbar); 532 533 } 487 } 488 534 489 535 490 bool langaction::do_action (cgiargsclass &args, recptprotolistclass * /*protos*/, … … 548 503 return true; 549 504 } 550 551 -
trunk/gsdl/src/recpt/langaction.h
r4115 r4123 30 30 31 31 #include "action.h" 32 #include "receptionist.h" 33 32 34 33 35 class langaction : public action { 34 36 35 37 protected: 38 receptionist *recpt; 39 36 40 // package whose contents will be displayed in the form space 37 41 text_t package; … … 43 47 langaction (); 44 48 virtual ~langaction (); 49 50 void set_receptionist (receptionist *therecpt) {recpt=therecpt;} 45 51 46 52 text_t get_action_name () {return "lang";} … … 65 71 bool init (ostream & /*logout*/); 66 72 67 void define_webpage (displayclass &disp, 68 recptprotolistclass *protos, ostream &logout, 69 text_t pageno, text_t &lang, text_t dir, 70 text_tarray &pagenos, text_t &text, text_t &baselanguage, bool error); 73 void define_webpage (displayclass &disp, text_t sourcelang, text_t targetlang, 74 text_t dir, text_t pageno, int numpages, bool error, 75 ostream &logout); 71 76 }; 72 77
Note:
See TracChangeset
for help on using the changeset viewer.