|
@@ -27,6 +27,7 @@ class Route_UrlAction_BiAuditGenerate extends RouteBase {
|
|
|
private $SOURCE = null;
|
|
private $SOURCE = null;
|
|
|
private $REFERER;
|
|
private $REFERER;
|
|
|
private $POWIAZANIA_ID = null;
|
|
private $POWIAZANIA_ID = null;
|
|
|
|
|
+ private $DITA = "/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-3.3.3/bin/dita";
|
|
|
|
|
|
|
|
public function handleAuth() {
|
|
public function handleAuth() {
|
|
|
if (!User::logged()) {
|
|
if (!User::logged()) {
|
|
@@ -1982,7 +1983,7 @@ Wygenerowany raport Benford'a nr <?=$this->SOURCE['ID']?>
|
|
|
copy($xmlFile, $antXmlFile);
|
|
copy($xmlFile, $antXmlFile);
|
|
|
shell_exec("cd /Library/Server/Web/Data/Sites/Default/SE/schema/WPS_Functions/default_db/CRM_PROCES_tree && sudo /opt/local/bin/ant -f build_CRM_PROCES_tree.xml default_db:PROCES_INIT:tree:dita -Duuid={$basename}");
|
|
shell_exec("cd /Library/Server/Web/Data/Sites/Default/SE/schema/WPS_Functions/default_db/CRM_PROCES_tree && sudo /opt/local/bin/ant -f build_CRM_PROCES_tree.xml default_db:PROCES_INIT:tree:dita -Duuid={$basename}");
|
|
|
if (!file_exists($ditamapFile)) throw new Exception("Nie udało się wygenerować pliku ditamap");
|
|
if (!file_exists($ditamapFile)) throw new Exception("Nie udało się wygenerować pliku ditamap");
|
|
|
- shell_exec("cd \"{$baseDir}\" && sudo /Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita -o pdf -i {$basename}.ditamap -f pdf");
|
|
|
|
|
|
|
+ shell_exec("cd \"{$baseDir}\" && sudo {$this->DITA} -o pdf -i {$basename}.ditamap -f pdf");
|
|
|
if (!file_exists($pdfFile)) throw new Exception("Nie udało się wygenerować pliku PDF");
|
|
if (!file_exists($pdfFile)) throw new Exception("Nie udało się wygenerować pliku PDF");
|
|
|
return $pdfFile;
|
|
return $pdfFile;
|
|
|
}
|
|
}
|
|
@@ -4251,7 +4252,7 @@ class BiAuditPowiazania {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
self::saveToLog("Generuję plik PDF ({$resultsPart})");
|
|
self::saveToLog("Generuję plik PDF ({$resultsPart})");
|
|
|
- self::exec("cd \"{$baseDir}\" && /Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita -o pdf -i relations-{$id_part}.ditamap -f pdf");
|
|
|
|
|
|
|
+ self::exec("cd \"{$baseDir}\" && {$this->DITA} -o pdf -i relations-{$id_part}.ditamap -f pdf");
|
|
|
if (file_exists($pdfFile)) {
|
|
if (file_exists($pdfFile)) {
|
|
|
rename($pdfFile, $pdfDestFile);
|
|
rename($pdfFile, $pdfDestFile);
|
|
|
self::saveToLog("Wygenerowano plik PDF ({$resultsPart})");
|
|
self::saveToLog("Wygenerowano plik PDF ({$resultsPart})");
|
|
@@ -4259,7 +4260,7 @@ class BiAuditPowiazania {
|
|
|
$this->saveProgress(['reportsCreated' => 0.45]);
|
|
$this->saveProgress(['reportsCreated' => 0.45]);
|
|
|
|
|
|
|
|
self::saveToLog("Generuję pliki HTML ({$resultsPart})");
|
|
self::saveToLog("Generuję pliki HTML ({$resultsPart})");
|
|
|
- self::exec("cd \"{$baseDir}\" && /Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita -o html -i relations-{$id_part}.ditamap -f tocjs");
|
|
|
|
|
|
|
+ self::exec("cd \"{$baseDir}\" && {$this->DITA} -o html -i relations-{$id_part}.ditamap -f tocjs");
|
|
|
if (file_exists($htmlDir) && is_dir($htmlDir) && file_exists($htmlFile)) {
|
|
if (file_exists($htmlDir) && is_dir($htmlDir) && file_exists($htmlFile)) {
|
|
|
self::exec("cd \"{$baseDir}\" && zip -r \"{$htmlZipDestFile}\" html");
|
|
self::exec("cd \"{$baseDir}\" && zip -r \"{$htmlZipDestFile}\" html");
|
|
|
if (file_exists($htmlDestDir)) self::exec("rm -rf \"{$htmlDestDir}\"");
|
|
if (file_exists($htmlDestDir)) self::exec("rm -rf \"{$htmlDestDir}\"");
|