aboutsummaryrefslogtreecommitdiffstats
path: root/profile.php
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2005-04-26 09:46:33 +0000
committergweltas <gweltas@piwigo.org>2005-04-26 09:46:33 +0000
commit9dc9c553d39e20aa110cb66124fc3e5a5ea1af33 (patch)
treeda5f78a1b9eacc4a76e29aaa21d5de5d947d9313 /profile.php
parent60ed679b36df10e5ded2c0a9190ac10f95f2143a (diff)
Bug 99 : javascript error in profile.php
Enhancement of the radio class under IE git-svn-id: http://piwigo.org/svn/trunk@772 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--profile.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/profile.php b/profile.php
index 57f6255be..ff75b0c67 100644
--- a/profile.php
+++ b/profile.php
@@ -34,7 +34,7 @@ if (defined('IN_ADMIN') and IN_ADMIN and isset($_GET['user_id']))
{
$userdata = getuserdata(intval($_GET['user_id']));
}
-elseif (defined('IN_ADMIN') and isset($_POST['submit']))
+elseif (defined('IN_ADMIN') and (isset($_POST['validate'])) )
{
$userdata = getuserdata(intval($_POST['userid']));
}
@@ -51,7 +51,7 @@ $infos = array('nb_image_line', 'nb_line_page', 'language',
'recent_period', 'template', 'mail_address');
$errors = array();
-if (isset($_POST['submit']))
+if (isset($_POST['username']) && !isset($_POST['reset']))
{
$int_pattern = '/^\d+$/';
@@ -193,14 +193,17 @@ UPDATE '.USERS_TABLE.'
}
// redirection
- if (!defined('IN_ADMIN') or !IN_ADMIN)
+ if (isset($_POST['validate']))
{
- $url = PHPWG_ROOT_PATH.'category.php?'.$_SERVER['QUERY_STRING'];
- redirect(add_session_id($url));
- }
- else
- {
- redirect(add_session_id(PHPWG_ROOT_PATH.'admin.php?page=profile'));
+ if (!defined('IN_ADMIN') or !IN_ADMIN)
+ {
+ $url = PHPWG_ROOT_PATH.'category.php?'.$_SERVER['QUERY_STRING'];
+ redirect(add_session_id($url));
+ }
+ else
+ {
+ redirect(add_session_id(PHPWG_ROOT_PATH.'admin.php?page=profile'));
+ }
}
}
}