diff options
| author | fisharebest <fisharebest@gmail.com> | 2012-01-20 16:47:46 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2012-01-20 16:47:46 +0000 |
| commit | 7ea9e5c966cdb655d8cf7d3312e031587288019d (patch) | |
| tree | 032d548d7926eebfc41cf1612e46a1064822af11 /index_edit.php | |
| parent | 34d6a3528da4c34cf703b16ee956727d92cbdafc (diff) | |
| download | webtrees-7ea9e5c966cdb655d8cf7d3312e031587288019d.tar.gz webtrees-7ea9e5c966cdb655d8cf7d3312e031587288019d.tar.bz2 webtrees-7ea9e5c966cdb655d8cf7d3312e031587288019d.zip | |
#918550 - Reset to Default Blocks doesn't work for homepage
Diffstat (limited to 'index_edit.php')
| -rw-r--r-- | index_edit.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/index_edit.php b/index_edit.php index afa163294d..dee2af43a6 100644 --- a/index_edit.php +++ b/index_edit.php @@ -2,7 +2,7 @@ // Change the blocks on "My page" and "Home page" // // webtrees: Web based Family History software -// Copyright (C) 2011 webtrees development team. +// Copyright (C) 2012 webtrees development team. // // Derived from PhpGedView // Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. @@ -95,6 +95,7 @@ if ($ctype=='user') { } else { if ($action=='reset') { WT_DB::prepare("DELETE `##block_setting` FROM `##block_setting` JOIN `##block` USING (block_id) WHERE gedcom_id=?")->execute(array(WT_GED_ID)); + WT_DB::prepare("DELETE FROM `##block` WHERE gedcom_id=?")->execute(array(WT_GED_ID)); } $blocks=get_gedcom_blocks(WT_GED_ID); } @@ -395,10 +396,7 @@ if ($action=="configure") { if (WT_USER_IS_ADMIN && $ctype=='user') { echo WT_I18N::translate('Use these blocks as the default block configuration for all users?'), '<input type="checkbox" name="setdefault" value="1"><br><br>'; }*/ - /* Access to this section temporarily removed from Home page as it does not work (kiwi - 20/01/2012)*/ - if ($ctype=='user') { - echo '<input type="button" value="', WT_I18N::translate('Reset to Default Blocks'), '" onclick="window.location=\'index_edit.php?ctype=', $ctype, '&action=reset&name=', addslashes($name), '\';">'; - } + echo '<input type="button" value="', WT_I18N::translate('Reset to Default Blocks'), '" onclick="window.location=\'index_edit.php?ctype=', $ctype, '&action=reset&name=', addslashes($name), '\';">'; echo ' '; echo '<input type="button" value="', WT_I18N::translate('Save'), '" onclick="select_options(); save_form();">'; echo ' '; |
