diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-06-20 21:43:43 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-06-20 21:43:43 +0000 |
| commit | 7505c7796345b06444ad7a7462d683d107c80aab (patch) | |
| tree | 0df5d8df22ef05ada5ed163bfdaec4a29d53fbaf /modules | |
| parent | 614e7bdf7c212aa97562bd79fab7d7f44582421a (diff) | |
| download | webtrees-7505c7796345b06444ad7a7462d683d107c80aab.tar.gz webtrees-7505c7796345b06444ad7a7462d683d107c80aab.tar.bz2 webtrees-7505c7796345b06444ad7a7462d683d107c80aab.zip | |
Delete googlemap schema update - it was only used to upgrade an old version of PGV. It is not needed in webtrees
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/googlemap/db_schema/db_schema_1_2.php | 86 | ||||
| -rw-r--r-- | modules/googlemap/defaultconfig.php | 2 |
2 files changed, 1 insertions, 87 deletions
diff --git a/modules/googlemap/db_schema/db_schema_1_2.php b/modules/googlemap/db_schema/db_schema_1_2.php deleted file mode 100644 index 609ec27738..0000000000 --- a/modules/googlemap/db_schema/db_schema_1_2.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * Update the GM module database schema from version 1 to version 2 - * - * Version 0: empty database - * Version 1: create the tables, as per PGV 4.2.1 - * Version 2: move the configuration from config.php (PGV 4.2.3 and earlier) to the pgv_site_setting table - * - * The script should assume that it can be interrupted at - * any point, and be able to continue by re-running the script. - * Fatal errors, however, should be allowed to throw exceptions, - * which will be caught by the framework. - * It shouldn't do anything that might take more than a few - * seconds, for systems with low timeout values. - * - * webtrees: Web based Family History software - * Copyright (C) 2010 webtrees development team. - * - * Derived from PhpGedView - * Copyright (C) 2009 Greg Roach - * - * 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$ - */ - -if (!defined('WT_WEBTREES')) { -header('HTTP/1.0 403 Forbidden'); -exit; -} - -define('WT_GM_DB_SCHEMA_1_2', ''); - -if (file_exists(WT_ROOT.'modules/googlemap/config.php')) { - // Use @, in case the config.php file is incomplete/corrupt - @require WT_ROOT.'modules/googlemap/config.php'; - // Rename settings from GOOGLEMAP_ to GM_ for consistency. - @set_module_setting('googlemap', 'GM_ENABLED', (int)$GOOGLEMAP_ENABLED); - @set_module_setting('googlemap', 'GM_API_KEY', $GOOGLEMAP_API_KEY); - @set_module_setting('googlemap', 'GM_MAP_TYPE', $GOOGLEMAP_MAP_TYPE); - @set_module_setting('googlemap', 'GM_MIN_ZOOM', $GOOGLEMAP_MIN_ZOOM); - @set_module_setting('googlemap', 'GM_MAX_ZOOM', $GOOGLEMAP_MAX_ZOOM); - @set_module_setting('googlemap', 'GM_XSIZE', $GOOGLEMAP_XSIZE); - @set_module_setting('googlemap', 'GM_YSIZE', $GOOGLEMAP_YSIZE); - @set_module_setting('googlemap', 'GM_PRECISION_0', $GOOGLEMAP_PRECISION_0); - @set_module_setting('googlemap', 'GM_PRECISION_1', $GOOGLEMAP_PRECISION_1); - @set_module_setting('googlemap', 'GM_PRECISION_2', $GOOGLEMAP_PRECISION_2); - @set_module_setting('googlemap', 'GM_PRECISION_3', $GOOGLEMAP_PRECISION_3); - @set_module_setting('googlemap', 'GM_PRECISION_4', $GOOGLEMAP_PRECISION_4); - @set_module_setting('googlemap', 'GM_PRECISION_5', $GOOGLEMAP_PRECISION_5); - @set_module_setting('googlemap', 'GM_DEFAULT_TOP_VALUE', $GM_DEFAULT_TOP_VALUE); - @set_module_setting('googlemap', 'GM_MAX_NOF_LEVELS', $GM_MAX_NOF_LEVELS); - @set_module_setting('googlemap', 'GM_COORD', (int)$GOOGLEMAP_COORD); - @set_module_setting('googlemap', 'GM_PLACE_HIERARCHY', (int)$GOOGLEMAP_PLACE_HIERARCHY); - @set_module_setting('googlemap', 'GM_PH_XSIZE', $GOOGLEMAP_PH_XSIZE); - @set_module_setting('googlemap', 'GM_PH_YSIZE', $GOOGLEMAP_PH_YSIZE); - @set_module_setting('googlemap', 'GM_PH_MARKER', $GOOGLEMAP_PH_MARKER); - @set_module_setting('googlemap', 'GM_DISP_SHORT_PLACE', (int)$GM_DISP_SHORT_PLACE); - @set_module_setting('googlemap', 'GM_PH_WHEEL', (int)$GOOGLEMAP_PH_WHEEL); - @set_module_setting('googlemap', 'GM_PH_CONTROLS', (int)$GOOGLEMAP_PH_CONTROLS); - @set_module_setting('googlemap', 'GM_DISP_COUNT', (int)$GM_DISP_COUNT); - - for ($i=1; $i<=9; $i++) { - @set_module_setting('googlemap', 'GM_MARKER_COLOR_'.$i, $GM_MARKER_COLOR[$i]); - @set_module_setting('googlemap', 'GM_MARKER_SIZE_'.$i, $GM_MARKER_SIZE[$i]); - @set_module_setting('googlemap', 'GM_PREFIX_'.$i, $GM_PREFIX[$i]); - @set_module_setting('googlemap', 'GM_POSTFIX_'.$i, $GM_POSTFIX[$i]); - @set_module_setting('googlemap', 'GM_PRE_POST_MODE_'.$i, $GM_PRE_POST_MODE[$i]); - } - @unlink(WT_ROOT.'modules/googlemap/config.php'); -} - -// Update the version to indicate sucess -set_site_setting($schema_name, $next_version); diff --git a/modules/googlemap/defaultconfig.php b/modules/googlemap/defaultconfig.php index 7d9b1e1228..97eb247ed7 100644 --- a/modules/googlemap/defaultconfig.php +++ b/modules/googlemap/defaultconfig.php @@ -34,7 +34,7 @@ if (!defined('WT_WEBTREES')) { // Create GM tables, if not already present try { - WT_DB::updateSchema('./modules/googlemap/db_schema/', 'GM_SCHEMA_VERSION', 2); + WT_DB::updateSchema('./modules/googlemap/db_schema/', 'GM_SCHEMA_VERSION', 1); } catch (PDOException $ex) { // The schema update scripts should never fail. If they do, there is no clean recovery. die($ex); |
