* finish task #2335.

This commit is contained in:
wangyidong
2015-11-02 15:30:43 +08:00
parent 1807788f9d
commit 5d7126f5ca
14 changed files with 58 additions and 15 deletions
+20
View File
@@ -251,6 +251,7 @@ class fileModel extends model
*/
public function pasteImage($data)
{
if(empty($data)) return '';
$data = str_replace('\"', '"', $data);
ini_set('pcre.backtrack_limit', strlen($data));
@@ -414,4 +415,23 @@ class fileModel extends model
if($zip->extract(PCLZIP_OPT_PATH, $filePath) == 0) return false;
return $filePath;
}
/**
* Process editor.
*
* @param object $data
* @param string $editorList
* @access public
* @return object
*/
public function processEditor($data, $editorList)
{
foreach(explode(',', $editorList) as $editorID)
{
$editorID = trim($editorID);
if(empty($editorID) or !isset($data->$editorID)) continue;
$data->$editorID = $this->pasteImage($data->$editorID);
}
return $data;
}
}