X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FUploadFile.class.php;h=50e8aad561554161c84751f78e68e12ee5b0cb25;hb=ed41335d63e71a11d30e92f4367106e9398adf9d;hp=e46f29d3128e4e07650115ec30e45f56c14b4b09;hpb=4fdb2cd8b1c8990a7ea8ed40b275dc51174e6585;p=timetracker.git diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php index e46f29d3..50e8aad5 100644 --- a/WEB-INF/lib/form/UploadFile.class.php +++ b/WEB-INF/lib/form/UploadFile.class.php @@ -29,7 +29,8 @@ import('form.FormElement'); class UploadFile extends FormElement { - var $mMaxSize = 100000; // 100kb // TODO: refactor this. + + var $maxSize = 8388608; // 8MB default max size. function __construct($name) { @@ -37,21 +38,14 @@ class UploadFile extends FormElement { $this->name = $name; } -// 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; + } }