@@ 145-150 (lines=6) @@ | ||
142 | } |
|
143 | ||
144 | // Verifica ancho minimo de la imagen |
|
145 | if ($this->_minWidth !== NULL) { |
|
146 | if ($image[0] < $this->_minWidth) { |
|
147 | Flash::error("Error: el ancho de la imagen debe ser superior o igual a {$this->_minWidth}px"); |
|
148 | return FALSE; |
|
149 | } |
|
150 | } |
|
151 | ||
152 | // Verifica ancho maximo de la imagen |
|
153 | if ($this->_maxWidth !== NULL) { |
|
@@ 153-158 (lines=6) @@ | ||
150 | } |
|
151 | ||
152 | // Verifica ancho maximo de la imagen |
|
153 | if ($this->_maxWidth !== NULL) { |
|
154 | if ($image[0] > $this->_maxWidth) { |
|
155 | Flash::error("Error: el ancho de la imagen debe ser inferior o igual a {$this->_maxWidth}px"); |
|
156 | return FALSE; |
|
157 | } |
|
158 | } |
|
159 | ||
160 | // Verifica alto minimo de la imagen |
|
161 | if ($this->_minHeight !== NULL) { |
|
@@ 161-166 (lines=6) @@ | ||
158 | } |
|
159 | ||
160 | // Verifica alto minimo de la imagen |
|
161 | if ($this->_minHeight !== NULL) { |
|
162 | if ($image[1] < $this->_minHeight) { |
|
163 | Flash::error("Error: el alto de la imagen debe ser superior o igual a {$this->_minHeight}px"); |
|
164 | return FALSE; |
|
165 | } |
|
166 | } |
|
167 | ||
168 | // Verifica alto maximo de la imagen |
|
169 | if ($this->_maxHeight !== NULL) { |
|
@@ 169-174 (lines=6) @@ | ||
166 | } |
|
167 | ||
168 | // Verifica alto maximo de la imagen |
|
169 | if ($this->_maxHeight !== NULL) { |
|
170 | if ($image[1] > $this->_maxHeight) { |
|
171 | Flash::error("Error: el alto de la imagen debe ser inferior o igual a {$this->_maxHeight}px"); |
|
172 | return FALSE; |
|
173 | } |
|
174 | } |
|
175 | ||
176 | // Validaciones |
|
177 | return parent::_validates(); |