<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Input\Response; use ModStart\Core\Util\ConvertUtil; use ModStart\Data\DataManager; class ImagesTemp extends AbstractField { protected $width = 80; protected static $js = array('asset/common/uploadButton.js'); protected function setup() { $this->addVariables(array('server' => modstart_admin_url('data/file_manager/image'))); } public function server($GBwzV) { $this->addVariables(array('server' => $GBwzV)); return $this; } public function unserializeValue($mdHu1, AbstractField $Mk6lP) { if (null === $mdHu1) { return $mdHu1; } return ConvertUtil::toArray($mdHu1); } public function serializeValue($mdHu1, $DRh9Q) { return json_encode($mdHu1); } public function prepareInput($mdHu1, $DRh9Q) { goto GEfJk; GEfJk: $mdHu1 = ConvertUtil::toArray($mdHu1); goto UnjAf; Oz70c: return $mdHu1; goto c4yFX; UnjAf: if (is_array($mdHu1)) { foreach ($mdHu1 as $Fkd1C => $pk5fc) { if (DataManager::isDataTemp($pk5fc)) { goto mlAPX; iJtfI: if (Response::isError($N2Xaa)) { continue; } goto mVnV2; mlAPX: $N2Xaa = DataManager::storeTempDataByPath($pk5fc); goto iJtfI; mVnV2: $mdHu1[$Fkd1C] = DataManager::fix($N2Xaa['data']['path']); goto lzPHn; lzPHn: } } } goto Oz70c; c4yFX: } }