<?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($RlLfN) { $this->addVariables(array('server' => $RlLfN)); return $this; } public function autoSave($cBDsM) { $this->addVariables(array('autoSave' => $cBDsM)); return $this; } public function prepareInput($cBDsM, $GMqtO) { if (!empty($this->variables['autoSave']) && DataManager::isDataTemp($cBDsM)) { goto kZou3; kZou3: $bCCWW = DataManager::storeTempDataByPath($cBDsM); goto EKkoc; EKkoc: if (Response::isError($bCCWW)) { return $cBDsM; } goto IkKLu; IkKLu: return DataManager::fix($bCCWW['data']['path']); goto EmuV6; EmuV6: } return $cBDsM; } }