Skip to content

Commit

Permalink
merge r4013 from branch 2.0 to trunk
Browse files Browse the repository at this point in the history
bug 1079: don't save settings in database when restore default settings.

git-svn-id: http://piwigo.org/svn/trunk@4014 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
patdenice committed Oct 10, 2009
1 parent 4431551 commit 7e47a77
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions profile.php
Expand Up @@ -43,9 +43,6 @@
// Reset to default (Guest) custom settings
if (isset($_POST['reset_to_default']))
{
// mass_updates function
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');

$fields = array(
'nb_image_line', 'nb_line_page', 'maxwidth', 'maxheight', 'expand',
'show_nb_comments', 'show_nb_hits', 'recent_period', 'show_nb_hits'
Expand All @@ -60,12 +57,6 @@
$result = pwg_query($query);
$default_user = mysql_fetch_assoc($result);
$userdata = array_merge($userdata, $default_user);

mass_updates(
USER_INFOS_TABLE,
array('primary' => array('user_id'), 'update' => $fields),
array($userdata)
);
}

save_profile_from_post($userdata, $errors);
Expand Down

0 comments on commit 7e47a77

Please sign in to comment.