summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin_pgv_to_wt.php2
-rw-r--r--admin_site_config.php19
-rw-r--r--app/Module/ClippingsCartModule.php393
-rw-r--r--includes/db_schema/db_schema_29_30.php5
-rw-r--r--login.php46
-rw-r--r--setup.php1
6 files changed, 255 insertions, 211 deletions
diff --git a/admin_pgv_to_wt.php b/admin_pgv_to_wt.php
index b44f616b76..ded9ed74ed 100644
--- a/admin_pgv_to_wt.php
+++ b/admin_pgv_to_wt.php
@@ -53,7 +53,6 @@ $DBNAME = '';
$TBLPREFIX = '';
$PGV_SCHEMA_VERSION = '';
$USE_REGISTRATION_MODULE = '';
-$REQUIRE_ADMIN_AUTH_REGISTRATION = '';
$ALLOW_USER_THEMES = '';
$ALLOW_CHANGE_GEDCOM = '';
$PGV_SESSION_TIME = '';
@@ -210,7 +209,6 @@ Database::exec("DELETE FROM `##user` WHERE user_id>0");
echo '<p>', $INDEX_DIRECTORY, 'config.php => wt_site_setting…</p>';
Site::setPreference('USE_REGISTRATION_MODULE', $USE_REGISTRATION_MODULE);
-Site::setPreference('REQUIRE_ADMIN_AUTH_REGISTRATION', $REQUIRE_ADMIN_AUTH_REGISTRATION);
Site::setPreference('ALLOW_USER_THEMES', $ALLOW_USER_THEMES);
Site::setPreference('ALLOW_CHANGE_GEDCOM', $ALLOW_CHANGE_GEDCOM);
Site::setPreference('SESSION_TIME', $PGV_SESSION_TIME);
diff --git a/admin_site_config.php b/admin_site_config.php
index dfcb734188..bdeb14ffc0 100644
--- a/admin_site_config.php
+++ b/admin_site_config.php
@@ -71,7 +71,6 @@ case 'login':
Site::setPreference('WELCOME_TEXT_AUTH_MODE', Filter::post('WELCOME_TEXT_AUTH_MODE'));
Site::setPreference('WELCOME_TEXT_AUTH_MODE_' . WT_LOCALE, Filter::post('WELCOME_TEXT_AUTH_MODE_4'));
Site::setPreference('USE_REGISTRATION_MODULE', Filter::post('USE_REGISTRATION_MODULE'));
- Site::setPreference('REQUIRE_ADMIN_AUTH_REGISTRATION', Filter::post('REQUIRE_ADMIN_AUTH_REGISTRATION'));
Site::setPreference('SHOW_REGISTER_CAUTION', Filter::post('SHOW_REGISTER_CAUTION'));
FlashMessages::addMessage(I18N::translate('The website preferences have been updated.'), 'success');
}
@@ -466,24 +465,14 @@ $controller->pageHeader();
<!-- USE_REGISTRATION_MODULE -->
<fieldset class="form-group">
<legend class="col-sm-3 control-label">
- <?php echo /* I18N: A site configuration setting */ I18N::translate('Allow visitors to request account registration'); ?>
+ <?php echo /* I18N: A site configuration setting */ I18N::translate('Allow visitors to request a new user account'); ?>
</legend>
<div class="col-sm-9">
<?php echo edit_field_yes_no('USE_REGISTRATION_MODULE', Site::getPreference('USE_REGISTRATION_MODULE')); ?>
<p class="small text-muted">
- <?php echo /* I18N: Help text for the “Allow visitors to request account registration” site configuration setting */ I18N::translate('Gives visitors the option of registering themselves for an account on the website.<br><br>The visitor will receive an email message with a code to verify his application for an account. After verification, an administrator will have to approve the registration before it becomes active.'); ?>
- </p>
- </div>
- </fieldset>
-
- <!-- REQUIRE_ADMIN_AUTH_REGISTRATION -->
- <fieldset class="form-group">
- <legend class="col-sm-3 control-label">
- <?php echo /* I18N: A site configuration setting */ I18N::translate('Require an administrator to approve new user registrations'); ?>
- </legend>
- <div class="col-sm-9">
- <?php echo edit_field_yes_no('REQUIRE_ADMIN_AUTH_REGISTRATION', Site::getPreference('REQUIRE_ADMIN_AUTH_REGISTRATION')); ?>
- <p class="small text-muted">
+ <?php echo I18N::translate('The new user will be asked to confirm their email address before the account is created.'); ?>
+ <?php echo I18N::translate('Details of the new user will be sent to the genealogy contact for the corresponding family tree.'); ?>
+ <?php echo I18N::translate('An administrator must approve the new user account and select an access level before the user can log in.'); ?>
</p>
</div>
</fieldset>
diff --git a/app/Module/ClippingsCartModule.php b/app/Module/ClippingsCartModule.php
index 2959e40dea..d0cab8d1d6 100644
--- a/app/Module/ClippingsCartModule.php
+++ b/app/Module/ClippingsCartModule.php
@@ -70,91 +70,241 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
}
if ($clip_ctrl->action == 'add') {
- $person = GedcomRecord::getInstance($clip_ctrl->id, $WT_TREE);
- echo '<h3><a href="', $person->getHtmlUrl(), '">' . $person->getFullName(), '</a></h3>';
+ $record = GedcomRecord::getInstance($clip_ctrl->id, $WT_TREE);
if ($clip_ctrl->type === 'FAM') { ?>
- <form action="module.php" method="get">
+ <form action="module.php" method="get">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
+ <input type="hidden" name="id" value="<?php echo $clip_ctrl->id; ?>">
+ <input type="hidden" name="type" value="<?php echo $clip_ctrl->type; ?>">
+ <input type="hidden" name="action" value="add1">
<table>
- <tr><td class="topbottombar"><?php echo I18N::translate('Which other links from this family would you like to add?'); ?>
- <input type="hidden" name="id" value="<?php echo $clip_ctrl->id; ?>">
- <input type="hidden" name="type" value="<?php echo $clip_ctrl->type; ?>">
- <input type="hidden" name="action" value="add1"></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" checked value="none"><?php echo I18N::translate('Add just this family record.'); ?></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="parents"><?php echo I18N::translate('Add parents’ records together with this family record.'); ?></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="members"><?php echo I18N::translate('Add parents’ and children’s records together with this family record.'); ?></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="descendants"><?php echo I18N::translate('Add parents’ and all descendants’ records together with this family record.'); ?></td></tr>
- <tr><td class="topbottombar"><input type="submit" value="<?php echo I18N::translate('Continue adding'); ?>"></td></tr>
-
+ <thead>
+ <tr>
+ <td class="topbottombar">
+ <?php echo I18N::translate('Add to the clippings cart'); ?>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="optionbox">
+ <input type="radio" name="others" value="parents">
+ <?php echo $record->getFullName(); ?>
+ </td>
+ </tr>
+ <tr>
+ <td class="optionbox">
+ <input type="radio" name="others" value="members" checked>
+ <?php echo /* I18N: %s is a family (husband + wife) */ I18N::translate('%s and their children', $record->getFullName()); ?>
+ </td>
+ </tr>
+ <tr>
+ <td class="optionbox">
+ <input type="radio" name="others" value="descendants">
+ <?php echo /* I18N: %s is a family (husband + wife) */ I18N::translate('%s and their descendants', $record->getFullName()); ?>
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="topbottombar"><input type="submit" value="<?php echo I18N::translate('continue'); ?>">
+ </td>
+ </tr>
+ </tfoot>
</table>
- </form>
+ </form>
<?php } elseif ($clip_ctrl->type === 'INDI') { ?>
- <form action="module.php" method="get">
+ <form action="module.php" method="get">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
+ <input type="hidden" name="id" value="<?php echo $clip_ctrl->id; ?>">
+ <input type="hidden" name="type" value="<?php echo $clip_ctrl->type; ?>">
+ <input type="hidden" name="action" value="add1"></td></tr>
<table>
- <tr><td class="topbottombar"><?php echo I18N::translate('Which links from this individual would you also like to add?'); ?>
- <input type="hidden" name="id" value="<?php echo $clip_ctrl->id; ?>">
- <input type="hidden" name="type" value="<?php echo $clip_ctrl->type; ?>">
- <input type="hidden" name="action" value="add1"></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" checked value="none"><?php echo I18N::translate('Add just this individual.'); ?></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="parents"><?php echo I18N::translate('Add this individual, his parents, and siblings.'); ?></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="ancestors" id="ancestors"><?php echo I18N::translate('Add this individual and his direct line ancestors.'); ?><br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo I18N::translate('Number of generations'); ?> <input type="text" size="5" name="level1" value="<?php echo $MAX_PEDIGREE_GENERATIONS; ?>" onfocus="radAncestors('ancestors');"></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="ancestorsfamilies" id="ancestorsfamilies"><?php echo I18N::translate('Add this individual, his direct line ancestors, and their families.'); ?><br >
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo I18N::translate('Number of generations'); ?> <input type="text" size="5" name="level2" value="<?php echo $MAX_PEDIGREE_GENERATIONS; ?>" onfocus="radAncestors('ancestorsfamilies');"></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="members"><?php echo I18N::translate('Add this individual, his spouse, and children.'); ?></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="descendants" id="descendants"><?php echo I18N::translate('Add this individual, his spouse, and all descendants.'); ?><br >
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo I18N::translate('Number of generations'); ?> <input type="text" size="5" name="level3" value="<?php echo $MAX_PEDIGREE_GENERATIONS; ?>" onfocus="radAncestors('descendants');"></td></tr>
- <tr><td class="topbottombar"><input type="submit" value="<?php echo I18N::translate('Continue adding'); ?>">
+ <thead>
+ <tr>
+ <td class="topbottombar">
+ <?php echo I18N::translate('Add to the clippings cart'); ?>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="optionbox">
+ <label>
+ <input type="radio" name="others" checked value="none">
+ <?php echo $record->getFullName(); ?>
+ </label>
+ </td>
+ </tr>
+ <tr>
+ <td class="optionbox">
+ <label>
+ <input type="radio" name="others" value="parents">
+ <?php
+ if ($record->getSex() === 'F') {
+ echo /* I18N: %s is a woman's name */ I18N::translate('%s, her parents and siblings', $record->getFullName());
+ } else {
+ echo /* I18N: %s is a man's name */ I18N::translate('%s, his parents and siblings', $record->getFullName());
+ }
+ ?>
+ </label>
+ </td>
+ </tr>
+ <tr>
+ <td class="optionbox">
+ <label>
+ <input type="radio" name="others" value="members">
+ <?php
+ if ($record->getSex() === 'F') {
+ echo /* I18N: %s is a woman's name */ I18N::translate('%s, her spouses and children', $record->getFullName());
+ } else {
+ echo /* I18N: %s is a man's name */ I18N::translate('%s, his spouses and children', $record->getFullName());
+ }
+ ?>
+ </label>
+ </td>
+ </tr>
+ <tr>
+ <td class="optionbox">
+ <label>
+ <input type="radio" name="others" value="ancestors" id="ancestors">
+ <?php
+ if ($record->getSex() === 'F') {
+ echo /* I18N: %s is a woman's name */ I18N::translate('%s and her ancestors', $record->getFullName());
+ } else {
+ echo /* I18N: %s is a man's name */ I18N::translate('%s and his ancestors', $record->getFullName());
+ }
+ ?>
+ </label>
+ <br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <?php echo I18N::translate('Number of generations'); ?>
+ <input type="text" size="5" name="level1" value="<?php echo $MAX_PEDIGREE_GENERATIONS; ?>" onfocus="radAncestors('ancestors');">
+ </td>
+ </tr>
+ <tr>
+ <td class="optionbox">
+ <label>
+ <input type="radio" name="others" value="ancestorsfamilies" id="ancestorsfamilies">
+ <?php
+ if ($record->getSex() === 'F') {
+ echo /* I18N: %s is a woman's name */ I18N::translate('%s, her ancestors and their families', $record->getFullName());
+ } else {
+ echo /* I18N: %s is a man's name */ I18N::translate('%s, his ancestors and their families', $record->getFullName());
+ }
+ ?>
+ </label>
+ <br >
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <?php echo I18N::translate('Number of generations'); ?>
+ <input type="text" size="5" name="level2" value="<?php echo $MAX_PEDIGREE_GENERATIONS; ?>" onfocus="radAncestors('ancestorsfamilies');">
+ </td>
+ </tr>
+ <tr>
+ <td class="optionbox">
+ <label>
+ <input type="radio" name="others" value="descendants" id="descendants">
+ <?php
+ if ($record->getSex() === 'F') {
+ echo /* I18N: %s is a woman's name */ I18N::translate('%s, her spouses and descendants', $record->getFullName());
+ } else {
+ echo /* I18N: %s is a man's name */ I18N::translate('%s, his spouses and descendants', $record->getFullName());
+ }
+ ?>
+ </label>
+ <br >
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <?php echo I18N::translate('Number of generations'); ?>
+ <input type="text" size="5" name="level3" value="<?php echo $MAX_PEDIGREE_GENERATIONS; ?>" onfocus="radAncestors('descendants');">
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="topbottombar">
+ <input type="submit" value="<?php echo I18N::translate('continue'); ?>">
+ </td>
+ </tr>
+ </tfoot>
</table>
- </form>
+ </form>
<?php } elseif ($clip_ctrl->type === 'SOUR') { ?>
- <form action="module.php" method="get">
+ <form action="module.php" method="get">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
+ <input type="hidden" name="id" value="<?php echo $clip_ctrl->id; ?>">
+ <input type="hidden" name="type" value="<?php echo $clip_ctrl->type; ?>">
+ <input type="hidden" name="action" value="add1"></td></tr>
<table>
- <tr><td class="topbottombar"><?php echo I18N::translate('Which records linked to this source should be added?'); ?>
- <input type="hidden" name="id" value="<?php echo $clip_ctrl->id; ?>">
- <input type="hidden" name="type" value="<?php echo $clip_ctrl->type; ?>">
- <input type="hidden" name="action" value="add1"></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" checked value="none"><?php echo I18N::translate('Add just this source.'); ?></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="linked"><?php echo I18N::translate('Add this source and families/individuals linked to it.'); ?></td></tr>
- <tr><td class="topbottombar"><input type="submit" value="<?php echo I18N::translate('Continue adding'); ?>">
+ <thead>
+ <tr>
+ <td class="topbottombar">
+ <?php echo I18N::translate('Add to the clippings cart'); ?>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="optionbox">
+ <label>
+ <input type="radio" name="others" checked value="none">
+ <?php echo $record->getFullName(); ?>
+ </label>
+ </td>
+ </tr>
+ <tr>
+ <td class="optionbox">
+ <label>
+ <input type="radio" name="others" value="linked">
+ <?php echo /* I18N: %s is the name of a source */ I18N::translate('%s and the individuals that reference it.', $record->getFullName()); ?>
+ </label>
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="topbottombar">
+ <input type="submit" value="<?php echo I18N::translate('continue'); ?>">
+ </td>
+ </tr>
+ </tfoot>
</table>
- </form>
+ </form>
<?php }
}
if (!$WT_SESSION->cart[$WT_TREE->getTreeId()]) {
if ($clip_ctrl->action != 'add') {
-
echo I18N::translate('The clippings cart allows you to take extracts (“clippings”) from this family tree and bundle them up into a single file for downloading and subsequent importing into your own genealogy program. The downloadable file is recorded in GEDCOM format.<br><ul><li>How to take clippings?<br>This is really simple. Whenever you see a clickable name (individual, family, or source) you can go to the Details page of that name. There you will see the <b>Add to clippings cart</b> option. When you click that link you will be offered several options to download.</li><li>How to download?<br>Once you have items in your cart, you can download them just by clicking the “Download” link. Follow the instructions and links.</li></ul>');
?>
<form method="get" name="addin" action="module.php">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
- <table>
- <tr>
- <td colspan="2" class="topbottombar" style="text-align:center; ">
- <?php echo I18N::translate('Enter an individual, family, or source ID'); ?>
- </td>
- </tr>
- <tr>
- <td class="optionbox">
- <input type="hidden" name="action" value="add">
- <input type="text" data-autocomplete-type="IFSRO" name="id" id="cart_item_id" size="5">
- </td>
- <td class="optionbox">
- <?php echo print_findindi_link('cart_item_id'); ?>
- <?php echo print_findfamily_link('cart_item_id'); ?>
- <?php echo print_findsource_link('cart_item_id', ''); ?>
- <input type="submit" value="<?php echo I18N::translate('Add'); ?>">
-
- </td>
- </tr>
- </table>
+ <table>
+ <thead>
+ <tr>
+ <td colspan="2" class="topbottombar">
+ <?php echo I18N::translate('Add to the clippings cart'); ?>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="optionbox">
+ <input type="hidden" name="action" value="add">
+ <input type="text" data-autocomplete-type="IFSRO" name="id" id="cart_item_id" size="5">
+ </td>
+ <td class="optionbox">
+ <?php echo print_findindi_link('cart_item_id'); ?>
+ <?php echo print_findfamily_link('cart_item_id'); ?>
+ <?php echo print_findsource_link('cart_item_id', ''); ?>
+ <input type="submit" value="<?php echo I18N::translate('Add'); ?>">
+ </td>
+ </tr>
+ </tbody>
+ </table>
</form>
<?php
}
@@ -225,28 +375,31 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
<br>
<form method="get" name="addin" action="module.php">
- <input type="hidden" name="mod" value="clippings">
- <input type="hidden" name="mod_action" value="index">
- <table>
- <tr>
- <td colspan="2" class="topbottombar" style="text-align:center; ">
- <?php echo I18N::translate('Enter an individual, family, or source ID'); ?>
- </td>
- </tr>
- <tr>
- <td class="optionbox">
- <input type="hidden" name="action" value="add">
- <input type="text" data-autocomplete-type="IFSRO" name="id" id="cart_item_id" size="8">
- </td>
- <td class="optionbox">
- <?php echo print_findindi_link('cart_item_id'); ?>
- <?php echo print_findfamily_link('cart_item_id'); ?>
- <?php echo print_findsource_link('cart_item_id'); ?>
- <input type="submit" value="<?php echo I18N::translate('Add'); ?>">
-
- </td>
- </tr>
- </table>
+ <input type="hidden" name="mod" value="clippings">
+ <input type="hidden" name="mod_action" value="index">
+ <table>
+ <thead>
+ <tr>
+ <td colspan="2" class="topbottombar" style="text-align:center; ">
+ <?php echo I18N::translate('Add to the clippings cart'); ?>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="optionbox">
+ <input type="hidden" name="action" value="add">
+ <input type="text" data-autocomplete-type="IFSRO" name="id" id="cart_item_id" size="8">
+ </td>
+ <td class="optionbox">
+ <?php echo print_findindi_link('cart_item_id'); ?>
+ <?php echo print_findfamily_link('cart_item_id'); ?>
+ <?php echo print_findsource_link('cart_item_id'); ?>
+ <input type="submit" value="<?php echo I18N::translate('Add'); ?>">
+ </td>
+ </tr>
+ </tbody>
+ </table>
</form>
@@ -318,7 +471,7 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
$menu->addSubmenu($submenu);
}
if (!empty($controller->record) && $controller->record->canShow()) {
- $submenu = new Menu(I18N::translate('Add to clippings cart'), 'module.php?mod=clippings&amp;mod_action=index&amp;action=add&amp;id=' . $controller->record->getXref(), 'menu-clippingsadd');
+ $submenu = new Menu(I18N::translate('Add to the clippings cart'), 'module.php?mod=clippings&amp;mod_action=index&amp;action=add&amp;id=' . $controller->record->getXref(), 'menu-clippingsadd');
$menu->addSubmenu($submenu);
}
return $menu;
@@ -475,80 +628,6 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
}
/**
- * @param Individual $person
- *
- * @return string
- */
- public function askAddOptions(Individual $person) {
- $MAX_PEDIGREE_GENERATIONS = $person->getTree()->getPreference('MAX_PEDIGREE_GENERATIONS');
-
- $out = '<h3><a href="' . $person->getHtmlUrl() . '">' . $person->getFullName() . '</a></h3>';
- $out .= '<script>';
- $out .= 'function radAncestors(elementid) {var radFamilies=document.getElementById(elementid);radFamilies.checked=true;}
- function continueAjax(frm) {
- var others = jQuery("input[name=\'others\']:checked").val();
- var link = "module.php?mod='.$this->getName() . '&mod_action=ajax&sb_action=clippings&add1="+frm.pid.value+"&others="+others+"&level1="+frm.level1.value+"&level2="+frm.level2.value+"&level3="+frm.level3.value;
- jQuery("#sb_clippings_content").load(link);
- }';
- $out .= '</script>';
- if ($person instanceof Family) {
- $out .= '<form action="module.php" method="get" onsubmit="continueAjax(this); return false;">
- <input type="hidden" name="mod" value="clippings">
- <input type="hidden" name="mod_action" value="index">
- <table>
- <tr><td class="topbottombar">' . I18N::translate('Which other links from this family would you like to add?') . '
- <input type="hidden" name="pid" value="'.$person->getXref() . '">
- <input type="hidden" name="type" value="'.$person::RECORD_TYPE . '">
- <input type="hidden" name="action" value="add1"></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" checked value="none">'. I18N::translate('Add just this family record.') . '</td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="parents">'. I18N::translate('Add parents’ records together with this family record.') . '</td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="members">'. I18N::translate('Add parents’ and children’s records together with this family record.') . '</td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="descendants">'. I18N::translate('Add parents’ and all descendants’ records together with this family record.') . '</td></tr>
- <tr><td class="topbottombar"><input type="submit" value="'. I18N::translate('Continue adding') . '"></td></tr>
- </table>
- </form>';
- } elseif ($person instanceof Individual) {
- $out .= '<form action="module.php" method="get" onsubmit="continueAjax(this); return false;">
- <input type="hidden" name="mod" value="clippings">
- <input type="hidden" name="mod_action" value="index">
- ' . I18N::translate('Which links from this individual would you also like to add?') . '
- <input type="hidden" name="pid" value="'.$person->getXref() . '">
- <input type="hidden" name="type" value="'.$person::RECORD_TYPE . '">
- <input type="hidden" name="action" value="add1">
- <ul>
- <li><input type="radio" name="others" checked value="none">'. I18N::translate('Add just this individual.') . '</li>
- <li><input type="radio" name="others" value="parents">'. I18N::translate('Add this individual, his parents, and siblings.') . '</li>
- <li><input type="radio" name="others" value="ancestors" id="ancestors">'. I18N::translate('Add this individual and his direct line ancestors.') . '<br>
- '. I18N::translate('Number of generations') . '<input type="text" size="4" name="level1" value="' . $MAX_PEDIGREE_GENERATIONS . '" onfocus="radAncestors(\'ancestors\');"></li>
- <li><input type="radio" name="others" value="ancestorsfamilies" id="ancestorsfamilies">'. I18N::translate('Add this individual, his direct line ancestors, and their families.') . '<br>
- '. I18N::translate('Number of generations') . ' <input type="text" size="4" name="level2" value="' . $MAX_PEDIGREE_GENERATIONS . '" onfocus="radAncestors(\'ancestorsfamilies\');"></li>
- <li><input type="radio" name="others" value="members">'. I18N::translate('Add this individual, his spouse, and children.') . '</li>
- <li><input type="radio" name="others" value="descendants" id="descendants">'. I18N::translate('Add this individual, his spouse, and all descendants.') . '<br >
- '. I18N::translate('Number of generations') . ' <input type="text" size="4" name="level3" value="' . $MAX_PEDIGREE_GENERATIONS . '" onfocus="radAncestors(\'descendants\');"></li>
- </ul>
- <input type="submit" value="'. I18N::translate('Continue adding') . '">
- </form>';
- } else if ($person instanceof Source) {
- $out .= '<form action="module.php" method="get" onsubmit="continueAjax(this); return false;">
- <input type="hidden" name="mod" value="clippings">
- <input type="hidden" name="mod_action" value="index">
- <table>
- <tr><td class="topbottombar">' . I18N::translate('Which records linked to this source should be added?') . '
- <input type="hidden" name="pid" value="'.$person->getXref() . '">
- <input type="hidden" name="type" value="'.$person::RECORD_TYPE . '">
- <input type="hidden" name="action" value="add1"></td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" checked value="none">'. I18N::translate('Add just this source.') . '</td></tr>
- <tr><td class="optionbox"><input type="radio" name="others" value="linked">'. I18N::translate('Add this source and families/individuals linked to it.') . '</td></tr>
- <tr><td class="topbottombar"><input type="submit" value="'. I18N::translate('Continue adding') . '">
- </table>
- </form>';
- } else {
- return $this->getSidebarContent();
- }
- return $out;
- }
-
- /**
* @param ClippingsCart $clip_ctrl
*
* @return string
diff --git a/includes/db_schema/db_schema_29_30.php b/includes/db_schema/db_schema_29_30.php
index 2f318f5123..7a2c626019 100644
--- a/includes/db_schema/db_schema_29_30.php
+++ b/includes/db_schema/db_schema_29_30.php
@@ -29,8 +29,9 @@ try {
}
// No longer used
-Database::exec("DELETE FROM `##user_setting` WHERE setting_name in ('edit_account')");
-Database::exec("DELETE FROM `##gedcom_setting` WHERE setting_name in ('SHOW_STATS')");
+Database::exec("DELETE FROM `##user_setting` WHERE setting_name IN ('edit_account')");
+Database::exec("DELETE FROM `##gedcom_setting` WHERE setting_name IN ('SHOW_STATS')");
+Database::exec("DELETE FROM `##site_setting` WHERE setting_name IN ('REQUIRE_ADMIN_AUTH_REGISTRATION')");
// https://bugs.launchpad.net/webtrees/+bug/1405672
Database::exec(
diff --git a/login.php b/login.php
index 526321a844..5229df7bf9 100644
--- a/login.php
+++ b/login.php
@@ -42,8 +42,6 @@ if (Auth::check() && $WT_TREE) {
$controller = new PageController;
-$REQUIRE_ADMIN_AUTH_REGISTRATION = Site::getPreference('REQUIRE_ADMIN_AUTH_REGISTRATION');
-
$action = Filter::post('action');
$user_realname = Filter::post('user_realname');
$user_name = Filter::post('user_name');
@@ -299,7 +297,7 @@ case 'register':
$user
->setPreference('language', WT_LOCALE)
->setPreference('verified', '0')
- ->setPreference('verified_by_admin', !$REQUIRE_ADMIN_AUTH_REGISTRATION)
+ ->setPreference('verified_by_admin', 0)
->setPreference('reg_timestamp', date('U'))
->setPreference('reg_hashcode', md5(Uuid::uuid4()))
->setPreference('contactmethod', 'messaging2')
@@ -321,13 +319,9 @@ case 'register':
I18N::translate('Real name') . ' ' . $user->getRealNameHtml() . Mail::EOL .
I18N::translate('Email address') . ' ' . Filter::escapeHtml($user->getEmail()) . Mail::EOL .
I18N::translate('Comments') . ' ' . Filter::escapeHtml($user_comments) . Mail::EOL . Mail::EOL .
- I18N::translate('The user has been sent an e-mail with the information necessary to confirm the access request.') . Mail::EOL . Mail::EOL;
- if ($REQUIRE_ADMIN_AUTH_REGISTRATION) {
- $mail1_body .= I18N::translate('You will be informed by e-mail when this prospective user has confirmed the request. You can then complete the process by activating the user name. The new user will not be able to login until you activate the account.');
- } else {
- $mail1_body .= I18N::translate('You will be informed by e-mail when this prospective user has confirmed the request. After this, the user will be able to login without any action on your part.');
- }
- $mail1_body .= Mail::auditFooter();
+ I18N::translate('The user has been sent an e-mail with the information necessary to confirm the access request.') . Mail::EOL . Mail::EOL .
+ I18N::translate('You will be informed by e-mail when this prospective user has confirmed the request. You can then complete the process by activating the user name. The new user will not be able to login until you activate the account.') .
+ Mail::auditFooter();
$mail1_subject = /* I18N: %s is a server name/URL */ I18N::translate('New registration at %s', WT_BASE_URL . ' ' . $WT_TREE->title());
I18N::init(WT_LOCALE);
@@ -387,14 +381,9 @@ case 'register':
->execute(array($user->getEmail(), $WT_REQUEST->getClientIp(), $webmaster->getUserId(), $mail1_subject, Filter::unescapeHtml($mail1_body)));
}
- echo '<div class="confirm"><p>', I18N::translate('Hello %s…<br>Thank you for your registration.', $user->getRealNameHtml()), '</p><p>';
- if ($REQUIRE_ADMIN_AUTH_REGISTRATION) {
- echo I18N::translate('We will now send a confirmation email to the address <b>%s</b>. You must verify your account request by following instructions in the confirmation email. If you do not confirm your account request within seven days, your application will be rejected automatically. You will have to apply again.<br><br>After you have followed the instructions in the confirmation email, the administrator still has to approve your request before your account can be used.<br><br>To login to this website, you will need to know your user name and password.', $user->getEmail());
- } else {
- echo I18N::translate('We will now send a confirmation email to the address <b>%s</b>. You must verify your account request by following instructions in the confirmation email. If you do not confirm your account request within seven days, your application will be rejected automatically. You will have to apply again.<br><br>After you have followed the instructions in the confirmation email, you can login. To login to this website, you will need to know your user name and password.', $user->getEmail());
- }
- echo '</p>
- </div>';
+ echo '<div class="confirm"><p>', I18N::translate('Hello %s…<br>Thank you for your registration.', $user->getRealNameHtml()), '</p>';
+ echo '<p>', I18N::translate('We will now send a confirmation email to the address <b>%s</b>. You must verify your account request by following instructions in the confirmation email. If you do not confirm your account request within seven days, your application will be rejected automatically. You will have to apply again.<br><br>After you have followed the instructions in the confirmation email, the administrator still has to approve your request before your account can be used.<br><br>To login to this website, you will need to know your user name and password.', $user->getEmail()), '</p>';
+ echo '</div>';
echo '</div>';
return;
@@ -562,19 +551,15 @@ case 'verify_hash':
$user = User::findByIdentifier($user_name);
$mail1_body =
- I18N::translate('Hello administrator…') . Mail::EOL . Mail::EOL .
+ I18N::translate('Hello administrator…') .
+ Mail::EOL . Mail::EOL .
/* I18N: %1$s is a real-name, %2$s is a username, %3$s is an email address */ I18N::translate(
'A new user (%1$s) has requested an account (%2$s) and verified an email address (%3$s).',
$user->getRealNameHtml(),
Filter::escapeHtml($user->getUserName()),
Filter::escapeHtml($user->getEmail())
- ) . Mail::EOL . Mail::EOL;
- if ($REQUIRE_ADMIN_AUTH_REGISTRATION && !$user->getPreference('verified_by_admin')) {
- $mail1_body .= I18N::translate('You now need to review the account details, and set the “approved” status to “yes”.');
- } else {
- $mail1_body .= I18N::translate('You do not have to take any action; the user can now login.');
- }
- $mail1_body .=
+ ) . Mail::EOL . Mail::EOL .
+ I18N::translate('You now need to review the account details, and set the “approved” status to “yes”.') .
Mail::EOL .
'<a href="' . WT_BASE_URL . "admin_users.php?filter=" . Filter::escapeUrl($user->getUserName()) . '">' .
WT_BASE_URL . "admin_users.php?filter=" . Filter::escapeUrl($user->getUserName()) .
@@ -617,17 +602,10 @@ case 'verify_hash':
->setPreference('reg_timestamp', date('U'))
->deletePreference('reg_hashcode');
- if (!$REQUIRE_ADMIN_AUTH_REGISTRATION) {
- $user->setPreference('verified_by_admin', '1');
- }
Log::addAuthenticationLog('User ' . $user_name . ' verified their email address');
echo '<p>', I18N::translate('You have confirmed your request to become a registered user.'), '</p>';
- if ($REQUIRE_ADMIN_AUTH_REGISTRATION && !$user->getPreference('verified_by_admin')) {
- echo '<p>', I18N::translate('The administrator has been informed. As soon as they give you permission to login, you can login with your user name and password.'), '</p>';
- } else {
- echo '<p>', I18N::translate('You can now login with your user name and password.'), '</p>';
- }
+ echo '<p>', I18N::translate('The administrator has been informed. As soon as they give you permission to login, you can login with your user name and password.'), '</p>';
} else {
echo '<p class="warning">';
echo I18N::translate('Could not verify the information you entered. Please try again or contact the site administrator for more information.');
diff --git a/setup.php b/setup.php
index 02aa4e1202..eb5da92f69 100644
--- a/setup.php
+++ b/setup.php
@@ -878,7 +878,6 @@ try {
"('WT_SCHEMA_VERSION', '-2')," .
"('INDEX_DIRECTORY', 'data/')," .
"('USE_REGISTRATION_MODULE', '1')," .
- "('REQUIRE_ADMIN_AUTH_REGISTRATION', '1')," .
"('ALLOW_USER_THEMES', '1')," .
"('ALLOW_CHANGE_GEDCOM', '1')," .
"('SESSION_TIME', '7200')," .