projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #5700 - Order Follow up Table
[Pman.Core]
/
ImportMailMessage.php
diff --git
a/ImportMailMessage.php
b/ImportMailMessage.php
index
4dc240a
..
ce4ea30
100644
(file)
--- a/
ImportMailMessage.php
+++ b/
ImportMailMessage.php
@@
-1,8
+1,10
@@
<?php
<?php
+// should be in import folder... need to know where this is used though...
+
require_once 'ConvertStyle.php';
require_once 'ConvertStyle.php';
-class Pman_C
rm_ImportHtml
extends Pman_Core_ConvertStyle
+class Pman_C
ore_ImportMailMessage
extends Pman_Core_ConvertStyle
{
function getAuth()
{
{
function getAuth()
{
@@
-16,15
+18,15
@@
class Pman_Crm_ImportHtml extends Pman_Core_ConvertStyle
return true;
}
return true;
}
- function get()
+ function get(
$v, $opts=array()
)
{
$this->post();
return $this->jerr("not allowed");
}
{
$this->post();
return $this->jerr("not allowed");
}
- function post()
- {
+ function post(
$v
)
+ {
if(isset($_REQUEST['_convertToPlain']))
{
require_once 'System.php';
if(isset($_REQUEST['_convertToPlain']))
{
require_once 'System.php';
@@
-54,9
+56,11
@@
class Pman_Crm_ImportHtml extends Pman_Core_ConvertStyle
}
require_once 'File/Convert.php';
$fc = new File_Convert($path, 'text/html');
}
require_once 'File/Convert.php';
$fc = new File_Convert($path, 'text/html');
+
$plain = $fc->convert('text/plain');
$this->jok(file_get_contents($plain));
}
$plain = $fc->convert('text/plain');
$this->jok(file_get_contents($plain));
}
+
// Import from URL
if(isset($_REQUEST['importUrl']))
{
// Import from URL
if(isset($_REQUEST['importUrl']))
{
@@
-74,7
+78,7
@@
class Pman_Crm_ImportHtml extends Pman_Core_ConvertStyle
'ontable' =>'crm_mailing_list_message'
));
$htmlFile->onUpload(false);
'ontable' =>'crm_mailing_list_message'
));
$htmlFile->onUpload(false);
- // print_r($htmlFile);
+
if($htmlFile->mimetype != 'text/html')
{
$this->jerr('accept html file only!');
if($htmlFile->mimetype != 'text/html')
{
$this->jerr('accept html file only!');
@@
-87,6
+91,7
@@
class Pman_Crm_ImportHtml extends Pman_Core_ConvertStyle
$data = $this->convertStyle('', $htmlFile->getStoreName(), false);
$htmlFile->delete();
$data = $this->convertStyle('', $htmlFile->getStoreName(), false);
$htmlFile->delete();
+
unlink($htmlFile->getStoreName()) or die('Unable to delete the file');
$this->jok($data);
unlink($htmlFile->getStoreName()) or die('Unable to delete the file');
$this->jok($data);