From c2d2fb73095a32394dd95e72421aec49fa2cd6f6 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 13 May 2003 18:36:38 +0000 Subject: - Fixed a typo in the PostgreSQL database scheme. Patch by Michael Frankowski. - Fixed a typo in the MSSQL database scheme. Patch by Michael Frankowski. - Removed dependency on "register_globals = on"! Patches by Michael Frankowski. Notes: + Updated the patches to use $foo["bar"] instead of $foo['bar']. + Updated the INSTALL and CHANGELOG files as well. - Tiny improvement to the "./scripts/code-clean.sh" script. --- modules/profile.module | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/profile.module') diff --git a/modules/profile.module b/modules/profile.module index d09639c85..8fb6da588 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -136,7 +136,7 @@ function _profile_form($edit, $mode) { function _profile_validate($edit, $mode) { - global $profile_fields, $user, $HTTP_POST_VARS; + global $profile_fields, $user; $enabled_fields = _profile_active_fields($mode); @@ -206,19 +206,19 @@ function _profile_user_view(&$user, $mode) { } function _profile_validate_avatar(&$edit) { - global $HTTP_POST_FILES, $user; + global $user; // check that uploaded file is an image, with a max file size and max height/width unset($edit["profile_avatar"]); - if ($HTTP_POST_FILES["edit"]["name"]["profile_avatar"] == "") { + if ($_FILES["edit"]["name"]["profile_avatar"] == "") { $edit["profile_avatar"] = $user->profile_avatar; return ""; } - $image_file = $HTTP_POST_FILES["edit"]["tmp_name"]["profile_avatar"]; + $image_file = $_FILES["edit"]["tmp_name"]["profile_avatar"]; if (is_uploaded_file($image_file)) { - $extension = strtolower(strrchr($HTTP_POST_FILES["edit"]["name"]["profile_avatar"], ".")); + $extension = strtolower(strrchr($_FILES["edit"]["name"]["profile_avatar"], ".")); $size = getimagesize($image_file); list($maxwidth, $maxheight) = explode("x", variable_get("profile_avatar_dimensions", "85x85")); if ((!in_array($size[2], array(1,2,3))) || (!in_array($extension, array(".gif", ".jpg", ".png", ".jpeg")))) { -- cgit v1.2.3