diff options
Diffstat (limited to 'model/Image.php')
-rw-r--r-- | model/Image.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/model/Image.php b/model/Image.php index 0070b70..efd75cc 100644 --- a/model/Image.php +++ b/model/Image.php | |||
@@ -6,7 +6,7 @@ class Image | |||
6 | private const MAX_WEIGHT = 2000000; // taille max des images (par défaut 2Mo dans php.ini) | 6 | private const MAX_WEIGHT = 2000000; // taille max des images (par défaut 2Mo dans php.ini) |
7 | private $page; | 7 | private $page; |
8 | private $ajax = false; | 8 | private $ajax = false; |
9 | private $erreur = ''; | 9 | public $erreur = ''; |
10 | 10 | ||
11 | public function __construct($ajax) | 11 | public function __construct($ajax) |
12 | { | 12 | { |
@@ -16,14 +16,11 @@ class Image | |||
16 | } | 16 | } |
17 | 17 | ||
18 | // GET | 18 | // GET |
19 | public function getError() | 19 | |
20 | { | 20 | // SET |
21 | return($this->erreur); | ||
22 | } | ||
23 | 21 | ||
24 | public function upload() | 22 | public function upload() |
25 | { | 23 | { |
26 | |||
27 | // traitement et enregistrement de l'image | 24 | // traitement et enregistrement de l'image |
28 | if (isset($_FILES['upload']) AND $_FILES['upload']['error'] == 0) // 0 signifie ok | 25 | if (isset($_FILES['upload']) AND $_FILES['upload']['error'] == 0) // 0 signifie ok |
29 | { | 26 | { |