<?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($P6Nu0) { $this->addVariables(array('server' => $P6Nu0)); return $this; } public function autoSave($Gttsd) { $this->addVariables(array('autoSave' => $Gttsd)); return $this; } public function prepareInput($Gttsd, $BWo2e) { if (!empty($this->variables['autoSave']) && DataManager::isDataTemp($Gttsd)) { goto oHj3h; v_KD_: if (Response::isError($f3Nqc)) { return $Gttsd; } goto OrBSw; oHj3h: $f3Nqc = DataManager::storeTempDataByPath($Gttsd); goto v_KD_; OrBSw: return DataManager::fix($f3Nqc['data']['path']); goto Vsg37; Vsg37: } return $Gttsd; } }