From b261add7890514322d95d99706af49f036983a54 Mon Sep 17 00:00:00 2001 From: andrpet Date: Tue, 10 May 2016 14:51:54 +0200 Subject: [PATCH] plugin update --- export/deepexport.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/export/deepexport.php b/export/deepexport.php index c9a24cf..5d19d2c 100644 --- a/export/deepexport.php +++ b/export/deepexport.php @@ -45,9 +45,26 @@ class DeepExport $rtf = new PHPRtfLite(); $sect = $rtf->addSection(); - $sect->writeText($_REQUEST["datalet"], new PHPRtfLite_Font(14), new PHPRtfLite_ParFormat('center')); + + if(!empty($_REQUEST["name"])) + $sect->writeText("Dataset name : " . strip_tags($_REQUEST["name"]), new PHPRtfLite_Font(14), new PHPRtfLite_ParFormat('center')); + + if(!empty($_REQUEST["datalet"])) + $sect->writeText("Datalet name : " . strip_tags($_REQUEST["datalet"]), new PHPRtfLite_Font(14), new PHPRtfLite_ParFormat('center')); + $sect->addImageFromString($this->createImage($this->app->request()->params('svg_data')), PHPRtfLite_Image::TYPE_PNG); - $sect->writeText($_REQUEST["dataset"], new PHPRtfLite_Font(14), new PHPRtfLite_ParFormat('center')); + + if(!empty($_REQUEST["description"])) + $sect->writeText("Dataset description : " . strip_tags($_REQUEST["description"]), new PHPRtfLite_Font(14), new PHPRtfLite_ParFormat('center')); + if(!empty($_REQUEST["created"])) + $sect->writeText("Dataset creation date : " . strip_tags($_REQUEST["created"]), new PHPRtfLite_Font(14), new PHPRtfLite_ParFormat('center')); + if(!empty($_REQUEST["format"])) + $sect->writeText("Dataset format : " . strip_tags($_REQUEST["format"]), new PHPRtfLite_Font(14), new PHPRtfLite_ParFormat('center')); + if(!empty($_REQUEST["lastModified"])) + $sect->writeText("Dataset last modified : " . strip_tags($_REQUEST["lastModified"]), new PHPRtfLite_Font(14), new PHPRtfLite_ParFormat('center')); + + if(!empty($_REQUEST["dataset"])) + $sect->writeText("Dataset link : " . strip_tags($_REQUEST["dataset"]), new PHPRtfLite_Font(14), new PHPRtfLite_ParFormat('center')); // save rtf document $rtf->sendRtf('datalet.rtf'); -- libgit2 0.21.4