From: <bra...@us...> - 2008-01-31 01:07:56
|
Revision: 2161 http://archive-access.svn.sourceforge.net/archive-access/?rev=2161&view=rev Author: bradtofel Date: 2008-01-30 17:07:58 -0800 (Wed, 30 Jan 2008) Log Message: ----------- BUGFIX: check that urls have not already been rewritten(on the server, for example) before rewriting. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/client-rewrite.js Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/client-rewrite.js =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/client-rewrite.js 2008-01-31 00:30:37 UTC (rev 2160) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/client-rewrite.js 2008-01-31 01:07:58 UTC (rev 2161) @@ -17,10 +17,12 @@ var wmSpecial = aCollection[i].getAttribute("wmSpecial"); if(wmSpecial && wmSpecial.length > 0) { } else { - if(aCollection[i][sProp].indexOf("http") == 0) { - aCollection[i][sProp] = sWayBackCGI + aCollection[i][sProp]; - } else { - aCollection[i][sProp] = sWayBackCGI + xResolveUrl(aCollection[i][sProp]); + if(aCollection[i][sProp].indexOf(sWayBackCGI) == -1) { + if(aCollection[i][sProp].indexOf("http") == 0) { + aCollection[i][sProp] = sWayBackCGI + aCollection[i][sProp]; + } else { + aCollection[i][sProp] = sWayBackCGI + xResolveUrl(aCollection[i][sProp]); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |