Increase the version number, set some default values.
This commit is contained in:
parent
200f3edae4
commit
5c58886909
@ -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() {
|
||||
|
@ -1,3 +1,3 @@
|
||||
name = "Exif GPS Data"
|
||||
description = "Extract Exif GPS data from photos."
|
||||
version = 1
|
||||
version = 2
|
||||
|
Reference in New Issue
Block a user