diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-04-22 20:11:10 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-04-22 20:11:10 +0000 |
| commit | 92a0fc999fa7cbe7371a396e867648e686cf66b5 (patch) | |
| tree | 094eb0ad2209520c64134eefdd897fb1e099d3fa | |
| parent | 88a81ef828d1ed9034e243811348893c89d2d862 (diff) | |
| download | webtrees-92a0fc999fa7cbe7371a396e867648e686cf66b5.tar.gz webtrees-92a0fc999fa7cbe7371a396e867648e686cf66b5.tar.bz2 webtrees-92a0fc999fa7cbe7371a396e867648e686cf66b5.zip | |
Remove references to old/unused modules, install.php and config_download.php (both superceded by new setup.php)
| -rw-r--r-- | config_download.php | 45 | ||||
| -rw-r--r-- | editconfig_gedcom.php | 2 | ||||
| -rw-r--r-- | help_text.php | 6 | ||||
| -rw-r--r-- | includes/classes/class_wt_db.php | 2 | ||||
| -rw-r--r-- | includes/session.php | 37 |
5 files changed, 15 insertions, 77 deletions
diff --git a/config_download.php b/config_download.php deleted file mode 100644 index e8d5f0025e..0000000000 --- a/config_download.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/** -* Download config files that could not be saved. -* -* webtrees: Web based Family History software - * Copyright (C) 2010 webtrees development team. - * - * Derived from PhpGedView -* Copyright (C) 2002 to 2009 PGV Development Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* @version $Id$ -* @package webtrees -* @subpackage Admin -*/ - -define('WT_SCRIPT_NAME', 'config_download.php'); -require './includes/session.php'; - -if (WT_ADMIN_USER_EXISTS && !WT_USER_IS_ADMIN && $CONFIGURED) { - header('Location: admin.php'); - exit; -} - -$file=safe_GET('file', WT_REGEX_NOSCRIPT, 'config.php'); - -header('Content-Type: text/plain'); -header('Content-Disposition: attachment; filename="'.$file.'"'); - -echo $_SESSION[$file]; - -?> diff --git a/editconfig_gedcom.php b/editconfig_gedcom.php index 1b7d0b7afa..0d8ac0d7fd 100644 --- a/editconfig_gedcom.php +++ b/editconfig_gedcom.php @@ -477,8 +477,6 @@ if ($action=="update") { if (!is_writable($whichFile)) { $errors = true; $error_msg .= "<span class=\"error\"><b>".i18n::translate('E R R O R !!!<br />Could not write to file <i>%s</i>. Please check it for proper Write permissions.', $whichFile)."</b></span><br />"; - $_SESSION[$gedcom_config]=$configtext; - $error_msg .= "<br /><br /><a href=\"".encode_url("config_download.php?file={$gedcom_config}")."\">".i18n::translate('Download GEDCOM configuration.')."</a> ".i18n::translate('Upload the file to your index directory: ')."$INDEX_DIRECTORY<br /><br />\n"; } $fp = @fopen($whichFile, "wb"); if (!$fp) { diff --git a/help_text.php b/help_text.php index 29a57e1ab1..07c087529d 100644 --- a/help_text.php +++ b/help_text.php @@ -3133,12 +3133,6 @@ case 'individual.php': $text=i18n::translate('All details of a person are displayed on this page.<br /><br />If there is a picture available, you will see it at the top left side. You will see the names of the person next to the picture.<br /><br />Names can have notes and sources attached to them. If any of the names have notes or sources, you will see them listed under the names they relate to.<br /><br />A person might have an AKA (maybe he\'s known under another name). If that is the case, it will be displayed.<br /><br />If you have Edit rights to this person, you will also see <b>Edit</b> and <b>Delete</b> links next to the items that you can edit.<br /><br />On this page you see tab sheets for <b>Personal Facts and Details</b>, <b>Notes</b>, <b>Sources</b>, <b>Media</b>, and <b>Close Relatives</b>. These tab sheets show you all the information about this individual that is stored in the database.<br /><ul><li>The <b>Personal Facts and Details</b> tab will show you the facts and details about this person and any fact from their marriages. Clicking on any date on this tab will take you to the Anniversary Calendar for that date, so that you can see other events that happened on the same day. Clicking on a place will take you to the Place Hierarchy where you can view other people who had events in the same place. For marriage and other family related facts, the name of the person\'s spouse is available so that you can view the spouse and a link to the family record is also provided.</li><li>The <b>Notes</b> tab will show you any general notes relating to this person.</li><li>The <b>Sources</b> tab will show you all of the <u>general</u> sources for this person. These sources are <u>not</u> linked to individual facts, not even the person\'s name; they are associated with the individual himself. Clicking on the title of a source will take you to a more detailed Source Information page that will display other people who are also linked to the same source.</li><li>The <b>Media</b> tab will list all of the pictures and other media items that are attached to this individual. Clicking on a thumbnail of the picture will open up a larger view of the image. Clicking on the picture caption will show you the picture on the MultiMedia page.</li><li>The <b>Close Relatives</b> tab lists this person\'s parents and siblings as well as all of the spouses and children that this person has had. These persons will be listed in boxes similar to the charts that you may have already seen.</li></ul>On the right of the screen you will find a box with links. Many of the links in the box are the same as the links in the menus. For example, clicking on the <b>Pedigree Chart</b> link on the side links will take you to the Pedigree chart for this person. This is different from the menu links, because clicking on the <b>Pedigree Chart</b> link in the menu will take you back to the default Pedigree chart for this database.<br /><br />One of the links that might appear in this list if it has been enabled by the admin, is the <b>View GEDCOM Record</b> link. This link will show you the raw GEDCOM record of this individual.<br /><br />If the Clippings Cart has been enabled by the site admin, you will also have a link that will allow you to add this person to your Clippings Cart.<br /><br />The <b>Relationship to me</b> link will only appear if you are logged in and have been assigned an ID in the GEDCOM. This link will take you to the Pedigree chart and show you how you are related to this person.<br /><br />More help is available by clicking the <b>?</b> next to items on the page.'); break; -case 'install.php': - // no help link - $title=i18n::translate('Installation wizard'); - $text=''; - break; - case 'inverselink.php': $title=i18n::translate('Link media'); $text=i18n::translate('Each media item should be associated with one or more person, family, or source records in your database.<br /><br />To establish such a link, you can enter or search for the ID of the person, family, or source at the same time as you create the media item. You can also establish the link later through editing options on the Manage MultiMedia page, or by adding media items through the Add Media link available on the Individual, Family, or Source Details pages.'); diff --git a/includes/classes/class_wt_db.php b/includes/classes/class_wt_db.php index 35b16a77ee..ecb5865a41 100644 --- a/includes/classes/class_wt_db.php +++ b/includes/classes/class_wt_db.php @@ -85,7 +85,7 @@ class WT_DB { trigger_error('WT_DB::unserialize() is not allowed.', E_USER_ERROR); } - // Disconnect from the server, so we can connect to another one during install.php + // Disconnect from the server, so we can connect to another one public static function disconnect() { self::$pdo=null; } diff --git a/includes/session.php b/includes/session.php index 41cd2eeedd..0c68fb548c 100644 --- a/includes/session.php +++ b/includes/session.php @@ -392,23 +392,18 @@ try { require WT_ROOT.'includes/functions/functions_privacy.php'; // The current user's profile - from functions in authentication.php -define('WT_USER_ID', getUserId()); -if (WT_DB::isConnected()) { - define('WT_USER_NAME', getUserName ()); - define('WT_USER_IS_ADMIN', userIsAdmin (WT_USER_ID)); - define('WT_USER_AUTO_ACCEPT', userAutoAccept(WT_USER_ID)); - define('WT_ADMIN_USER_EXISTS', WT_USER_IS_ADMIN || adminUserExists()); - define('WT_USER_GEDCOM_ADMIN', WT_USER_IS_ADMIN || userGedcomAdmin(WT_USER_ID, WT_GED_ID)); - define('WT_USER_CAN_ACCEPT', WT_USER_GEDCOM_ADMIN || userCanAccept (WT_USER_ID, WT_GED_ID)); - define('WT_USER_CAN_EDIT', WT_USER_CAN_ACCEPT || userCanEdit (WT_USER_ID, WT_GED_ID)); - define('WT_USER_CAN_ACCESS', WT_USER_CAN_EDIT || userCanAccess (WT_USER_ID, WT_GED_ID)); - define('WT_USER_ACCESS_LEVEL', getUserAccessLevel(WT_USER_ID, WT_GED_ID)); - define('WT_USER_GEDCOM_ID', getUserGedcomId (WT_USER_ID, WT_GED_ID)); - define('WT_USER_ROOT_ID', getUserRootId (WT_USER_ID, WT_GED_ID)); -} else { - // No DB? Just set the basics, for install.php - define('WT_ADMIN_USER_EXISTS', false); -} +define('WT_USER_ID', getUserId ()); +define('WT_USER_NAME', getUserName()); +define('WT_USER_IS_ADMIN', userIsAdmin (WT_USER_ID)); +define('WT_USER_AUTO_ACCEPT', userAutoAccept(WT_USER_ID)); +define('WT_ADMIN_USER_EXISTS', WT_USER_IS_ADMIN || adminUserExists()); +define('WT_USER_GEDCOM_ADMIN', WT_USER_IS_ADMIN || userGedcomAdmin(WT_USER_ID, WT_GED_ID)); +define('WT_USER_CAN_ACCEPT', WT_USER_GEDCOM_ADMIN || userCanAccept (WT_USER_ID, WT_GED_ID)); +define('WT_USER_CAN_EDIT', WT_USER_CAN_ACCEPT || userCanEdit (WT_USER_ID, WT_GED_ID)); +define('WT_USER_CAN_ACCESS', WT_USER_CAN_EDIT || userCanAccess (WT_USER_ID, WT_GED_ID)); +define('WT_USER_ACCESS_LEVEL', getUserAccessLevel(WT_USER_ID, WT_GED_ID)); +define('WT_USER_GEDCOM_ID', getUserGedcomId (WT_USER_ID, WT_GED_ID)); +define('WT_USER_ROOT_ID', getUserRootId (WT_USER_ID, WT_GED_ID)); // If we are logged in, and logout=1 has been added to the URL, log out if (WT_USER_ID && safe_GET_bool('logout')) { @@ -427,13 +422,9 @@ if (!isset($_SESSION['pgv_user'])) $_SESSION['pgv_user'] = ''; if (isset($SHOW_CONTEXT_HELP) && $show_context_help==='yes') $_SESSION['show_context_help'] = true; if (isset($SHOW_CONTEXT_HELP) && $show_context_help==='no') $_SESSION['show_context_help'] = false; if (!isset($USE_THUMBS_MAIN)) $USE_THUMBS_MAIN = false; -if (WT_SCRIPT_NAME!='install.php' && WT_SCRIPT_NAME!='help_text.php') { - if (!WT_DB::isConnected() || !WT_ADMIN_USER_EXISTS) { - header('Location: install.php'); - exit; - } - if (!get_gedcom_setting(WT_GED_ID, 'imported') && !in_array(WT_SCRIPT_NAME, array('editconfig_gedcom.php', 'help_text.php', 'editgedcoms.php', 'downloadgedcom.php', 'uploadgedcom.php', 'login.php', 'siteconfig.php', 'admin.php', 'config_download.php', 'addnewgedcom.php', 'validategedcom.php', 'addmedia.php', 'importgedcom.php', 'client.php', 'edit_privacy.php', 'gedcheck.php', 'useradmin.php', 'export_gedcom.php', 'edit_changes.php'))) { +if (WT_SCRIPT_NAME!='help_text.php') { + if (!get_gedcom_setting(WT_GED_ID, 'imported') && !in_array(WT_SCRIPT_NAME, array('editconfig_gedcom.php', 'help_text.php', 'editgedcoms.php', 'downloadgedcom.php', 'uploadgedcom.php', 'login.php', 'siteconfig.php', 'admin.php', 'addnewgedcom.php', 'validategedcom.php', 'addmedia.php', 'importgedcom.php', 'client.php', 'edit_privacy.php', 'gedcheck.php', 'useradmin.php', 'export_gedcom.php', 'edit_changes.php'))) { header('Location: editgedcoms.php'); exit; } |
