<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Input\Response; use ModStart\Data\DataManager; class FileTemp extends AbstractField { protected $width = 80; protected static $js = array('asset/common/uploadButton.js'); protected function setup() { $this->addVariables(array('autoSave' => true, 'server' => modstart_admin_url('data/file_manager/file'))); } public function server($GyeYJ) { $this->addVariables(array('server' => $GyeYJ)); return $this; } public function autoSave($wvO30) { $this->addVariables(array('autoSave' => $wvO30)); return $this; } public function prepareInput($wvO30, $w5oww) { if (!empty($this->variables['autoSave']) && DataManager::isDataTemp($wvO30)) { goto nupa4; W1W8Q: if (Response::isError($pTwJr)) { return $wvO30; } goto b8KGi; nupa4: $pTwJr = DataManager::storeTempDataByPath($wvO30); goto W1W8Q; b8KGi: return DataManager::fix($pTwJr['data']['path']); goto hCmwd; hCmwd: } return $wvO30; } }