Changeset 25304
- Timestamp:
- 2012-03-27T15:17:42+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java
r25257 r25304 362 362 String href = null; 363 363 String rl = null; 364 364 String el = null; 365 365 while (queryIter.hasNext()) 366 366 { 367 367 String q = queryIter.next(); 368 if (q.equals("el")) 369 { 370 if ((queryMap.get(q)[0]).equals("direct")) 371 { 372 redirect = true; 373 } 374 } 375 else if (q.equals("href")) 368 if (q.equals(GSParams.EXTERNAL_LINK_TYPE)) 369 { 370 el = queryMap.get(q)[0]; 371 } 372 else if (q.equals(GSParams.HREF)) 376 373 { 377 374 href = queryMap.get(q)[0]; … … 381 378 href = StringUtils.replace(href, "%3A", "\\:"); 382 379 } 383 else if (q.equals( "rl"))380 else if (q.equals(GSParams.RELATIVE_LINK)) 384 381 { 385 382 rl = queryMap.get(q)[0]; … … 387 384 } 388 385 389 //if query_string contains "el= ",the web page will be redirected to the external URl, otherwise a greenstone page with an external URL will be displayed386 //if query_string contains "el=direct", an href is specified, and its not a relative link, then the web page will be redirected to the external URl, otherwise a greenstone page with an external URL will be displayed 390 387 //"rl=0" this is an external link 391 388 //"rl=1" this is an internal link 392 if ((redirect) && (href != null) && (rl.equals("0"))) 393 {// This is an external link, the web page is re-directed to the external URL (&el=&rl=0&href="http://...") 389 if ((href != null) && (rl.equals("0"))) 390 {// This is an external link, 391 392 if (el.equals("framed")) { 393 //TODO **** how best to change to a=p&sa=html&c=collection&url=href 394 // response.setContentType("text/xml"); 395 //response.sendRedirect("http://localhost:8383/greenstone3/gs3library?a=p&sa=html&c=external&url="+href); 396 } else { 397 // el = '' or direct 398 //the web page is re-directed to the external URL (&el=&rl=0&href="http://...") 394 399 response.setContentType("text/xml"); 395 400 response.sendRedirect(href); 401 } 396 402 } 397 403 } … … 477 483 // commands are issued (and also don't need to do caching for this request) 478 484 boolean should_cache = true; 479 if (action != null && action.equals(GSParams.SYSTEM ))485 if (action != null && action.equals(GSParams.SYSTEM_ACTION)) 480 486 { 481 487 should_cache = false;
Note:
See TracChangeset
for help on using the changeset viewer.