<?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($xyEtj) { $this->addVariables(array('server' => $xyEtj)); return $this; } public function autoSave($ib3B9) { $this->addVariables(array('autoSave' => $ib3B9)); return $this; } public function prepareInput($ib3B9, $nzuw7) { if (!empty($this->variables['autoSave']) && DataManager::isDataTemp($ib3B9)) { goto J6hcG; J6hcG: $gbVzz = DataManager::storeTempDataByPath($ib3B9); goto bUgxd; bUgxd: if (Response::isError($gbVzz)) { return $ib3B9; } goto JDOQB; JDOQB: return DataManager::fix($gbVzz['data']['path']); goto Yid0L; Yid0L: } return $ib3B9; } }