X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2Fform%2FUploadFile.class.php;h=50e8aad561554161c84751f78e68e12ee5b0cb25;hb=817c14c6c2098d85ef912fb95898c857bf533b4f;hp=cfb671209e6046ca1e441bb8f5a6b3ba88484d5b;hpb=e1703495130c8ed88fe210f50a2a6b453b3c566b;p=timetracker.git diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php index cfb67120..50e8aad5 100644 --- a/WEB-INF/lib/form/UploadFile.class.php +++ b/WEB-INF/lib/form/UploadFile.class.php @@ -29,30 +29,23 @@ import('form.FormElement'); class UploadFile extends FormElement { - var $mMaxSize = 100000; // 100kb // TODO: refactor this. - function __construct($name, $value = '') + var $maxSize = 8388608; // 8MB default max size. + + function __construct($name) { $this->class = 'UploadFile'; $this->name = $name; - $this->value = $value; } -// TODO: refactoring ongoing down from here. - function setMaxSize($value) { $this->mMaxSize = $value; } - function getMaxSize() { return $this->mMaxSize; } - - function getHtml() { + function setMaxSize($value) { $this->maxSize = $value; } - if ($this->id=="") $this->id = $this->name; - - $html = "\n\tmMaxSize."\"/>"; - $html .= "\n\tname\" id=\"$this->id\""; - - $html .= " type=\"file\""; - $html .= ">"; + function getHtml() { - return $html; - } + if ($this->id == '') $this->id = $this->name; + + $html = "\n\tmaxSize\">"; + $html .= "\n\tid\" name=\"$this->name\">"; + return $html; + } }