1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Bugtracker #3994 - tighten up image checking

This commit is contained in:
e107steved 2007-06-25 20:09:30 +00:00
parent 9a3fc4d986
commit 38114fdcd6
2 changed files with 15 additions and 10 deletions

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/resize_handler.php,v $
| $Revision: 1.3 $
| $Date: 2007-05-29 18:56:53 $
| $Revision: 1.4 $
| $Date: 2007-06-25 20:09:29 $
| $Author: e107steved $
|
| Mod to support GIF (for gd at least)
@ -56,7 +56,7 @@ function resize_image($source_file, $destination_file, $type = "upload", $model
*/
if ($image_stats == null)
{
echo "<b>DEBUG</b> image_stats are null<br />";
// echo "<b>DEBUG</b> image_stats are null<br />";
return false;
}

View File

@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/usersettings.php,v $
| $Revision: 1.9 $
| $Date: 2007-06-13 22:13:58 $
| $Author: e107coders $
| $Revision: 1.10 $
| $Date: 2007-06-25 20:09:30 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@ -239,7 +239,12 @@ if (isset($_POST['updatesettings']))
{
// photograph uploaded
$user_sess = ($pref['avatar_upload'] ? $uploaded[1]['name'] : $uploaded[0]['name']);
resize_image(e_FILE."public/avatars/".$user_sess, e_FILE."public/avatars/".$user_sess, 180);
if (!resize_image(e_FILE."public/avatars/".$user_sess, e_FILE."public/avatars/".$user_sess, 180))
{
unset($message);
$error .= RESIZE_NOT_SUPPORTED."\\n";
@unlink(e_FILE."public/avatars/".$user_sess);
}
}
}
}