disabled email sending in Order::save()
This commit is contained in:
@@ -6,6 +6,7 @@ class mfLayout {
|
||||
private $template="cli";
|
||||
private $package="default";
|
||||
private $inline;
|
||||
private $returnValue;
|
||||
|
||||
|
||||
protected static $instance;
|
||||
@@ -45,6 +46,14 @@ class mfLayout {
|
||||
$this->template=$template;
|
||||
}
|
||||
|
||||
private function setReturnValue($value) {
|
||||
$this->returnValue = $value;
|
||||
}
|
||||
|
||||
public function getReturnedValue() {
|
||||
return $this->returnValue;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
$this->defaultLayoutvariables();
|
||||
|
||||
@@ -63,7 +72,7 @@ class mfLayout {
|
||||
echo $this->render();
|
||||
}
|
||||
|
||||
public function displayPDF($filename=false,$extraPdfArgs=false) {
|
||||
public function renderPDF($filename=false,$extraPdfArgs=false) {
|
||||
$html = $this->render();
|
||||
|
||||
if(!$filename)
|
||||
@@ -84,16 +93,27 @@ class mfLayout {
|
||||
|
||||
$file = PDFOUTPUTPATH."/$filename";
|
||||
|
||||
header('Content-Type: application/octet-stream');
|
||||
return $file;
|
||||
}
|
||||
|
||||
public function displayPDF($filename=false,$extraPdfArgs=false) {
|
||||
$filepath = $this->renderPDF($filename, $extraPdfArgs);
|
||||
|
||||
if(!$filename && strpos($filepath, "/") !== false) {
|
||||
$path_parts = explode("/", $filepath);
|
||||
$filename = end($path_parts);
|
||||
}
|
||||
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-disposition: attachment; filename='.$filename);
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Content-Type: '.mime_content_type($file));
|
||||
header("Content-Length: ".filesize($file));
|
||||
|
||||
readfile($file);
|
||||
header('Content-Type: '.mime_content_type($filename));
|
||||
header("Content-Length: ".filesize($filename));
|
||||
|
||||
readfile($file);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
public function setFlash($msg, $type="info") {
|
||||
// info, warning, error
|
||||
|
||||
Reference in New Issue
Block a user