1
0

Increase the version number, set some default values.

This commit is contained in:
rWatcher 2010-03-17 20:15:04 -04:00
parent faa9e52da2
commit d0205a2a6d
2 changed files with 30 additions and 2 deletions

View File

@ -30,7 +30,35 @@ class exif_gps_installer {
KEY(`item_id`, `id`))
DEFAULT CHARSET=utf8;");
module::set_version("exif_gps", 1);
// If tagsmap is installed, copy the API key over.
if (module::is_active("tagsmap")) {
module::set_var("exif_gps", "googlemap_api_key", module::get_var("tagsmap", "googlemap_api_key"));
}
// Set some default values.
module::set_var("exif_gps", "sidebar_zoom", "14");
module::set_var("exif_gps", "sidebar_mapformat", "1");
module::set_var("exif_gps", "sidebar_maptype", "1");
module::set_var("exif_gps", "largemap_maptype", "2");
// Set the module version number.
module::set_version("exif_gps", 2);
}
static function upgrade($version) {
if ($version == 1) {
// If tagsmap is installed, copy the API key over.
if (module::is_active("tagsmap")) {
module::set_var("exif_gps", "googlemap_api_key", module::get_var("tagsmap", "googlemap_api_key"));
}
// Set some default values.
module::set_var("exif_gps", "sidebar_zoom", "14");
module::set_var("exif_gps", "sidebar_mapformat", "1");
module::set_var("exif_gps", "sidebar_maptype", "1");
module::set_var("exif_gps", "largemap_maptype", "2");
module::set_version("exif_gps", 2);
}
}
static function deactivate() {

View File

@ -1,3 +1,3 @@
name = "Exif GPS Data"
description = "Extract Exif GPS data from photos."
version = 1
version = 2