}
private String makeBasicURL( String context, String page, String parms, boolean absolute )
{
String url;
WikiEngine engine = m_wikiContext.getEngine();
if( context.equals( WikiContext.DIFF ) )
{
int r1 = 0;
int r2 = 0;
if( DiffLinkTag.VER_LATEST.equals(getVersion()) )
{
WikiPage latest = engine.getPage( page, WikiProvider.LATEST_VERSION );
r1 = latest.getVersion();
}
else if( DiffLinkTag.VER_PREVIOUS.equals(getVersion()) )
{
r1 = m_wikiContext.getPage().getVersion() - 1;
r1 = (r1 < 1 ) ? 1 : r1;
}
else if( DiffLinkTag.VER_CURRENT.equals(getVersion()) )
{
r1 = m_wikiContext.getPage().getVersion();
}
else
{
r1 = Integer.parseInt( getVersion() );
}
if( DiffLinkTag.VER_LATEST.equals(m_compareToVersion) )
{
WikiPage latest = engine.getPage( page, WikiProvider.LATEST_VERSION );
r2 = latest.getVersion();
}
else if( DiffLinkTag.VER_PREVIOUS.equals(m_compareToVersion) )
{
r2 = m_wikiContext.getPage().getVersion() - 1;
r2 = (r2 < 1 ) ? 1 : r2;
}
else if( DiffLinkTag.VER_CURRENT.equals(m_compareToVersion) )
{
r2 = m_wikiContext.getPage().getVersion();
}
else
{
r2 = Integer.parseInt( m_compareToVersion );
}
parms = "r1="+r1+"&r2="+r2;
}
//url = m_wikiContext.getURL( m_context, m_pageName, parms );
url = engine.getURL( m_context, m_pageName, parms, m_absolute );
return url;
}