if ((analysis == null) || (analysis.getInternalLinks() == null)) {
return false;
}
// Retrieve configuration
EnumWikipedia wiki = analysis.getWikipedia();
CWConfigurationError error68 = wiki.getCWConfiguration().getErrorConfiguration(68);
List<String> templatesList = null;
if (error68 != null) {
String templatesParam = error68.getSpecificProperty("template", true, false, false, false);
if (templatesParam != null) {
templatesList = WPCConfiguration.convertPropertyToStringList(templatesParam);
}
}
String strOnlyLanguage = getSpecificProperty("only_language", true, false, false);
boolean onlyLanguage = (strOnlyLanguage != null) ? Boolean.valueOf(strOnlyLanguage) : true;
String strOnlyLocal = getSpecificProperty("only_local", true, false, false);
boolean onlyLocal = (strOnlyLocal != null) ? Boolean.valueOf(strOnlyLocal) : true;
// Analyze each external link
boolean result = false;
List<PageElementExternalLink> links = analysis.getExternalLinks();
if (links == null) {
return result;
}
List<Interwiki> interwikis = wiki.getWikiConfiguration().getInterwikis();
String contents = analysis.getContents();
for (PageElementExternalLink link : links) {
if (link.hasSquare()) {
// Check if this is a external link to an other wiki
String article = null;
String prefix = null;
String language = null;
boolean local = false;
for (Interwiki interwiki : interwikis) {
String tmp = interwiki.isArticleUrl(link.getLink());
if (tmp != null) {
if ((article == null) || (interwiki.getLanguage() != null)) {
article = tmp;
prefix = interwiki.getPrefix();
language = interwiki.getLanguage();
local = interwiki.getLocal();
}
}
}
EnumWikipedia fromWiki = null;
if (prefix != null) {
fromWiki = EnumWikipedia.getWikipedia(prefix);
if (!prefix.equals(fromWiki.getSettings().getCode())) {
fromWiki = null;
}
}
// Mark error