55
55
static function GetXSLTFile($xslt) {
56
57
$root = self::GetRootDir();
57
58
$setup = self::GetSetupDir();
59
60
if (file_exists("$setup/xslt/$xslt.xsl")) return "$setup/xslt/$xslt.xsl";
60
61
else if (file_exists("$root/xslt/$xslt.xsl")) return "$root/xslt/$xslt.xsl";
62
else if (preg_match("/^(.*\\/)?([^\\/]+)_([\d\w]+)$/", $xslt, $m)) { // load options.xsl instead of correlation_options.xsl (defaults)
63
64
if (file_exists("$setup/xslt/$xslt.xsl")) return "$setup/xslt/$xslt.xsl";
64
65
else if (file_exists("$root/xslt/$xslt.xsl")) return "$root/xslt/$xslt.xsl";
65
66
else throw new ADEIException(translate("Neither (%s.xsl) nor (%s.xsl) is found", $m[0], $xslt));
67
} else if ((preg_match("/^(.*)\\/([\d\w]+)$/", $xslt, $m))&&($ADEI_DEFAULT_XSLT[$m[1]])) { // load image.xsl instead of correlation.xsl (defaults)
67
73
else throw new ADEIException(translate("XSL template (%s.xsl) is not found", $xslt));