summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/model/common.mod.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/model/common.mod.php b/app/model/common.mod.php
index 96326dc..a177c13 100644
--- a/app/model/common.mod.php
+++ b/app/model/common.mod.php
@@ -7,6 +7,12 @@ require_once "class/user.class.php";
class CommonModel extends MasterModel
{
+ var $HEAD_IMG_MAX_SIZE = 1048576; // 1MB
+ var $HEAD_IMG_MIME = array(
+ "image/jpg",
+ "image/jpeg"
+ );
+
/*
* Default action
*/
@@ -103,7 +109,7 @@ class CommonModel extends MasterModel
$user->saveObj();
- if ($form->saveFile($attachment, 5242880, array("image/jpg", "image/jpeg"), "assets/img/heads/" . $user->guid))
+ if ($form->saveFile($attachment, $this->HEAD_IMG_MAX_SIZE, $this->HEAD_IMG_MIME, "assets/img/heads/" . $user->guid))
$this->logNotice("Image uploaded");
else
$this->logFormErrors($form);