Commit c0a5bd1b by sn

@todo /var/www/Magento/ Pfad angepasst .. ist aber trotzdem scheisse

1 parent b3967bc5
...@@ -52,11 +52,11 @@ class mcCairoSvg { ...@@ -52,11 +52,11 @@ class mcCairoSvg {
} }
$order = $ausgabe = $return_var = null; $order = $ausgabe = $return_var = null;
$order = "/home/dev/Magento/CairoSVG/cairosvg.sh '".$param_input_filename."' '".$out_pdf."' '".$param_format."' '".$param_quality['DPI']."' "; $order = "/var/www/Magento/CairoSVG/cairosvg.sh '".$param_input_filename."' '".$out_pdf."' '".$param_format."' '".$param_quality['DPI']."' ";
D::ulli('$'.$order); // D::ulli('$'.$order);
// $shell_exec = shell_exec($order); // $shell_exec = shell_exec($order);
$shell_exec = exec($order, $ausgabe, $return_var); $shell_exec = exec($order, $ausgabe, $return_var);
D::show(array('$shell_exec' => $shell_exec, '$ausgabe'=>$ausgabe, '$return_var' => $return_var), $order); // D::show(array('$shell_exec' => $shell_exec, '$ausgabe'=>$ausgabe, '$return_var' => $return_var), $order);
return $out_pdf; return $out_pdf;
} }
......
...@@ -94,11 +94,11 @@ class mcFile { ...@@ -94,11 +94,11 @@ class mcFile {
* @param array $param_outputfile @see mcFile::manipulateOutputfileArray($param_outputfile) * @param array $param_outputfile @see mcFile::manipulateOutputfileArray($param_outputfile)
* @return string * @return string
*/ */
public static function createTmpFile(array $param_outputfile=null) { public static function createTmpFile(array $param_outputfile=null, $param_filepath=null) {
if(is_null($param_outputfile)) { if(is_null($param_outputfile)) {
$param_outputfile = array(); $param_outputfile = array();
} }
mcFile::manipulateOutputfileArray($param_outputfile); mcFile::manipulateOutputfileArray($param_outputfile, $param_filepath);
$param_file = tempnam($param_outputfile['dirname'], $param_outputfile['prefix']); $param_file = tempnam($param_outputfile['dirname'], $param_outputfile['prefix']);
...@@ -117,6 +117,7 @@ class mcFile { ...@@ -117,6 +117,7 @@ class mcFile {
* @todo es könnte überprüft werden ob $param_outputfile['dirname'] schreibbar ist * @todo es könnte überprüft werden ob $param_outputfile['dirname'] schreibbar ist
* @todo es könnte überprüft werden ob $param_outputfile['filename'] schreibbar ist * @todo es könnte überprüft werden ob $param_outputfile['filename'] schreibbar ist
* @todo filepath könnte alle anderen Werte generieren * @todo filepath könnte alle anderen Werte generieren
* @todo filenameextension muessste extension heissen, so wie bei pathinfo()
* *
* @param array $param_outputfile - array('dirname'=>,'prefix'=>,'filename'=>,'filenameextension'=>, ) * @param array $param_outputfile - array('dirname'=>,'prefix'=>,'filename'=>,'filenameextension'=>, )
* @param type $param_filepath - generiert bis jetzt nur dirname * @param type $param_filepath - generiert bis jetzt nur dirname
...@@ -132,8 +133,14 @@ class mcFile { ...@@ -132,8 +133,14 @@ class mcFile {
} }
if(!array_key_exists('prefix', $param_outputfile)) { if(!array_key_exists('prefix', $param_outputfile)) {
if(!is_null($param_filepath)) {
$pathinfo = pathinfo($param_filepath);
// D::show($pathinfo, 'basename: '.basename($param_filepath));
$param_outputfile['prefix'] = $pathinfo['filename'];
} else {
$param_outputfile['prefix'] = ''; $param_outputfile['prefix'] = '';
} }
}
if(!array_key_exists('filename', $param_outputfile)) { if(!array_key_exists('filename', $param_outputfile)) {
$param_outputfile['filename'] = ''; $param_outputfile['filename'] = '';
...@@ -143,6 +150,8 @@ class mcFile { ...@@ -143,6 +150,8 @@ class mcFile {
$param_outputfile['filenameextension'] = ''; $param_outputfile['filenameextension'] = '';
} }
D::show($param_outputfile, '$param_outputfile');
} }
} }
......
...@@ -22,7 +22,7 @@ class mcInkscape { ...@@ -22,7 +22,7 @@ class mcInkscape {
} }
$order = "inkscape $param_input_filename --export-dpi=".$param_quality['dpi']." -e $outfile"; $order = "inkscape $param_input_filename --export-dpi=".$param_quality['dpi']." -e $outfile";
D::ulli('$'.$order); // D::ulli('$'.$order);
$shell_exec = shell_exec($order); $shell_exec = shell_exec($order);
return $outfile; return $outfile;
...@@ -53,7 +53,7 @@ class mcInkscape { ...@@ -53,7 +53,7 @@ class mcInkscape {
$order = "inkscape $param_input_filename --export-dpi=".$param_quality['dpi']." --export-pdf=$outfile"; $order = "inkscape $param_input_filename --export-dpi=".$param_quality['dpi']." --export-pdf=$outfile";
D::ulli('$'.$order); // D::ulli('$'.$order);
$shell_exec = shell_exec($order); $shell_exec = shell_exec($order);
return $outfile; return $outfile;
...@@ -81,7 +81,7 @@ class mcInkscape { ...@@ -81,7 +81,7 @@ class mcInkscape {
$inkscape_order = "inkscape -T ".$param_input_filename." -l ".$outfile." "; $inkscape_order = "inkscape -T ".$param_input_filename." -l ".$outfile." ";
$shell_exec = shell_exec($inkscape_order); $shell_exec = shell_exec($inkscape_order);
D::show($shell_exec, $inkscape_order); // D::show($shell_exec, $inkscape_order);
return $outfile; return $outfile;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!