Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 606 → Rev 608

/impl/conf/app.properties
397,8 → 397,8
 
 
 
top.image.start.with.1=/
top.image.url.1=/proxy/contactosAlunosPortalMenu/estgp/public/portal/imagens/top.jpg
#top.image.start.with.1=/
#top.image.url.1=/proxy/contactosAlunosPortalMenu/estgp/public/portal/imagens/top.jpg
 
top.image.start.with.2=/student.do?role=student&menu=menu.alunos
top.image.url.2=/proxy/contactosAlunosPortalMenu/estgp/public/portal/imagens/topStudent.jpg
/impl/src/java/pt/estgp/estgweb/web/utils/ProxyUtils.java
95,18 → 95,23
link+= "?" + queryString;
 
 
int matchSize = 0;
String finalUrlAux = "";
for(int i = 0; i < Globals.TOP_IMAGE_FILTER_LINKS.size();i++)
{
String url = Globals.TOP_IMAGE_FILTER_LINKS.get(i);
if(link.startsWith(url))
int nowMatchSize = url.length();
if(link.startsWith(url) && nowMatchSize > matchSize)
{
String finalUrl = Globals.TOP_IMAGE_FILTER_IMAGES_URL.get(i);
if(finalUrl.startsWith("/"))
return request.getContextPath() + finalUrl;
finalUrlAux = request.getContextPath() + finalUrl;
else
return finalUrl;
finalUrlAux = finalUrl;
}
matchSize = nowMatchSize;
}
return finalUrlAux;
}
return null;
}