summaryrefslogtreecommitdiff
path: root/static/classes/UploadedFile.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'static/classes/UploadedFile.class.php')
-rw-r--r--static/classes/UploadedFile.class.php44
1 files changed, 23 insertions, 21 deletions
diff --git a/static/classes/UploadedFile.class.php b/static/classes/UploadedFile.class.php
index 1cf8914..5e8ae1c 100644
--- a/static/classes/UploadedFile.class.php
+++ b/static/classes/UploadedFile.class.php
@@ -1,27 +1,29 @@
<?php
-class UploadedFile {
- /* Public attributes */
- public $name;
- public $mime;
- public $size;
- public $tempfile;
- public $error;
+class UploadedFile
+{
+ /* Public attributes */
+ public $name;
+ public $mime;
+ public $size;
+ public $tempfile;
+ public $error;
- /* Cached checksums */
- private $sha1;
- private $crc32;
+ /* Cached checksums */
+ private $sha1;
+ private $crc32;
- /**
- * Generates the SHA1 or returns the cached SHA1 hash for the file.
- *
- * @return string
- */
- public function get_sha1 () {
- if (!$this->sha1)
- $this->sha1 = sha1_file($this->tempfile);
+ /**
+ * Generates the SHA1 or returns the cached SHA1 hash for the file.
+ *
+ * @return string
+ */
+ public function get_sha1()
+ {
+ if (!$this->sha1) {
+ $this->sha1 = sha1_file($this->tempfile);
+ }
- return $this->sha1;
- }
+ return $this->sha1;
+ }
}
-?>