<?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($J1_hF) { $this->addVariables(array('server' => $J1_hF)); return $this; } public function autoSave($gwXrh) { $this->addVariables(array('autoSave' => $gwXrh)); return $this; } public function prepareInput($gwXrh, $uV19D) { if (!empty($this->variables['autoSave']) && DataManager::isDataTemp($gwXrh)) { goto pew5e; pew5e: $UdQ1p = DataManager::storeTempDataByPath($gwXrh); goto R6qXR; hbKEc: return DataManager::fix($UdQ1p['data']['path']); goto Ro5Xa; R6qXR: if (Response::isError($UdQ1p)) { return $gwXrh; } goto hbKEc; Ro5Xa: } return $gwXrh; } }