Commit 36612b6e by sn

mcBash .. .mit zeitstatistik

1 parent 6d44a52c
<?php
class mcBash {
public static function exec($command, array &$output = null, &$return_var = null) {
$StartTime = time();
$shell_exec = exec($command, $output, $return_var);
$zeit = getdate(time() - $StartTime);
D::ulli($zeit["minutes"].'m'.$zeit["seconds"].'s: mcBash# '.$command);
return $shell_exec;
}
/**
* (PHP 4, PHP 5)<br/>
* Execute command via shell and return the complete output as a string
* @link http://php.net/manual/en/function.shell-exec.php
* @param string $cmd <p>
* The command that will be executed.
* </p>
* @return string The output from the executed command or <b>NULL</b> if an error occurred.
*/
public static function shell_exec ($cmd) {
$StartTime = time();
$shell_exec = shell_exec($cmd);
$zeit = getdate(time() - $StartTime);
D::ulli($zeit["minutes"].'m'.$zeit["seconds"].'s: mcBash# '.$cmd);
return $shell_exec;
}
}
?>
\ No newline at end of file
......@@ -54,9 +54,10 @@ class mcCairoSvg {
$order = $ausgabe = $return_var = null;
$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 = exec($order, $ausgabe, $return_var);
// $shell_exec = exec($order, $ausgabe, $return_var);
$shell_exec = mcBash::exec($order, $ausgabe, $return_var);
// D::show(array('$shell_exec' => $shell_exec, '$ausgabe'=>$ausgabe, '$return_var' => $return_var), $order);
return $out_pdf;
......
......@@ -23,7 +23,8 @@ class mcInkscape {
$order = "inkscape $param_input_filename --export-dpi=".$param_quality['dpi']." -e $outfile";
// D::ulli('$'.$order);
$shell_exec = shell_exec($order);
// $shell_exec = shell_exec($order);
$shell_exec = mcBash::shell_exec($order);
return $outfile;
}
......@@ -54,7 +55,8 @@ class mcInkscape {
$order = "inkscape $param_input_filename --export-dpi=".$param_quality['dpi']." --export-pdf=$outfile";
// D::ulli('$'.$order);
$shell_exec = shell_exec($order);
// $shell_exec = shell_exec($order);
$shell_exec = mcBash::shell_exec($order);
return $outfile;
}
......@@ -80,7 +82,9 @@ class mcInkscape {
}
$inkscape_order = "inkscape -T ".$param_input_filename." -l ".$outfile." ";
$shell_exec = shell_exec($inkscape_order);
// D::ulli('inkscapeSvgToNormalSvg:shell# '.$inkscape_order);
// $shell_exec = shell_exec($inkscape_order);
$shell_exec = mcBash::shell_exec($inkscape_order);
// D::show($shell_exec, $inkscape_order);
return $outfile;
......
......@@ -22,6 +22,7 @@
require_once $__PATH_to_mcClasses . 'class_mcMail.inc.php';
require_once $__PATH_to_mcClasses . 'class_mcConfig.inc.php';
require_once $__PATH_to_mcClasses . 'file/class_mcFile.inc.php';
......@@ -41,7 +42,7 @@ require_once $__PATH_to_mcClasses . 'oop/if_mcClass.inc.php';
require_once $__PATH_to_mcClasses . 'class_mcSort.inc.php';
require_once $__PATH_to_mcClasses . 'class_mcBash.inc.php';
//require_once $__PATH_to_mcClasses . 'class_.inc.php';
require_once $__PATH_to_mcClasses . 'ReportHandling/class_mcMessageReport.inc.php';
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!