PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wp-google-maps
/
includes
<?php namespace WPGMZA; class Upgrader { public function upgrade($fromVersion) { // NB: We don't use the global plugin object here because it's not initialised yet $settings = new GlobalSettings(); if(preg_match('/^7\./', $fromVersion)) { // Legacy style for upgrading users $settings->user_interface_style = "legacy"; } if(preg_match('/^8\./', $fromVersion)) { // Legacy build for users upgrading (They will be prompted to switch if they want to) $settings->internal_engine = "legacy"; } add_action('init', function() { global $wpgmza; /* Developer Hook (Action) - Run additional actions as part of an upgrade */ do_action("wpgmza_base_upgrade_hook"); $wpgmza->updateAllMarkerXMLFiles(); }); if($this->assertVersionTag($fromVersion)){ /* Only run version compares if the versio number was asserted */ if(version_compare($fromVersion, '7.00', '<')){ add_action('init', array($this, 'migrateV7SpatialData'), 1, 11); } if(version_compare($fromVersion, '8.1.0', '<')){ add_action('init', array($this, 'migrateCircleData'), 1, 11); } if(version_compare($fromVersion, '8.1.12', '<')){ add_action('init', array($this, 'removeMarkerLngLatColumn'), 1, 11); } } } public function assertVersionTag($version){ if(!empty(floatval($version))){ /* Value was parsed */ return true; } return false; } public function removeMarkerLngLatColumn(){ global $wpgmza; global $wpdb; global $wpgmza_tblname; if($wpdb->get_var("SHOW COLUMNS FROM ".$wpgmza_tblname." LIKE 'lnglat'")){ $wpdb->query('ALTER TABLE '.$wpgmza_tblname.' DROP COLUMN lnglat'); } } public function migrateV7SpatialData() { global $wpgmza; global $wpdb; global $wpgmza_tblname; if(!$wpdb->get_var("SHOW COLUMNS FROM ".$wpgmza_tblname." LIKE 'latlng'")) $wpdb->query('ALTER TABLE '.$wpgmza_tblname.' ADD latlng POINT'); if($wpdb->get_var("SELECT COUNT(id) FROM $wpgmza_tblname WHERE latlng IS NULL LIMIT 1") == 0) return; // Nothing to migrate $wpdb->query("UPDATE ".$wpgmza_tblname." SET latlng={$wpgmza->spatialFunctionPrefix}PointFromText(CONCAT('POINT(', CAST(lat AS DECIMAL(18,10)), ' ', CAST(lng AS DECIMAL(18,10)), ')'))"); } public function migrateCircleData() { global $wpgmza; global $wpdb; global $WPGMZA_TABLE_NAME_CIRCLES; if($wpdb->get_var("SHOW TABLES LIKE '{$WPGMZA_TABLE_NAME_CIRCLES}'") !== $WPGMZA_TABLE_NAME_CIRCLES){ return; // Nothing to migrate } $wpdb->query("UPDATE {$WPGMZA_TABLE_NAME_CIRCLES} SET radius = radius / 1000"); } }
[-] class.admin-ui.php
[edit]
[+]
3rd-party-integration
[-] class.latlng.php
[edit]
[-] class.map.php
[edit]
[-] class.admin-notices.php
[edit]
[-] class.dom-query-results.php
[edit]
[-] class.pointlabel.php
[edit]
[-] class.upgrader.php
[edit]
[-] class.map-list-page.php
[edit]
[-] class.integrity-checker.php
[edit]
[-] class.dom-document.php
[edit]
[-] class.crud.php
[edit]
[+]
styling
[-] class.dynamic-translations.php
[edit]
[-] class.strings.php
[edit]
[-] class.library-script-panel.php
[edit]
[+]
open-layers
[-] class.maps-engine-dialog.php
[edit]
[+]
compat
[-] class.plugin.php
[edit]
[-] class.theme-panel.php
[edit]
[-] class.global-settings.php
[edit]
[+]
google-maps
[-] class.query.php
[edit]
[-] class.modal-dialog.php
[edit]
[-] class.script-loader.php
[edit]
[-] class.internal-engine.php
[edit]
[-] class.selector-to-xpath.php
[edit]
[-] class.polygon.php
[edit]
[-] class.rectangle.php
[edit]
[-] class.system-info.php
[edit]
[-] class.shortcodes.php
[edit]
[-] class.gdpr-compliance.php
[edit]
[+]
php8
[-] build.log
[edit]
[+]
tables
[-] class.polyline.php
[edit]
[-] class.settings.php
[edit]
[-] class.store-locator.php
[edit]
[-] class.country-select.php
[edit]
[-] class.settings-page.php
[edit]
[-] class.dom-element.php
[edit]
[+]
..
[-] class.elias-fano.php
[edit]
[-] class.distance.php
[edit]
[-] class.auto-loader.php
[edit]
[-] class.circle.php
[edit]
[-] class.page.php
[edit]
[-] class.component-anchor-control.php
[edit]
[+]
map-edit-page
[-] class.feature.php
[edit]
[-] class.marker.php
[edit]
[-] class.database.php
[edit]
[-] class.marker-filter.php
[edit]
[-] class.google-maps-api-loader.php
[edit]
[-] class.factory.php
[edit]
[+]
legacy
[-] class.installer-page.php
[edit]
[-] class.query-fragment.php
[edit]